gwenhywfar-5.12.1/0000755000175000017500000000000015032533717010770 500000000000000gwenhywfar-5.12.1/data/0000755000175000017500000000000015032533712011674 500000000000000gwenhywfar-5.12.1/data/ca-bundle.crt0000666000175000017500000066547213531037643014214 00000000000000## ## Bundle of CA Root Certificates ## ## Certificate data from Mozilla as of: Mon Aug 26 19:18:40 2019 ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates ## file (certdata.txt). This file can be found in the mozilla source tree: ## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt ## ## It contains the certificates in PEM format and therefore ## can be directly used with curl / libcurl / php_curl, or with ## an Apache+mod_ssl webserver for SSL client authentication. ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.25. ## SHA1: 6118a9aae201f36ca7df02a3795b601fbf9ed385 ## GlobalSign Root CA ================== -----BEGIN CERTIFICATE----- MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== -----END CERTIFICATE----- GlobalSign Root CA - R2 ======================= -----BEGIN CERTIFICATE----- MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp 9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu 01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7 9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== -----END CERTIFICATE----- Verisign Class 3 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj 055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC /Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== -----END CERTIFICATE----- Entrust.net Premium 2048 Secure Server CA ========================================= -----BEGIN CERTIFICATE----- MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= -----END CERTIFICATE----- Baltimore CyberTrust Root ========================= -----BEGIN CERTIFICATE----- MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp -----END CERTIFICATE----- AddTrust External Root ====================== -----BEGIN CERTIFICATE----- MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821 +iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy 2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7 7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= -----END CERTIFICATE----- Entrust Root Certification Authority ==================================== -----BEGIN CERTIFICATE----- MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 -----END CERTIFICATE----- GeoTrust Global CA ================== -----BEGIN CERTIFICATE----- MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet 8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm Mw== -----END CERTIFICATE----- GeoTrust Universal CA ===================== -----BEGIN CERTIFICATE----- MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs 7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d 8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08 ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0 XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2 qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI P/rmMuGNG2+k5o7Y+SlIis5z/iw= -----END CERTIFICATE----- GeoTrust Universal CA 2 ======================= -----BEGIN CERTIFICATE----- MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2 WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP 20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG 8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2 +/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ 4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+ mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS -----END CERTIFICATE----- Comodo AAA Services root ======================== -----BEGIN CERTIFICATE----- MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm 7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z 8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C 12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== -----END CERTIFICATE----- QuoVadis Root CA ================ -----BEGIN CERTIFICATE----- MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7 MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0 aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6 tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi 5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi 5nrQNiOKSnQ2+Q== -----END CERTIFICATE----- QuoVadis Root CA 2 ================== -----BEGIN CERTIFICATE----- MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt 66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK +JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II 4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u -----END CERTIFICATE----- QuoVadis Root CA 3 ================== -----BEGIN CERTIFICATE----- MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp 8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= -----END CERTIFICATE----- Security Communication Root CA ============================== -----BEGIN CERTIFICATE----- MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw 8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX 5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g 0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ 6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi FL39vmwLAw== -----END CERTIFICATE----- Sonera Class 2 Root CA ====================== -----BEGIN CERTIFICATE----- MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 /Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt 0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH llpwrN9M -----END CERTIFICATE----- XRamp Global CA Root ==================== -----BEGIN CERTIFICATE----- MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc /Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz 8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= -----END CERTIFICATE----- Go Daddy Class 2 CA =================== -----BEGIN CERTIFICATE----- MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv 2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b vZ8= -----END CERTIFICATE----- Starfield Class 2 CA ==================== -----BEGIN CERTIFICATE----- MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 QBFGmh95DmK/D5fs4C8fF5Q= -----END CERTIFICATE----- Taiwan GRCA =========== -----BEGIN CERTIFICATE----- MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O 1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8 lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2 09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk 7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy +fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS -----END CERTIFICATE----- DigiCert Assured ID Root CA =========================== -----BEGIN CERTIFICATE----- MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO 9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW /lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF 66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i 8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe +o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== -----END CERTIFICATE----- DigiCert Global Root CA ======================= -----BEGIN CERTIFICATE----- MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H 4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y 7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm 8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= -----END CERTIFICATE----- DigiCert High Assurance EV Root CA ================================== -----BEGIN CERTIFICATE----- MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K -----END CERTIFICATE----- Certplus Class 2 Primary CA =========================== -----BEGIN CERTIFICATE----- MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR 5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+ 7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW //1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7 l7+ijrRU -----END CERTIFICATE----- DST Root CA X3 ============== -----BEGIN CERTIFICATE----- MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1 cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9 UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ -----END CERTIFICATE----- SwissSign Gold CA - G2 ====================== -----BEGIN CERTIFICATE----- MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR 7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm 5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr 44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ -----END CERTIFICATE----- SwissSign Silver CA - G2 ======================== -----BEGIN CERTIFICATE----- MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG 9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm +/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH 6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P 4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L 3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx /uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u -----END CERTIFICATE----- GeoTrust Primary Certification Authority ======================================== -----BEGIN CERTIFICATE----- MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG 1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= -----END CERTIFICATE----- thawte Primary Root CA ====================== -----BEGIN CERTIFICATE----- MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3 MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ 1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== -----END CERTIFICATE----- VeriSign Class 3 Public Primary Certification Authority - G5 ============================================================ -----BEGIN CERTIFICATE----- MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/ Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/ BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+ X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq -----END CERTIFICATE----- SecureTrust CA ============== -----BEGIN CERTIFICATE----- MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b 01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR 3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= -----END CERTIFICATE----- Secure Global CA ================ -----BEGIN CERTIFICATE----- MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g 8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi 0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW -----END CERTIFICATE----- COMODO Certification Authority ============================== -----BEGIN CERTIFICATE----- MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH +7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV 4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA 1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN +8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== -----END CERTIFICATE----- Network Solutions Certificate Authority ======================================= -----BEGIN CERTIFICATE----- MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc /Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q 4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey -----END CERTIFICATE----- COMODO ECC Certification Authority ================================== -----BEGIN CERTIFICATE----- MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X 4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= -----END CERTIFICATE----- OISTE WISeKey Global Root GA CA =============================== -----BEGIN CERTIFICATE----- MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ /yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 +vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= -----END CERTIFICATE----- Certigna ======== -----BEGIN CERTIFICATE----- MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY 1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== -----END CERTIFICATE----- Deutsche Telekom Root CA 2 ========================== -----BEGIN CERTIFICATE----- MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5 MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5 bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8 rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU Cm26OWMohpLzGITY+9HPBVZkVw== -----END CERTIFICATE----- Cybertrust Global Root ====================== -----BEGIN CERTIFICATE----- MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA +Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW 0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin 89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT 8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi 5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW WL1WMRJOEcgh4LMRkWXbtKaIOM5V -----END CERTIFICATE----- ePKI Root Certification Authority ================================= -----BEGIN CERTIFICATE----- MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX 12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= -----END CERTIFICATE----- certSIGN ROOT CA ================ -----BEGIN CERTIFICATE----- MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD 0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD -----END CERTIFICATE----- GeoTrust Primary Certification Authority - G3 ============================================= -----BEGIN CERTIFICATE----- MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr 2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt -----END CERTIFICATE----- thawte Primary Root CA - G2 =========================== -----BEGIN CERTIFICATE----- MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== -----END CERTIFICATE----- thawte Primary Root CA - G3 =========================== -----BEGIN CERTIFICATE----- MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC +BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY 7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC 8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= -----END CERTIFICATE----- GeoTrust Primary Certification Authority - G2 ============================================= -----BEGIN CERTIFICATE----- MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 npaqBA+K -----END CERTIFICATE----- VeriSign Universal Root Certification Authority =============================================== -----BEGIN CERTIFICATE----- MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0 aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj 1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72 9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 mJO37M2CYfE45k+XmCpajQ== -----END CERTIFICATE----- VeriSign Class 3 Public Primary Certification Authority - G4 ============================================================ -----BEGIN CERTIFICATE----- MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB /zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== -----END CERTIFICATE----- NetLock Arany (Class Gold) Főtanúsítvány ============================================ -----BEGIN CERTIFICATE----- MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu 0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw /HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= -----END CERTIFICATE----- Staat der Nederlanden Root CA - G2 ================================== -----BEGIN CERTIFICATE----- MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ 5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65 48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737 qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz +51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm 66+KAQ== -----END CERTIFICATE----- Hongkong Post Root CA 1 ======================= -----BEGIN CERTIFICATE----- MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== -----END CERTIFICATE----- SecureSign RootCA11 =================== -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= -----END CERTIFICATE----- Microsec e-Szigno Root CA 2009 ============================== -----BEGIN CERTIFICATE----- MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG 0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm 1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi LXpUq3DDfSJlgnCW -----END CERTIFICATE----- GlobalSign Root CA - R3 ======================= -----BEGIN CERTIFICATE----- MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ 0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r kpeDMdmztcpHWD9f -----END CERTIFICATE----- Autoridad de Certificacion Firmaprofesional CIF A62634068 ========================================================= -----BEGIN CERTIFICATE----- MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY 7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx 51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi 6Et8Vcad+qMUu2WFbm5PEn4KPJ2V -----END CERTIFICATE----- Izenpe.com ========== -----BEGIN CERTIFICATE----- MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ 03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU +zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK 0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ 0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== -----END CERTIFICATE----- Chambers of Commerce Root - 2008 ================================ -----BEGIN CERTIFICATE----- MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/ ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331 lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ 0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2 EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1 wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH 3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6 M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1 YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF 9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ -----END CERTIFICATE----- Global Chambersign Root - 2008 ============================== -----BEGIN CERTIFICATE----- MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0 ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB /gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp 1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0 dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG /5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6 ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg 9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z 09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B -----END CERTIFICATE----- Go Daddy Root Certificate Authority - G2 ======================================== -----BEGIN CERTIFICATE----- MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq 9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD +qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r 5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 -----END CERTIFICATE----- Starfield Root Certificate Authority - G2 ========================================= -----BEGIN CERTIFICATE----- MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx 4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 -----END CERTIFICATE----- Starfield Services Root Certificate Authority - G2 ================================================== -----BEGIN CERTIFICATE----- MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 -----END CERTIFICATE----- AffirmTrust Commercial ====================== -----BEGIN CERTIFICATE----- MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv 0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= -----END CERTIFICATE----- AffirmTrust Networking ====================== -----BEGIN CERTIFICATE----- MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 /PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 /ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= -----END CERTIFICATE----- AffirmTrust Premium =================== -----BEGIN CERTIFICATE----- MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV 5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs +7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 /bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo +Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB /wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC 6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK +4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== -----END CERTIFICATE----- AffirmTrust Premium ECC ======================= -----BEGIN CERTIFICATE----- MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X 57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM eQ== -----END CERTIFICATE----- Certum Trusted Network CA ========================= -----BEGIN CERTIFICATE----- MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI 03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= -----END CERTIFICATE----- TWCA Root Certification Authority ================================= -----BEGIN CERTIFICATE----- MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP 4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG 9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== -----END CERTIFICATE----- Security Communication RootCA2 ============================== -----BEGIN CERTIFICATE----- MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ +T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R 3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk 3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 -----END CERTIFICATE----- EC-ACC ====== -----BEGIN CERTIFICATE----- MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw 0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D 5EI= -----END CERTIFICATE----- Hellenic Academic and Research Institutions RootCA 2011 ======================================================= -----BEGIN CERTIFICATE----- MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI 1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa 71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u 8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH 3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/ MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8 MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD /md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N 7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 -----END CERTIFICATE----- Actalis Authentication Root CA ============================== -----BEGIN CERTIFICATE----- MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2 oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7 hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8 EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5 jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC 4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo 2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== -----END CERTIFICATE----- Trustis FPS Root CA =================== -----BEGIN CERTIFICATE----- MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290 IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P 8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl iB6XzCGcKQENZetX2fNXlrtIzYE= -----END CERTIFICATE----- Buypass Class 2 Root CA ======================= -----BEGIN CERTIFICATE----- MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn 9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b /+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN rJgWVqA= -----END CERTIFICATE----- Buypass Class 3 Root CA ======================= -----BEGIN CERTIFICATE----- MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR 5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh 7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH 2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV /afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz 6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi Cp/HuZc= -----END CERTIFICATE----- T-TeleSec GlobalRoot Class 3 ============================ -----BEGIN CERTIFICATE----- MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK 9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W 0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== -----END CERTIFICATE----- EE Certification Centre Root CA =============================== -----BEGIN CERTIFICATE----- MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2 rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw 93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU 3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM dcGWxZ0= -----END CERTIFICATE----- D-TRUST Root Class 3 CA 2 2009 ============================== -----BEGIN CERTIFICATE----- MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ 4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm 2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= -----END CERTIFICATE----- D-TRUST Root Class 3 CA 2 EV 2009 ================================= -----BEGIN CERTIFICATE----- MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T 7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv w9y4AyHqnxbxLFS1 -----END CERTIFICATE----- CA Disig Root R2 ================ -----BEGIN CERTIFICATE----- MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa 5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV 7+ZtsH8tZ/3zbBt1RqPlShfppNcL -----END CERTIFICATE----- ACCVRAIZ1 ========= -----BEGIN CERTIFICATE----- MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ 0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR 5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J 9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd 3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p EfbRD0tVNEYqi4Y7 -----END CERTIFICATE----- TWCA Global Root CA =================== -----BEGIN CERTIFICATE----- MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M 8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg /eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= -----END CERTIFICATE----- TeliaSonera Root CA v1 ====================== -----BEGIN CERTIFICATE----- MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ 6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA 3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx 0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= -----END CERTIFICATE----- E-Tugra Certification Authority =============================== -----BEGIN CERTIFICATE----- MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB /wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G C7TbO6Orb1wdtn7os4I07QZcJA== -----END CERTIFICATE----- T-TeleSec GlobalRoot Class 2 ============================ -----BEGIN CERTIFICATE----- MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR 3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN 9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== -----END CERTIFICATE----- Atos TrustedRoot 2011 ===================== -----BEGIN CERTIFICATE----- MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr 54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G 3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed -----END CERTIFICATE----- QuoVadis Root CA 1 G3 ===================== -----BEGIN CERTIFICATE----- MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV 7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX 9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP +V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh 3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV hMJKzRwuJIczYOXD -----END CERTIFICATE----- QuoVadis Root CA 2 G3 ===================== -----BEGIN CERTIFICATE----- MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD 6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr O3jtZsSOeWmD3n+M -----END CERTIFICATE----- QuoVadis Root CA 3 G3 ===================== -----BEGIN CERTIFICATE----- MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe 6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX 0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 PpxxVJkES/1Y+Zj0 -----END CERTIFICATE----- DigiCert Assured ID Root G2 =========================== -----BEGIN CERTIFICATE----- MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH 35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv 0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo IhNzbM8m9Yop5w== -----END CERTIFICATE----- DigiCert Assured ID Root G3 =========================== -----BEGIN CERTIFICATE----- MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy 1vUhZscv6pZjamVFkpUBtA== -----END CERTIFICATE----- DigiCert Global Root G2 ======================= -----BEGIN CERTIFICATE----- MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO 3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu 5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl MrY= -----END CERTIFICATE----- DigiCert Global Root G3 ======================= -----BEGIN CERTIFICATE----- MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y 3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 VOKa5Vt8sycX -----END CERTIFICATE----- DigiCert Trusted Root G4 ======================== -----BEGIN CERTIFICATE----- MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy 7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN 5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb /UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa 5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP 82Z+ -----END CERTIFICATE----- COMODO RSA Certification Authority ================================== -----BEGIN CERTIFICATE----- MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ 5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX 2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I LaZRfyHBNVOFBkpdn627G190 -----END CERTIFICATE----- USERTrust RSA Certification Authority ===================================== -----BEGIN CERTIFICATE----- MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz 0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O +T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq /nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ 7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM 8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 -----END CERTIFICATE----- USERTrust ECC Certification Authority ===================================== -----BEGIN CERTIFICATE----- MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu 9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= -----END CERTIFICATE----- GlobalSign ECC Root CA - R4 =========================== -----BEGIN CERTIFICATE----- MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= -----END CERTIFICATE----- GlobalSign ECC Root CA - R5 =========================== -----BEGIN CERTIFICATE----- MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 -----END CERTIFICATE----- Staat der Nederlanden Root CA - G3 ================================== -----BEGIN CERTIFICATE----- MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5 1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp 07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE 41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1 v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA 8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b 8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq 1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk= -----END CERTIFICATE----- Staat der Nederlanden EV Root CA ================================ -----BEGIN CERTIFICATE----- MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r 0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr 08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV 0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd 74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq 5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi 5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== -----END CERTIFICATE----- IdenTrust Commercial Root CA 1 ============================== -----BEGIN CERTIFICATE----- MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi 1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl 3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH 6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe 2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R cGzM7vRX+Bi6hG6H -----END CERTIFICATE----- IdenTrust Public Sector Root CA 1 ================================= -----BEGIN CERTIFICATE----- MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL 4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ 3Wl9af0AVqW3rLatt8o+Ae+c -----END CERTIFICATE----- Entrust Root Certification Authority - G2 ========================================= -----BEGIN CERTIFICATE----- MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP /vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO e4pIb4tF9g== -----END CERTIFICATE----- Entrust Root Certification Authority - EC1 ========================================== -----BEGIN CERTIFICATE----- MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef 9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G -----END CERTIFICATE----- CFCA EV ROOT ============ -----BEGIN CERTIFICATE----- MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD 7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB /wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua 4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su -----END CERTIFICATE----- OISTE WISeKey Global Root GB CA =============================== -----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk 9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB /zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= -----END CERTIFICATE----- SZAFIR ROOT CA2 =============== -----BEGIN CERTIFICATE----- MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE 2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5 O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67 oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul 4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6 +/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== -----END CERTIFICATE----- Certum Trusted Network CA 2 =========================== -----BEGIN CERTIFICATE----- MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ 9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7 zAYspsbiDrW5viSP -----END CERTIFICATE----- Hellenic Academic and Research Institutions RootCA 2015 ======================================================= -----BEGIN CERTIFICATE----- MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ 6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2 fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+ D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn 82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q p/UsQu0yrbYhnr68 -----END CERTIFICATE----- Hellenic Academic and Research Institutions ECC RootCA 2015 =========================================================== -----BEGIN CERTIFICATE----- MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR -----END CERTIFICATE----- ISRG Root X1 ============ -----BEGIN CERTIFICATE----- MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1 3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ 4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf 1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY 9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV 0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ m+kXQ99b21/+jh5Xos1AnX5iItreGCc= -----END CERTIFICATE----- AC RAIZ FNMT-RCM ================ -----BEGIN CERTIFICATE----- MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou 08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ 47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW +YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d 8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm 5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= -----END CERTIFICATE----- Amazon Root CA 1 ================ -----BEGIN CERTIFICATE----- MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB /zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy 8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa 2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 -----END CERTIFICATE----- Amazon Root CA 2 ================ -----BEGIN CERTIFICATE----- MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ 3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY +gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= -----END CERTIFICATE----- Amazon Root CA 3 ================ -----BEGIN CERTIFICATE----- MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== -----END CERTIFICATE----- Amazon Root CA 4 ================ -----BEGIN CERTIFICATE----- MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN /sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri 83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== -----END CERTIFICATE----- LuxTrust Global Root 2 ====================== -----BEGIN CERTIFICATE----- MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2 xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm 1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/ a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB /zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5 Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT +Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW 7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt /f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc 7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr -----END CERTIFICATE----- TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 ============================================= -----BEGIN CERTIFICATE----- MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= -----END CERTIFICATE----- GDCA TrustAUTH R5 ROOT ====================== -----BEGIN CERTIFICATE----- MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ 9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx 9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd +PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ 8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv /EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== -----END CERTIFICATE----- TrustCor RootCert CA-1 ====================== -----BEGIN CERTIFICATE----- MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw /Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P 3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= -----END CERTIFICATE----- TrustCor RootCert CA-2 ====================== -----BEGIN CERTIFICATE----- MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 /p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh 8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU 2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv 2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ -----END CERTIFICATE----- TrustCor ECA-1 ============== -----BEGIN CERTIFICATE----- MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u /ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== -----END CERTIFICATE----- SSL.com Root Certification Authority RSA ======================================== -----BEGIN CERTIFICATE----- MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= -----END CERTIFICATE----- SSL.com Root Certification Authority ECC ======================================== -----BEGIN CERTIFICATE----- MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ 8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z 5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl -----END CERTIFICATE----- SSL.com EV Root Certification Authority RSA R2 ============================================== -----BEGIN CERTIFICATE----- MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim 9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 +qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 ++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX 9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== -----END CERTIFICATE----- SSL.com EV Root Certification Authority ECC =========================================== -----BEGIN CERTIFICATE----- MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy 3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe 5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== -----END CERTIFICATE----- GlobalSign Root CA - R6 ======================= -----BEGIN CERTIFICATE----- MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE 3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+ azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP 0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0 lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr 3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1 0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= -----END CERTIFICATE----- OISTE WISeKey Global Root GC CA =============================== -----BEGIN CERTIFICATE----- MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 -----END CERTIFICATE----- GTS Root R1 =========== -----BEGIN CERTIFICATE----- MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx 9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly 4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr 06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om 3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq 4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql CFF1pkgl -----END CERTIFICATE----- GTS Root R2 =========== -----BEGIN CERTIFICATE----- MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo 7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy 5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ +YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ 7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld o/DUhgkC -----END CERTIFICATE----- GTS Root R3 =========== -----BEGIN CERTIFICATE----- MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP 0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa KaqW04MjyaR7YbPMAuhd -----END CERTIFICATE----- GTS Root R4 =========== -----BEGIN CERTIFICATE----- MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa 6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV 2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x zPKwTdb+mciUqXWi4w== -----END CERTIFICATE----- UCA Global G2 Root ================== -----BEGIN CERTIFICATE----- MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV 8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa 4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo 5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== -----END CERTIFICATE----- UCA Extended Validation Root ============================ -----BEGIN CERTIFICATE----- MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR 59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH 0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS 3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb +7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr dhh2n1ax -----END CERTIFICATE----- Certigna Root CA ================ -----BEGIN CERTIFICATE----- MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq 4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ /TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of 1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq 7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd 8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS 6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= -----END CERTIFICATE----- emSign Root CA - G1 =================== -----BEGIN CERTIFICATE----- MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1 cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ 6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2 vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q +Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx iN66zB+Afko= -----END CERTIFICATE----- emSign ECC Root CA - G3 ======================= -----BEGIN CERTIFICATE----- MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4 MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11 ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc 58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7 jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj -----END CERTIFICATE----- emSign Root CA - C1 =================== -----BEGIN CERTIFICATE----- MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/ Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+ XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp /6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1 NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9 wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI= -----END CERTIFICATE----- emSign ECC Root CA - C3 ======================= -----BEGIN CERTIFICATE----- MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd 6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9 SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== -----END CERTIFICATE----- Hongkong Post Root CA 3 ======================= -----BEGIN CERTIFICATE----- MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2 MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim 5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj 0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/ JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h +bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov +BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw 9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7 nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB 60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq dBb9HxEGmpv0 -----END CERTIFICATE----- gwenhywfar-5.12.1/data/README0000644000175000017500000000265613142134462012504 00000000000000 The Mozilla CA bundle extracted and converted to PEM . See the PEM file itself for the actual date of the latest Mozilla source change that is included in the converted file. The converted file is licensed under the same license as the Mozilla source file: MPL 2.0. We use mk-ca-bundle.pl from curl: https://github.com/bagder/curl/blob/master/lib/mk-ca-bundle.pl Copyright notice from CURL follows: COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2016, Daniel Stenberg, . All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. gwenhywfar-5.12.1/data/Makefile.am0000666000175000017500000000015413642701411013652 00000000000000 if INSTALL_CERTS certdir=$(datadir)/gwenhywfar dist_cert_DATA=ca-bundle.crt EXTRA_DIST=README endif gwenhywfar-5.12.1/data/Makefile.in0000644000175000017500000005063415032533614013672 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_cert_DATA_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__dist_cert_DATA_DIST = ca-bundle.crt am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(certdir)" DATA = $(dist_cert_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ @INSTALL_CERTS_TRUE@certdir = $(datadir)/gwenhywfar @INSTALL_CERTS_TRUE@dist_cert_DATA = ca-bundle.crt @INSTALL_CERTS_TRUE@EXTRA_DIST = README all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_certDATA: $(dist_cert_DATA) @$(NORMAL_INSTALL) @list='$(dist_cert_DATA)'; test -n "$(certdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(certdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(certdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(certdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(certdir)" || exit $$?; \ done uninstall-dist_certDATA: @$(NORMAL_UNINSTALL) @list='$(dist_cert_DATA)'; test -n "$(certdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(certdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(certdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_certDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_certDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_certDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_certDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/Doxyfile.in0000664000175000017500000017503314274761210013034 00000000000000# Doxyfile 1.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = gwenhywfar # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = YES # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class " \ "The $name widget " \ "The $name file " \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = YES # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it parses. # With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this tag. # The format is ext=language, where ext is a file extension, and language is one of # the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, # Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat # .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen to replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penality. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will rougly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 4 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = YES # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = yes # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by # doxygen. The layout file controls the global structure of the generated output files # in an output format independent way. The create the layout file that represents # doxygen's defaults, run doxygen with the -l option. You can optionally specify a # file name after the option, if omitted DoxygenLayout.xml will be used as the name # of the layout file. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = doc/apidoc.h doc/widgets.h doc/widgets_be.h @DOXYGEN_INPUT@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = src/os/windows \ src/os/posix # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = *moc* \ *_p.h # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = doc # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = doc # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 4 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = GWEN_ #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = apidoc # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER # are set, an additional index file will be generated that can be used as input for # Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated # HTML documentation. GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. # For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's # filter section matches. # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) # there is already a search function so this one should typically # be disabled. SEARCHENGINE = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = DOXYGEN \ @DOXYGEN_DEFINE@ \ __cplusplus # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = @DOXYGEN_TAGFILES@ # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = gwenhywfar.tag # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = NO # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = @USE_DOT@ # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 1000 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 5 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES gwenhywfar-5.12.1/gwenhywfar.pc.in0000666000175000017500000000167113560106416014027 00000000000000# pkg-config configuration for gwenhywfar # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@gwenhywfar_headerdir@ datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Particular variables of gwenhywfar plugindir=@gwenhywfar_plugindir@ headerdir=@gwenhywfar_headerdir@/gwenhywfar vmajor=@GWENHYWFAR_VERSION_MAJOR@ vminor=@GWENHYWFAR_VERSION_MINOR@ vpatchlevel=@GWENHYWFAR_VERSION_PATCHLEVEL@ vbuild=@GWENHYWFAR_VERSION_BUILD@ vtag=@GWENHYWFAR_VERSION_TAG@ vstring=@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@.@GWENHYWFAR_VERSION_PATCHLEVEL@ # Human-readable name Name: gwenhywfar # Human-readable description Description: A multi-platform helper library for other libraries Version: @VERSION@ Libs: @gwenhywfar_ldflags@ @gwenhywfar_libs@ Cflags: -I@gwenhywfar_headerdir@ gwenhywfar-5.12.1/configure0000755000175000017500000351246315032533615012632 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="as_nop=: if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org 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." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='' PACKAGE_TARNAME='' PACKAGE_VERSION='' PACKAGE_STRING='' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/gwenhywfarapi.h" ac_default_prefix=/usr/local # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_func_c_list= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS gwenhywfar_plugins_cfgmgr_libs gwenhywfar_plugins_cfgmgr_dirs gwenhywfar_plugins_dbio_libs gwenhywfar_plugins_dbio_dirs gwenhywfar_plugins_ct_libs gwenhywfar_plugins_ct_dirs gwenhywfar_datadir gwenhywfar_symlinkdir gwenhywfar_headerdir gwenhywfar_headerdir_am gwenhywfar_plugindir gwenhywfar_pkgincludedir gwenhywfar_os_lib gwenhywfar_libsui gwenhywfar_libspp gwenhywfar_internal_libname gwenhywfar_libs gwenhywfar_bindir gwenhywfar_ldflags gwenhywfar_crypt_lib all_libraries all_includes PROG_LIBRARIES GWEN_OS DOXYGEN_DEFINE DOXYGEN_INPUT DOXYGEN_QHP_NAMESPACE DOXYGEN_QHG_LOCATION DOXYGEN_GENERATE_QHP gwenhywfar_buffer_hardlimit WERROR visibility_cflags STRIPALL DOXYGEN_TAGFILES docpath QT_MAJOR_VERSION QT_LIBS QT_DIR QT_CXXFLAGS QT_LUPDATE QT_LRELEASE QT_RCC QT_UIC QT_MOC ac_ct_QTPATHS QTPATHS ac_ct_QMAKE QMAKE X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF WITH_GUI_QT4_FALSE WITH_GUI_QT4_TRUE with_gui_qt4 QT4_BINDIR YES qt4_uic qt4_moc qt4_includes qt4_libs LIBXML_LIBS LIBXML_CFLAGS WITH_LIBXML2_CODE_FALSE WITH_LIBXML2_CODE_TRUE WITH_GUI_GTK3_FALSE WITH_GUI_GTK3_TRUE with_gui_gtk3 GTK3_LIBS GTK3_CFLAGS WITH_GUI_GTK2_FALSE WITH_GUI_GTK2_TRUE with_gui_gtk2 GTK2_LIBS GTK2_CFLAGS WITH_GUI_FOX16_FALSE WITH_GUI_FOX16_TRUE with_gui_fox16 fox_includes fox_libs gwenhywfar_guis ICONV_LIBS WITH_ICONV HAVE_I18N i18n_libs POSUB LTLIBINTL LIBINTL INTLLIBS INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE XGETTEXT_015 GMSGFMT_015 GMSGFMT GETTEXT_MACRO_VERSION USE_NLS IF_MAKE_I18N_FILES_FALSE IF_MAKE_I18N_FILES_TRUE MAKE_I18N_FILES MSGFMT XGETTEXT aq_distrib_version aq_distrib_tag aq_distrib_name ssl_available IF_HAVE_OPENSSL_FALSE IF_HAVE_OPENSSL_TRUE OPENSSL_LIBS OPENSSL_CFLAGS LIBGNUTLS_LIBS LIBGNUTLS_CFLAGS GPG_ERROR_LIBS GPG_ERROR_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LIBGCRYPT_CONFIG LIBGCRYPT_LIBS LIBGCRYPT_CFLAGS DPKG_ARCH PROFILING_LDFLAGS PROFILING_CFLAGS gwenhywfar_cfg_searchdir gwenhywfar_locale_searchdir gwenhywfar_sysdata_searchdir gwenhywfar_data_searchdir gwenhywfar_plugin_searchdir gwenbuild_tool gwenhywfar_sys_is_windows IS_WINDOWS_FALSE IS_WINDOWS_TRUE INSTALL_CERTS_FALSE INSTALL_CERTS_TRUE BINRELOC_LIBS BINRELOC_CFLAGS LIBOBJS LTLIBICONV LIBICONV PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC ax_pthread_config CROSS_COMPILING_FALSE CROSS_COMPILING_TRUE ASTYLE USE_DOT RC AS CXXCPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP FILECMD LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepOBJC_FALSE am__fastdepOBJC_TRUE OBJCDEPMODE ac_ct_OBJC OBJCFLAGS OBJC CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC WEBKIT_FRAMEWORK COREDATA_FRAMEWORK APPKIT_FRAMEWORK SYSCONF_FRAMEWORK FOUNDATION_FRAMEWORK COCOA_FRAMEWORK INSTALL_DLL_TARGET MAKE_DLL_TARGET OS_TYPE OSYSTEM GWENPP_SO_EFFECTIVE GWENPP_SO_AGE GWENPP_SO_REVISION GWENPP_SO_CURRENT GWENUI_SO_EFFECTIVE GWENUI_SO_AGE GWENUI_SO_REVISION GWENUI_SO_CURRENT AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM GWENHYWFAR_SO_EFFECTIVE GWENHYWFAR_SO_AGE GWENHYWFAR_SO_REVISION GWENHYWFAR_SO_CURRENT OHBCI_VERSION_STRING GWENHYWFAR_VERSION_RELEASE_STRING GWENHYWFAR_VERSION_STRING GWENHYWFAR_VERSION_FULL_STRING GWENHYWFAR_VERSION_TAG GWENHYWFAR_VERSION_BUILD GWENHYWFAR_VERSION_PATCHLEVEL GWENHYWFAR_VERSION_MINOR GWENHYWFAR_VERSION_MAJOR host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_static enable_shared enable_dependency_tracking with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_rpath with_libiconv_prefix enable_binreloc enable_binreloc_threads enable_gwen_subproject enable_system_certs enable_network_checks enable_testcode enable_local_install with_plugin_searchdir with_data_searchdir with_sysdata_searchdir with_locale_searchdir with_cfg_searchdir enable_variadic_macros enable_profiling with_libgcrypt_prefix enable_nls with_libintl_prefix with_iconv with_guis enable_fox with_fox_includes with_fox_libs with_libxml2_code with_qt4_includes with_qt4_libs with_qt4_moc with_qt4_uic with_x with_qmake with_docpath enable_release enable_error_on_warning enable_debug enable_warnings enable_memtrace with_buffer_hardlimit enable_full_doc with_plugins_ct with_plugins_dbio with_plugins_cfgmgr ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP OBJC OBJCFLAGS LT_SYS_LIBRARY_PATH CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GPG_ERROR_CFLAGS GPG_ERROR_LIBS LIBGNUTLS_CFLAGS LIBGNUTLS_LIBS OPENSSL_CFLAGS OPENSSL_LIBS GTK2_CFLAGS GTK2_LIBS GTK3_CFLAGS GTK3_LIBS LIBXML_CFLAGS LIBXML_LIBS XMKMF QMAKE QT_MOC QT_UIC QT_RCC QT_LRELEASE QT_LUPDATE' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # 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. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --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] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-rpath do not hardcode runtime library paths --enable-binreloc compile with binary relocation support (default=enable when available) --enable-binreloc-threads compile binary relocation with threads support (default=yes) --enable-gwen-subproject make gwen only a subproject (default=no) --enable-system-certs use system-wide certificates (default=yes) --disable-network-checks disables checks that assume available network during build (default=enabled) --enable-testcode allow compiling of test code (default=no) --enable-local-install allow local installation mode (default=no) --enable-variadic-macros enable variadic macros (default=yes) --enable-profiling enable profiling (default=no) --disable-nls do not use Native Language Support --enable-fox enable fox (default=yes) --enable-release make this an official release (default=no) --enable-error-on-warning treat compiler warnings as errors (default=no) --enable-debug compile with debugging code enabled, default=no --enable-warnings enable compilation warnings, default=yes --enable-error-on-warning treat all compile warnings as errors, default=no --enable-memtrace enable memory trace (default=no) --enable-full-doc enable creating full apidoc (default=no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-plugin-searchdir=DIR where to search for plugins --with-data-searchdir=DIR where to search for data files --with-sysdata-searchdir=DIR where to search for data files --with-locale-searchdir=DIR where to search for locale files --with-cfg-searchdir=DIR where to search for cfg files --with-libgcrypt-prefix=PFX prefix where LIBGCRYPT is installed (optional) --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-iconv=PATH take iconv from PATH --with-guis=list space separated list of GUI implementations (default:all) --with-fox-includes=DIR uses fox includes from given dir --with-fox-libs=SPEC uses given fox libs --with-libxml2-code=yes compile libXML2-depending code --with-qt4-includes=DIR uses qt4 includes from given dir --with-qt4-libs=DIR uses qt4 libs from given dir --with-qt4-moc=FILE uses the given qt4 moc --with-qt4-uic=FILE uses the given qt4 uic --with-x use the X Window System --with-qmake=FILE uses given qmake --with-docpath=DIR where to store the apidoc --with-buffer-hardlimit=VALUE new default buffer hard limit --with-plugins-ct=LIST list of CT plugins to build --with-plugins-dbio=LIST list of DBIO plugins to build --with-plugins-cfgmgr=LIST list of ConfigManager plugins to build Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor OBJC Objective C compiler command OBJCFLAGS Objective C compiler flags LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path GPG_ERROR_CFLAGS C compiler flags for GPG_ERROR, overriding pkg-config GPG_ERROR_LIBS linker flags for GPG_ERROR, overriding pkg-config LIBGNUTLS_CFLAGS C compiler flags for LIBGNUTLS, overriding pkg-config LIBGNUTLS_LIBS linker flags for LIBGNUTLS, overriding pkg-config OPENSSL_CFLAGS C compiler flags for OPENSSL, overriding pkg-config OPENSSL_LIBS linker flags for OPENSSL, overriding pkg-config GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config GTK2_LIBS linker flags for GTK2, overriding pkg-config GTK3_CFLAGS C compiler flags for GTK3, overriding pkg-config GTK3_LIBS linker flags for GTK3, overriding pkg-config LIBXML_CFLAGS C compiler flags for LIBXML, overriding pkg-config LIBXML_LIBS linker flags for LIBXML, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System QMAKE Qt make tool QT_MOC Qt moc tool QT_UIC Qt uic tool QT_RCC Qt rcc tool QT_LRELEASE Qt lrelease tool QT_LUPDATE Qt lupdate tool 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. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_objc_try_compile LINENO # ----------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_objc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_objc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_objc_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac 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 generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " # Test code for whether the C++ compiler supports C++98 (global declarations) ac_cxx_conftest_cxx98_globals=' // Does the compiler advertise C++98 conformance? #if !defined __cplusplus || __cplusplus < 199711L # error "Compiler does not advertise C++98 conformance" #endif // These inclusions are to reject old compilers that // lack the unsuffixed header files. #include #include // and are *not* freestanding headers in C++98. extern void assert (int); namespace std { extern int strcmp (const char *, const char *); } // Namespaces, exceptions, and templates were all added after "C++ 2.0". using std::exception; using std::strcmp; namespace { void test_exception_syntax() { try { throw "test"; } catch (const char *s) { // Extra parentheses suppress a warning when building autoconf itself, // due to lint rules shared with more typical C programs. assert (!(strcmp) (s, "test")); } } template struct test_template { T const val; explicit test_template(T t) : val(t) {} template T add(U u) { return static_cast(u) + val; } }; } // anonymous namespace ' # Test code for whether the C++ compiler supports C++98 (body of main) ac_cxx_conftest_cxx98_main=' assert (argc); assert (! argv[0]); { test_exception_syntax (); test_template tt (2.0); assert (tt.add (4) == 6.0); assert (true && !false); } ' # Test code for whether the C++ compiler supports C++11 (global declarations) ac_cxx_conftest_cxx11_globals=' // Does the compiler advertise C++ 2011 conformance? #if !defined __cplusplus || __cplusplus < 201103L # error "Compiler does not advertise C++11 conformance" #endif namespace cxx11test { constexpr int get_val() { return 20; } struct testinit { int i; double d; }; class delegate { public: delegate(int n) : n(n) {} delegate(): delegate(2354) {} virtual int getval() { return this->n; }; protected: int n; }; class overridden : public delegate { public: overridden(int n): delegate(n) {} virtual int getval() override final { return this->n * 2; } }; class nocopy { public: nocopy(int i): i(i) {} nocopy() = default; nocopy(const nocopy&) = delete; nocopy & operator=(const nocopy&) = delete; private: int i; }; // for testing lambda expressions template Ret eval(Fn f, Ret v) { return f(v); } // for testing variadic templates and trailing return types template auto sum(V first) -> V { return first; } template auto sum(V first, Args... rest) -> V { return first + sum(rest...); } } ' # Test code for whether the C++ compiler supports C++11 (body of main) ac_cxx_conftest_cxx11_main=' { // Test auto and decltype auto a1 = 6538; auto a2 = 48573953.4; auto a3 = "String literal"; int total = 0; for (auto i = a3; *i; ++i) { total += *i; } decltype(a2) a4 = 34895.034; } { // Test constexpr short sa[cxx11test::get_val()] = { 0 }; } { // Test initializer lists cxx11test::testinit il = { 4323, 435234.23544 }; } { // Test range-based for int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; for (auto &x : array) { x += 23; } } { // Test lambda expressions using cxx11test::eval; assert (eval ([](int x) { return x*2; }, 21) == 42); double d = 2.0; assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); assert (d == 5.0); assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); assert (d == 5.0); } { // Test use of variadic templates using cxx11test::sum; auto a = sum(1); auto b = sum(1, 2); auto c = sum(1.0, 2.0, 3.0); } { // Test constructor delegation cxx11test::delegate d1; cxx11test::delegate d2(); cxx11test::delegate d3(45); } { // Test override and final cxx11test::overridden o1(55464); } { // Test nullptr char *c = nullptr; } { // Test template brackets test_template<::test_template> v(test_template(12)); } { // Unicode literals char const *utf8 = u8"UTF-8 string \u2500"; char16_t const *utf16 = u"UTF-8 string \u2500"; char32_t const *utf32 = U"UTF-32 string \u2500"; } ' # Test code for whether the C compiler supports C++11 (complete). ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} ${ac_cxx_conftest_cxx11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} ${ac_cxx_conftest_cxx11_main} return ok; } " # Test code for whether the C compiler supports C++98 (complete). ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_func_c_list " alarm HAVE_ALARM" as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H" as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H" gt_needs="$gt_needs " # Auxiliary files required by this configure script. ac_aux_files="config.rpath ltmain.sh compile missing install-sh config.guess config.sub" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_config_headers="$ac_config_headers config.h" ###------------------------------------------------------------------------- # # versions # GWENHYWFAR_VERSION_MAJOR=5 GWENHYWFAR_VERSION_MINOR=12 GWENHYWFAR_VERSION_PATCHLEVEL=1 GWENHYWFAR_VERSION_BUILD=0 GWENHYWFAR_VERSION_TAG="stable" ###------------------------------------------------------------------------- # # SO version for Gwenhywfar # GWENHYWFAR_SO_CURRENT="91" GWENHYWFAR_SO_AGE="12" GWENHYWFAR_SO_REVISION="1" GWENHYWFAR_SO_EFFECTIVE="`echo \$(($GWENHYWFAR_SO_CURRENT-$GWENHYWFAR_SO_AGE))`" ###------------------------------------------------------------------------- # # Generate version strings and BUILD # #GWENHYWFAR_VERSION_BUILD="0" # Let svn write the revision number directly into here on # each svn update. Note: The trailing space is necessary for # cvs versions. #GWENHYWFAR_VERSION_BUILD=`echo "$Rev$ " | cut -d' ' -f2` #if test "x$GWENHYWFAR_VERSION_BUILD" = "x" ; then # GWENHYWFAR_VERSION_BUILD="0" #fi GWENHYWFAR_VERSION_FULL_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.${GWENHYWFAR_VERSION_PATCHLEVEL}${GWENHYWFAR_VERSION_TAG}-${GWENHYWFAR_VERSION_BUILD}" GWENHYWFAR_VERSION_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL" # The version number for the plugin/ct/ohbci/ohbci.la OHBCI_VERSION_STRING="0.1.0" ###------------------------------------------------------------------------- # # Create release strings # case "$GWENHYWFAR_VERSION_TAG" in cvs|svn|git) GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL.${GWENHYWFAR_VERSION_BUILD}" ;; stable) GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL" ;; *) GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL" # add TAG GWENHYWFAR_VERSION_RELEASE_STRING="${GWENHYWFAR_VERSION_RELEASE_STRING}${GWENHYWFAR_VERSION_TAG}" ;; esac printf "%s\n" "#define GWENHYWFAR_VERSION_MAJOR $GWENHYWFAR_VERSION_MAJOR" >>confdefs.h printf "%s\n" "#define GWENHYWFAR_VERSION_MINOR $GWENHYWFAR_VERSION_MINOR" >>confdefs.h printf "%s\n" "#define GWENHYWFAR_VERSION_PATCHLEVEL $GWENHYWFAR_VERSION_PATCHLEVEL" >>confdefs.h printf "%s\n" "#define GWENHYWFAR_VERSION_BUILD $GWENHYWFAR_VERSION_BUILD" >>confdefs.h printf "%s\n" "#define GWENHYWFAR_VERSION_STRING \"$GWENHYWFAR_VERSION_STRING\"" >>confdefs.h printf "%s\n" "#define GWENHYWFAR_VERSION_FULL_STRING \"$GWENHYWFAR_VERSION_FULL_STRING\"" >>confdefs.h printf "%s\n" "#define GWENHYWFAR_VERSION_TAG $GWENHYWFAR_VERSION_TAG" >>confdefs.h am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=gwenhywfar VERSION=$GWENHYWFAR_VERSION_RELEASE_STRING printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ###------------------------------------------------------------------------- # # SO version for GwenUI # GWENUI_SO_CURRENT="1" GWENUI_SO_REVISION="1" GWENUI_SO_AGE="0" GWENUI_SO_EFFECTIVE="`echo \$(($GWENUI_SO_CURRENT-$GWENUI_SO_AGE))`" ###------------------------------------------------------------------------- # # SO version for GwenPP # GWENPP_SO_CURRENT="16" GWENPP_SO_REVISION="0" GWENPP_SO_AGE="0" GWENPP_SO_EFFECTIVE="`echo \$(($GWENPP_SO_CURRENT-$GWENPP_SO_AGE))`" ###------------------------------------------------------------------------- # check for OS # check for OS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } OSYSTEM="" OS_TYPE="" MAKE_DLL_TARGET="" INSTALL_DLL_TARGET="" printf "%s\n" "#define OS_NAME \"$host\"" >>confdefs.h case "$host" in *-linux*) OSYSTEM="linux" printf "%s\n" "#define OS_LINUX 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-solaris*) OSYSTEM="solaris" printf "%s\n" "#define OS_SOLARIS 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-darwin*) OSYSTEM="osx" printf "%s\n" "#define OS_DARWIN 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-openbsd*) OSYSTEM="openbsd" printf "%s\n" "#define OS_OPENBSD 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-freebsd* | *-kfreebsd*) OSYSTEM="freebsd" printf "%s\n" "#define OS_FREEBSD 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-netbsd*) OSYSTEM="netbsd" printf "%s\n" "#define OS_NETBSD 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-beos*) OSYSTEM="beos" printf "%s\n" "#define OS_BEOS 1" >>confdefs.h printf "%s\n" "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-win32*) OSYSTEM="windows" printf "%s\n" "#define OS_WIN32 1" >>confdefs.h OS_TYPE="windows" printf "%s\n" "#define BUILDING_DLL 1" >>confdefs.h MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-mingw32*) OSYSTEM="windows" printf "%s\n" "#define OS_WIN32 1" >>confdefs.h OS_TYPE="windows" printf "%s\n" "#define BUILDING_DLL 1" >>confdefs.h MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-palmos*) OSYSTEM="palmos" printf "%s\n" "#define OS_PALMOS 1" >>confdefs.h OS_TYPE="palmos" ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, but host $host is not supported. Please report if it works anyway. We will assume that your system is a posix system and continue." >&5 printf "%s\n" "$as_me: WARNING: Sorry, but host $host is not supported. Please report if it works anyway. We will assume that your system is a posix system and continue." >&2;} OSYSTEM="unknown" OS_TYPE="posix" printf "%s\n" "#define OS_POSIX 1" >>confdefs.h ;; esac printf "%s\n" "#define OS_SHORTNAME \"$OSYSTEM\"" >>confdefs.h printf "%s\n" "#define OS_TYPE \"$OS_TYPE\"" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OS_TYPE" >&5 printf "%s\n" "$OS_TYPE" >&6; } if test "$OSYSTEM" = "osx"; then COCOA_FRAMEWORK="-framework Cocoa" FOUNDATION_FRAMEWORK="-framework CoreFoundation" SYSCONF_FRAMEWORK="-framework SystemConfiguration" APPKIT_FRAMEWORK="-framework AppKit" COREDATA_FRAMEWORK="-framework CoreData" WEBKIT_FRAMEWORK="-framework WebKit" fi ###------------------------------------------------------------------------- # prefix handling if test "x$prefix" = "xNONE"; then prefix=$ac_default_prefix ac_configure_args="$ac_configure_args --prefix $prefix" fi ###------------------------------------------------------------------------- # # static/shared handling # # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop enable_static=no fi # Check whether --enable-shared was given. if test ${enable_shared+y} then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop enable_shared=yes fi ###------------------------------------------------------------------------- # # Checks for programs. # ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 printf "%s\n" "$CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 printf "%s\n" "$ac_ct_CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+y} ac_save_CXXFLAGS=$CXXFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes else $as_nop CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : else $as_nop ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } if test $ac_test_CXXFLAGS; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_prog_cxx_stdcxx=no if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx11_program _ACEOF for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx11" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 ac_prog_cxx_stdcxx=cxx11 fi fi if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx98_program _ACEOF for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx98=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx98" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 ac_prog_cxx_stdcxx=cxx98 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CXX_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else $as_nop # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=m ac_cpp='$OBJCPP $CPPFLAGS' ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_objc_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in gcc objcc objc cc CC clang do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OBJC"; then ac_cv_prog_OBJC="$OBJC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJC=$ac_cv_prog_OBJC if test -n "$OBJC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 printf "%s\n" "$OBJC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$OBJC" && break done fi if test -z "$OBJC"; then ac_ct_OBJC=$OBJC for ac_prog in gcc objcc objc cc CC clang do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OBJC"; then ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC if test -n "$ac_ct_OBJC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 printf "%s\n" "$ac_ct_OBJC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_OBJC" && break done if test "x$ac_ct_OBJC" = x; then OBJC="gcc" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJC=$ac_ct_OBJC fi fi # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Objective C" >&5 printf %s "checking whether the compiler supports GNU Objective C... " >&6; } if test ${ac_cv_objc_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_objc_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 printf "%s\n" "$ac_cv_objc_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_objc_compiler_gnu if test $ac_compiler_gnu = yes; then GOBJC=yes else GOBJC= fi ac_test_OBJCFLAGS=${OBJCFLAGS+y} ac_save_OBJCFLAGS=$OBJCFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 printf %s "checking whether $OBJC accepts -g... " >&6; } if test ${ac_cv_prog_objc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_objc_werror_flag=$ac_objc_werror_flag ac_objc_werror_flag=yes ac_cv_prog_objc_g=no OBJCFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO" then : ac_cv_prog_objc_g=yes else $as_nop OBJCFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO" then : else $as_nop ac_objc_werror_flag=$ac_save_objc_werror_flag OBJCFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO" then : ac_cv_prog_objc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_objc_werror_flag=$ac_save_objc_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 printf "%s\n" "$ac_cv_prog_objc_g" >&6; } if test $ac_test_OBJCFLAGS; then OBJCFLAGS=$ac_save_OBJCFLAGS elif test $ac_cv_prog_objc_g = yes; then if test "$GOBJC" = yes; then OBJCFLAGS="-g -O2" else OBJCFLAGS="-g" fi else if test "$GOBJC" = yes; then OBJCFLAGS="-O2" else OBJCFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$OBJC" am_compiler_list='gcc3 gcc' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_OBJC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_OBJC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_OBJC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_OBJC_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_OBJC_dependencies_compiler_type" >&6; } OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then am__fastdepOBJC_TRUE= am__fastdepOBJC_FALSE='#' else am__fastdepOBJC_TRUE='#' am__fastdepOBJC_FALSE= fi #AC_PROG_OBJCXX #AC_PROG_OBJCXXCPP case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.7' macro_revision='2.4.7' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in fgrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else $as_nop i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_reload_flag='-r' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. set dummy ${ac_tool_prefix}file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FILECMD="${ac_tool_prefix}file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 printf "%s\n" "$FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_FILECMD"; then ac_ct_FILECMD=$FILECMD # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_FILECMD+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_FILECMD"; then ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FILECMD="file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD if test -n "$ac_ct_FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 printf "%s\n" "$ac_ct_FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_FILECMD" = x; then FILECMD=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FILECMD=$ac_ct_FILECMD fi else FILECMD="$ac_cv_prog_FILECMD" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else $as_nop with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else $as_nop lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_mainfest_tool+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else $as_nop lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop pic_mode=default fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else $as_nop if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes else $as_nop lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char shl_load (); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else $as_nop ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else $as_nop ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dld_link (); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else $as_nop ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 printf %s "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test ${ac_cv_prog_CXXCPP+y} then : printf %s "(cached) " >&6 else $as_nop # Double quotes because $CXX needs to be expanded for CXXCPP in "$CXX -E" cpp /lib/cpp do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 printf "%s\n" "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath__CXX+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath__CXX+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl* | ,icl* | no,icl*) # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes file_list_spec_CXX='@' ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test ${lt_cv_prog_compiler_pic_works_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc_CXX+y} then : printf %s "(cached) " >&6 else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 printf "%s\n" "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 printf "%s\n" "$AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 printf "%s\n" "$ac_ct_AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RC="${ac_tool_prefix}windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 printf "%s\n" "$RC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RC"; then ac_ct_RC=$RC # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_RC"; then ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RC="windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 printf "%s\n" "$ac_ct_RC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RC" = x; then RC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RC=$ac_ct_RC fi else RC="$ac_cv_prog_RC" fi # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC compiler_RC=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result lt_cv_prog_compiler_c_o_RC=yes if test -n "$compiler"; then : fi GCC=$lt_save_GCC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS # Newer libtool doesn't have AC_LIBTOOL_RC anymore. Need to check for # $(RC) by ourselves. if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RC="${ac_tool_prefix}windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 printf "%s\n" "$RC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RC"; then ac_ct_RC=$RC # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_RC"; then ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RC="windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 printf "%s\n" "$ac_ct_RC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RC" = x; then RC="no" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RC=$ac_ct_RC fi else RC="$ac_cv_prog_RC" fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_USE_DOT+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$USE_DOT"; then ac_cv_prog_USE_DOT="$USE_DOT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_USE_DOT="YES" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_USE_DOT" && ac_cv_prog_USE_DOT="NO" fi fi USE_DOT=$ac_cv_prog_USE_DOT if test -n "$USE_DOT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_DOT" >&5 printf "%s\n" "$USE_DOT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_SED+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$SED"; then ac_cv_prog_SED="$SED" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_SED="sed" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi SED=$ac_cv_prog_SED if test -n "$SED"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 printf "%s\n" "$SED" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Check for the tool "astyle", but if not found, replace its program call by the no-op "echo" instead # Extract the first word of "astyle", so it can be a program name with args. set dummy astyle; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ASTYLE+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ASTYLE"; then ac_cv_prog_ASTYLE="$ASTYLE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ASTYLE="astyle" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_ASTYLE" && ac_cv_prog_ASTYLE="echo" fi fi ASTYLE=$ac_cv_prog_ASTYLE if test -n "$ASTYLE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ASTYLE" >&5 printf "%s\n" "$ASTYLE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test x$cross_compiling = xyes; then CROSS_COMPILING_TRUE= CROSS_COMPILING_FALSE='#' else CROSS_COMPILING_TRUE='#' CROSS_COMPILING_FALSE= fi ###------------------------------------------------------------------------- # # Checks for libraries. # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h LIBS="-ldl $LIBS" fi # note: this AC_CHECK_LIB will also add -ldl to LIBS. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then ax_pthread_save_CC="$CC" ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" if test "x$PTHREAD_CC" != "x" then : CC="$PTHREAD_CC" fi CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_join (); int main (void) { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi CC="$ax_pthread_save_CC" CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 # (Note: HP C rejects this with "bad form for `-t' option") # -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads and # -D_REENTRANT too), HP C (must be checked before -lpthread, which # is present but should not be used directly; and before -mthreads, # because the compiler interprets this as "-mt" + "-hreads") # -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case $host_os in freebsd*) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) ax_pthread_flags="-kthread lthread $ax_pthread_flags" ;; hpux*) # From the cc(1) man page: "[-mt] Sets various -D flags to enable # multi-threading and also sets -lpthread." ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" ;; openedition*) # IBM z/OS requires a feature-test macro to be defined in order to # enable POSIX threads at all, so give the user a hint if this is # not set. (We don't define these ourselves, as they can affect # other portions of the system API in unpredictable ways.) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) AX_PTHREAD_ZOS_MISSING # endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} fi rm -rf conftest* ;; solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (N.B.: The stubs are missing # pthread_cleanup_push, or rather a function called by this macro, # so we could check for that, but who knows whether they'll stub # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" ;; esac # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) if test "x$GCC" = "xyes" then : ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" fi # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is # correctly enabled case $host_os in darwin* | hpux* | linux* | osf* | solaris*) ax_pthread_check_macro="_REENTRANT" ;; aix*) ax_pthread_check_macro="_THREAD_SAFE" ;; *) ax_pthread_check_macro="--" ;; esac if test "x$ax_pthread_check_macro" = "x--" then : ax_pthread_check_cond=0 else $as_nop ax_pthread_check_cond="!defined($ax_pthread_check_macro)" fi # Are we compiling with Clang? { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 printf %s "checking whether $CC is Clang... " >&6; } if test ${ax_cv_PTHREAD_CLANG+y} then : printf %s "(cached) " >&6 else $as_nop ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ # if defined(__clang__) && defined(__llvm__) AX_PTHREAD_CC_IS_CLANG # endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 then : ax_cv_PTHREAD_CLANG=yes fi rm -rf conftest* fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } ax_pthread_clang="$ax_cv_PTHREAD_CLANG" ax_pthread_clang_warning=no # Clang needs special handling, because older versions handle the -pthread # option in a rather... idiosyncratic way if test "x$ax_pthread_clang" = "xyes"; then # Clang takes -pthread; it has never supported any other flag # (Note 1: This will need to be revisited if a system that Clang # supports has POSIX threads in a separate library. This tends not # to be the way of modern systems, but it's conceivable.) # (Note 2: On some systems, notably Darwin, -pthread is not needed # to get POSIX threads support; the API is always present and # active. We could reasonably leave PTHREAD_CFLAGS empty. But # -pthread does define _REENTRANT, and while the Darwin headers # ignore this macro, third-party headers might not.) PTHREAD_CFLAGS="-pthread" PTHREAD_LIBS= ax_pthread_ok=yes # However, older versions of Clang make a point of warning the user # that, in an invocation where only linking and no compilation is # taking place, the -pthread option has no effect ("argument unused # during compilation"). They expect -pthread to be passed in only # when source code is being compiled. # # Problem is, this is at odds with the way Automake and most other # C build frameworks function, which is that the same flags used in # compilation (CFLAGS) are also used in linking. Many systems # supported by AX_PTHREAD require exactly this for POSIX threads # support, and in fact it is often not straightforward to specify a # flag that is used only in the compilation phase and not in # linking. Such a scenario is extremely rare in practice. # # Even though use of the -pthread flag in linking would only print # a warning, this can be a nuisance for well-run software projects # that build with -Werror. So if the active version of Clang has # this misfeature, we search for an option to squash it. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} then : printf %s "(cached) " >&6 else $as_nop ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one # (.c -> exe), because the warning occurs only in the second # step ax_pthread_save_ac_link="$ac_link" ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do if test "x$ax_pthread_try" = "xunknown" then : break fi CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" ac_link="$ax_pthread_save_ac_link" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_link="$ax_pthread_2step_ac_link" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO" then : break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_link="$ax_pthread_save_ac_link" CFLAGS="$ax_pthread_save_CFLAGS" if test "x$ax_pthread_try" = "x" then : ax_pthread_try=no fi ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in no | unknown) ;; *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; esac fi # $ax_pthread_clang = yes if test "x$ax_pthread_ok" = "xno"; then for ax_pthread_try_flag in $ax_pthread_flags; do case $ax_pthread_try_flag in none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 printf %s "checking whether pthreads work without any flags... " >&6; } ;; -mt,pthread) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 printf %s "checking whether pthreads work with -mt -lpthread... " >&6; } PTHREAD_CFLAGS="-mt" PTHREAD_LIBS="-lpthread" ;; -*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ax_pthread_config+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ax_pthread_config="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 printf "%s\n" "$ax_pthread_config" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ax_pthread_config" = "xno" then : continue fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include # if $ax_pthread_check_cond # error "$ax_pthread_check_macro must be defined" # endif static void routine(void *a) { a = 0; } static void *start_routine(void *a) { return a; } int main (void) { pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = "xyes" then : break fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$ax_pthread_ok" = "xyes"; then ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 printf %s "checking for joinable pthread attribute... " >&6; } if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} then : printf %s "(cached) " >&6 else $as_nop ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int attr = $ax_pthread_attr; return attr /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ test "x$ax_pthread_joinable_attr_defined" != "xyes" then : printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h ax_pthread_joinable_attr_defined=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 printf %s "checking whether more special flags are required for pthreads... " >&6; } if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} then : printf %s "(cached) " >&6 else $as_nop ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ test "x$ax_pthread_special_flags_added" != "xyes" then : PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" ax_pthread_special_flags_added=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = PTHREAD_PRIO_INHERIT; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_PRIO_INHERIT=yes else $as_nop ax_cv_PTHREAD_PRIO_INHERIT=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ test "x$ax_pthread_prio_inherit_defined" != "xyes" then : printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h ax_pthread_prio_inherit_defined=yes fi CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant if test "x$GCC" != "xyes"; then case $host_os in aix*) case "x/$CC" in #( x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : #handle absolute path differently from PATH based program lookup case "x$CC" in #( x/*) : if as_fn_executable_p ${CC}_r then : PTHREAD_CC="${CC}_r" fi ;; #( *) : for ac_prog in ${CC}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 printf "%s\n" "$PTHREAD_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" ;; esac ;; #( *) : ;; esac ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "x$ax_pthread_ok" = "xyes"; then printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h : else ax_pthread_ok=no fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #AC_CHECK_LIB(rt, sem_init, # [ # rt_libs="-lrt -pthread" # AC_DEFINE(HAVE_LIBRT, "1", [whether librt is available]) # ], [], [-pthread]) #AC_SUBST(rt_libs) # Some systems have iconv in libc, some have it in libiconv (OSF/1 and # those with the standalone portable GNU libiconv installed). Check # which one is available. The define ICONV_CONST will be "" or "const" # accordingly. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 printf %s "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else $as_nop CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test ${enable_rpath+y} then : enableval=$enable_rpath; : else $as_nop enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else $as_nop am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else $as_nop am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes else $as_nop am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 printf %s "checking for iconv declaration... " >&6; } if test ${am_cv_proto_iconv+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : am_cv_proto_iconv_arg1="" else $as_nop am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- }$am_cv_proto_iconv" >&5 printf "%s\n" "${ac_t:- }$am_cv_proto_iconv" >&6; } printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h fi ###------------------------------------------------------------------------- # # Checks for header files. # ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main (void) { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" else $as_nop eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char opendir (); int main (void) { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char opendir (); int main (void) { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" if test "x$ac_cv_header_arpa_inet_h" = xyes then : printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" if test "x$ac_cv_header_netdb_h" = xyes then : printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes then : printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" if test "x$ac_cv_header_strings_h" = xyes then : printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes then : printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" if test "x$ac_cv_header_signal_h" = xyes then : printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" if test "x$ac_cv_header_termios_h" = xyes then : printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" if test "x$ac_cv_header_langinfo_h" = xyes then : printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "localcharset.h" "ac_cv_header_localcharset_h" "$ac_includes_default" if test "x$ac_cv_header_localcharset_h" = xyes then : printf "%s\n" "#define HAVE_LOCALCHARSET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" if test "x$ac_cv_header_iconv_h" = xyes then : printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" if test "x$ac_cv_header_time_h" = xyes then : printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes then : printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes then : printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes then : printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" if test "x$ac_cv_header_sys_wait_h" = xyes then : printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" if test "x$ac_cv_header_regex_h" = xyes then : printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes then : printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" if test "x$ac_cv_header_sys_select_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # Checks for declarations # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else $as_nop ac_cv_c_undeclared_builtin_options=$ac_arg fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See \`config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac ac_fn_check_decl "$LINENO" "sigprocmask" "ac_cv_have_decl_sigprocmask" " #ifdef HAVE_SIGNAL_H # include #endif " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_sigprocmask" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SIGPROCMASK $ac_have_decl" >>confdefs.h ###------------------------------------------------------------------------- # # Checks for typedefs, structures, and compiler characteristics. # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes else $as_nop ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi # Obsolete code to be removed. if test $ac_cv_header_sys_time_h = yes; then printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # End of obsolete code. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h else $as_nop ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # Checks for library functions. # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 printf %s "checking whether closedir returns void... " >&6; } if test ${ac_cv_func_closedir_void+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header_dirent> int main (void) { return closedir(0); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_closedir_void=no else $as_nop ac_cv_func_closedir_void=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 printf "%s\n" "$ac_cv_func_closedir_void" >&6; } if test $ac_cv_func_closedir_void = yes; then printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h fi ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 printf %s "checking for working mktime... " >&6; } if test ${ac_cv_func_working_mktime+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_func_working_mktime=no else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #include #ifdef HAVE_SYS_TIME_H # include #endif #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static const char *tz_strings[] = { (const char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main (void) { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv ((char*) tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_working_mktime=yes else $as_nop ac_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 printf "%s\n" "$ac_cv_func_working_mktime" >&6; } if test $ac_cv_func_working_mktime = no; then case " $LIBOBJS " in *" mktime.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 printf %s "checking types of arguments for select... " >&6; } if test ${ac_cv_func_select_args+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_func_select_args='int,int *,struct timeval *' for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main (void) { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done done done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 printf "%s\n" "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h rm -rf conftest* ac_fn_c_check_func "$LINENO" "gethostbyaddr" "ac_cv_func_gethostbyaddr" if test "x$ac_cv_func_gethostbyaddr" = xyes then : printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes then : printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa" if test "x$ac_cv_func_inet_ntoa" = xyes then : printf "%s\n" "#define HAVE_INET_NTOA 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii" if test "x$ac_cv_func_isascii" = xyes then : printf "%s\n" "#define HAVE_ISASCII 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid" if test "x$ac_cv_func_getpid" = xyes then : printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes then : printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" if test "x$ac_cv_func_memset" = xyes then : printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" if test "x$ac_cv_func_select" = xyes then : printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" if test "x$ac_cv_func_socket" = xyes then : printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" if test "x$ac_cv_func_strchr" = xyes then : printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" if test "x$ac_cv_func_strdup" = xyes then : printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes then : printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "symlink" "ac_cv_func_symlink" if test "x$ac_cv_func_symlink" = xyes then : printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes then : printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom" if test "x$ac_cv_func_srandom" = xyes then : printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" if test "x$ac_cv_func_random" = xyes then : printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h fi # Init binreloc # Check whether --enable-binreloc was given. if test ${enable_binreloc+y} then : enableval=$enable_binreloc; enable_binreloc=$enableval else $as_nop enable_binreloc=auto fi # Check whether --enable-binreloc-threads was given. if test ${enable_binreloc_threads+y} then : enableval=$enable_binreloc_threads; enable_binreloc_threads=$enableval else $as_nop enable_binreloc_threads=yes fi BINRELOC_CFLAGS= BINRELOC_LIBS= if test "x$enable_binreloc" = "xauto"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc/self/maps" >&5 printf %s "checking for /proc/self/maps... " >&6; } if test ${ac_cv_file__proc_self_maps+y} then : printf %s "(cached) " >&6 else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/proc/self/maps"; then ac_cv_file__proc_self_maps=yes else ac_cv_file__proc_self_maps=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__proc_self_maps" >&5 printf "%s\n" "$ac_cv_file__proc_self_maps" >&6; } if test "x$ac_cv_file__proc_self_maps" = xyes then : fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether everything is installed to the same prefix" >&5 printf %s "checking whether everything is installed to the same prefix... " >&6; } if test ${br_cv_valid_prefixes+y} then : printf %s "(cached) " >&6 else $as_nop # datarootdir variables was introduced with autoconf-2.60 if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \ \( "$datadir" = '${prefix}/share' -o \( "$datadir" = '${datarootdir}' -a "$datarootdir" = '${prefix}/share' \) \) -a \ "$libdir" = '${exec_prefix}/lib' -a \ "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc' then br_cv_valid_prefixes=yes else br_cv_valid_prefixes=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $br_cv_valid_prefixes" >&5 printf "%s\n" "$br_cv_valid_prefixes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether binary relocation support should be enabled" >&5 printf %s "checking whether binary relocation support should be enabled... " >&6; } if test ${br_cv_binreloc+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$enable_binreloc" = "xyes"; then br_cv_binreloc=yes elif test "x$enable_binreloc" = "xauto"; then if test "x$br_cv_valid_prefixes" = "xyes" -a \ "x$ac_cv_file__proc_self_maps" = "xyes"; then br_cv_binreloc=yes else br_cv_binreloc=no fi else br_cv_binreloc=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $br_cv_binreloc" >&5 printf "%s\n" "$br_cv_binreloc" >&6; } if test "x$br_cv_binreloc" = "xyes"; then BINRELOC_CFLAGS="-DENABLE_BINRELOC" printf "%s\n" "#define ENABLE_BINRELOC /**/" >>confdefs.h if test "x$enable_binreloc_threads" = "xyes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_getspecific in -lpthread" >&5 printf %s "checking for pthread_getspecific in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_getspecific+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_getspecific (); int main (void) { return pthread_getspecific (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_getspecific=yes else $as_nop ac_cv_lib_pthread_pthread_getspecific=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_getspecific" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_getspecific" >&6; } if test "x$ac_cv_lib_pthread_pthread_getspecific" = xyes then : printf "%s\n" "#define HAVE_LIBPTHREAD 1" >>confdefs.h LIBS="-lpthread $LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether binary relocation should use threads" >&5 printf %s "checking whether binary relocation should use threads... " >&6; } if test ${br_cv_binreloc_threads+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$enable_binreloc_threads" = "xyes"; then if test "x$ac_cv_lib_pthread_pthread_getspecific" = "xyes"; then br_cv_binreloc_threads=yes else br_cv_binreloc_threads=no fi else br_cv_binreloc_threads=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $br_cv_binreloc_threads" >&5 printf "%s\n" "$br_cv_binreloc_threads" >&6; } if test "x$br_cv_binreloc_threads" = "xyes"; then BINRELOC_LIBS="-lpthread" printf "%s\n" "#define BR_PTHREAD 1" >>confdefs.h else BINRELOC_CFLAGS="$BINRELOC_CFLAGS -DBR_PTHREADS=0" printf "%s\n" "#define BR_PTHREAD 0" >>confdefs.h fi fi ###------------------------------------------------------------------------- # # check whether gwen is a subproject to another one # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gwen is a subproject" >&5 printf %s "checking if gwen is a subproject... " >&6; } # Check whether --enable-gwen-subproject was given. if test ${enable_gwen_subproject+y} then : enableval=$enable_gwen_subproject; enable_gwen_subproject="$enableval" else $as_nop enable_gwen_subproject="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gwen_subproject" >&5 printf "%s\n" "$enable_gwen_subproject" >&6; } if test "$enable_gwen_subproject" != "no"; then printf "%s\n" "#define GWENHYWFAR_IS_SUBPROJECT 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # check whether accompanying certificates should be used # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system-wide trusted certificates should be set" >&5 printf %s "checking whether system-wide trusted certificates should be set... " >&6; } # Check whether --enable-system-certs was given. if test ${enable_system_certs+y} then : enableval=$enable_system_certs; enable_system_certs="$enableval" else $as_nop enable_system_certs="yes" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_system_certs" >&5 printf "%s\n" "$enable_system_certs" >&6; } if test "$enable_system_certs" != "no"; then printf "%s\n" "#define GWEN_TLS_USE_SYSTEM_CERTIFICATES 1" >>confdefs.h fi if test "$enable_system_certs" = "no"; then INSTALL_CERTS_TRUE= INSTALL_CERTS_FALSE='#' else INSTALL_CERTS_TRUE='#' INSTALL_CERTS_FALSE= fi ###------------------------------------------------------------------------- # # check whether 'make check' should run checks that depend on network connectivity # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking network connectivity can be assumed available during 'make check'" >&5 printf %s "checking network connectivity can be assumed available during 'make check'... " >&6; } # Check whether --enable-network-checks was given. if test ${enable_network_checks+y} then : enableval=$enable_network_checks; enable_gwen_network_checks="$enableval" else $as_nop enable_gwen_network_checks="yes" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gwen_network_checks" >&5 printf "%s\n" "$enable_gwen_network_checks" >&6; } if test "$enable_gwen_network_checks" = "no"; then printf "%s\n" "#define GWENHYWFAR_SKIP_NETWORK_CHECKS 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # check whether test code should be enabled # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable test code" >&5 printf %s "checking whether to enable test code... " >&6; } # Check whether --enable-testcode was given. if test ${enable_testcode+y} then : enableval=$enable_testcode; enable_testcode="$enableval" else $as_nop enable_testcode="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_testcode" >&5 printf "%s\n" "$enable_testcode" >&6; } if test "$enable_testcode" != "no"; then printf "%s\n" "#define GWENHYWFAR_ENABLE_TESTCODE 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # check whether local installation mode is enabled # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether local installation mode is wanted" >&5 printf %s "checking whether local installation mode is wanted... " >&6; } # Check whether --enable-local-install was given. if test ${enable_local_install+y} then : enableval=$enable_local_install; enable_local_install="$enableval" else $as_nop enable_local_install="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_local_install" >&5 printf "%s\n" "$enable_local_install" >&6; } if test "$enable_local_install" != "no"; then printf "%s\n" "#define ENABLE_LOCAL_INSTALL 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # OS dependant settings # # Common settings for all OSs gwenhywfar_bindir="\${bindir}" gwenhywfar_libs="-lgwenhywfar" gwenhywfar_ldflags="-L\${libdir}" gwenhywfar_internal_libname="libgwenhywfar.la" gwenhywfar_headerdir_am="\$(includedir)/gwenhywfar5" gwenhywfar_headerdir="\${includedir}/gwenhywfar5" gwenhywfar_plugindir="\${libdir}/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}" gwenhywfar_symlinkdir="\$(top_builddir)/gwenhywfar5" gwenhywfar_datadir="\${datadir}/gwenhywfar" gwenhywfar_sysdatadir="\${datadir}" # Now the specific settings case "$OS_TYPE" in posix) gwenhywfar_sys_is_windows=0 gwenhywfar_os_lib="os/posix/libos.la" GWEN_OS="posix" # add special libraries for solaris if test "$OSYSTEM" = "solaris"; then all_libraries="${all_libraries} -lresolv -lsocket" PROG_LIBRARIES="${PROG_LIBRARIES} -lresolv -lsocket" fi # add special libraries for darwin if test "$OSYSTEM" = "osx"; then # hmm, this should be detected by the GETTEXT macro... #PROG_LIBRARIES="${PROG_LIBRARIES} -lintl" # for local install mode on Mac OS X link with the CoreFoundation framework if test "$enable_local_install" != "no"; then all_libraries="${all_libraries} -framework CoreFoundation" fi fi gwenbuild_tool="gwenbuild" ;; windows) gwenhywfar_sys_is_windows=1 gwenhywfar_os_lib="os/windows/libos.la" GWEN_OS="windows" all_libraries="${all_libraries} -lwsock32" gwenbuild_tool="" ;; *) as_fn_error $? "**** Unknown operating system type" "$LINENO" 5 ;; esac if test "$OS_TYPE" = "windows"; then IS_WINDOWS_TRUE= IS_WINDOWS_FALSE='#' else IS_WINDOWS_TRUE='#' IS_WINDOWS_FALSE= fi ###------------------------------------------------------------------------- # # check plugin search path # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking plugin search dir" >&5 printf %s "checking plugin search dir... " >&6; } # Check whether --with-plugin-searchdir was given. if test ${with_plugin_searchdir+y} then : withval=$with_plugin_searchdir; gwenhywfar_plugin_searchdir="$withval" else $as_nop gwenhywfar_plugin_searchdir="" fi if test -z "${gwenhywfar_plugin_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_plugin_searchdir="lib/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}" else if test "$enable_local_install" != "no"; then gwenhywfar_plugin_searchdir="lib/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}" else gwenhywfar_plugin_searchdir="$gwenhywfar_plugindir" fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwenhywfar_plugin_searchdir" >&5 printf "%s\n" "$gwenhywfar_plugin_searchdir" >&6; } ###------------------------------------------------------------------------- # # check data search dir # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking data search dir" >&5 printf %s "checking data search dir... " >&6; } # Check whether --with-data-searchdir was given. if test ${with_data_searchdir+y} then : withval=$with_data_searchdir; gwenhywfar_data_searchdir="$withval" else $as_nop gwenhywfar_data_searchdir="" fi if test -z "${gwenhywfar_data_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_data_searchdir="share/gwenhywfar" else if test "$enable_local_install" != "no"; then gwenhywfar_data_searchdir="share/gwenhywfar" else gwenhywfar_data_searchdir="$gwenhywfar_datadir" fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwenhywfar_data_searchdir" >&5 printf "%s\n" "$gwenhywfar_data_searchdir" >&6; } ###------------------------------------------------------------------------- # # check system data search dir # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system data search dir" >&5 printf %s "checking system data search dir... " >&6; } # Check whether --with-sysdata-searchdir was given. if test ${with_sysdata_searchdir+y} then : withval=$with_sysdata_searchdir; gwenhywfar_sysdata_searchdir="$withval" else $as_nop gwenhywfar_sysdata_searchdir="" fi if test -z "${gwenhywfar_sysdata_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_sysdata_searchdir="share" else if test "$enable_local_install" != "no"; then gwenhywfar_sysdata_searchdir="share" else gwenhywfar_sysdata_searchdir="$gwenhywfar_sysdatadir" fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwenhywfar_sysdata_searchdir" >&5 printf "%s\n" "$gwenhywfar_sysdata_searchdir" >&6; } ###------------------------------------------------------------------------- # # check locale search dir # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking locale search dir" >&5 printf %s "checking locale search dir... " >&6; } # Check whether --with-locale-searchdir was given. if test ${with_locale_searchdir+y} then : withval=$with_locale_searchdir; gwenhywfar_locale_searchdir="$withval" else $as_nop gwenhywfar_locale_searchdir="" fi if test -z "${gwenhywfar_locale_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_locale_searchdir="share/locale" else if test "$enable_local_install" != "no"; then gwenhywfar_locale_searchdir="share/locale" else gwenhywfar_locale_searchdir="\$(localedir)" fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwenhywfar_locale_searchdir" >&5 printf "%s\n" "$gwenhywfar_locale_searchdir" >&6; } ###------------------------------------------------------------------------- # # check cfg search dir # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking cfg search dir" >&5 printf %s "checking cfg search dir... " >&6; } # Check whether --with-cfg-searchdir was given. if test ${with_cfg_searchdir+y} then : withval=$with_cfg_searchdir; gwenhywfar_cfg_searchdir="$withval" else $as_nop gwenhywfar_cfg_searchdir="" fi if test -z "$gwenhywfar_cfg_searchdir"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_cfg_searchdir="etc" else if test "$enable_local_install" != "no"; then gwenhywfar_cfg_searchdir="etc" else gwenhywfar_cfg_searchdir="\$(sysconfdir)" fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwenhywfar_cfg_searchdir" >&5 printf "%s\n" "$gwenhywfar_cfg_searchdir" >&6; } ###------------------------------------------------------------------------- # # check whether variadic macros should be supported # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiling with variadic macros" >&5 printf %s "checking if compiling with variadic macros... " >&6; } # Check whether --enable-variadic-macros was given. if test ${enable_variadic_macros+y} then : enableval=$enable_variadic_macros; enable_variadic_macros="$enableval" else $as_nop enable_variadic_macros="yes" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_variadic_macros" >&5 printf "%s\n" "$enable_variadic_macros" >&6; } if test "x$enable_variadic_macros" = "xno"; then printf "%s\n" "#define NO_VARIADIC_MACROS 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # check whether profiling is to be supported # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if profiling is to be supported" >&5 printf %s "checking if profiling is to be supported... " >&6; } # Check whether --enable-profiling was given. if test ${enable_profiling+y} then : enableval=$enable_profiling; enable_profiling="$enableval" else $as_nop enable_profiling="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 printf "%s\n" "$enable_profiling" >&6; } if test "x$enable_profiling" = "xyes"; then PROFILING_CFLAGS="-pg" PROFILING_LDFLAGS="-pg" else PROFILING_CFLAGS="" PROFILING_LDFLAGS="" fi ###------------------------------------------------------------------------- # # check for Debian multiarch paths # if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dpkg-architecture", so it can be a program name with args. set dummy ${ac_tool_prefix}dpkg-architecture; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DPKG_ARCH+y} then : printf %s "(cached) " >&6 else $as_nop case $DPKG_ARCH in [\\/]* | ?:[\\/]*) ac_cv_path_DPKG_ARCH="$DPKG_ARCH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DPKG_ARCH="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DPKG_ARCH=$ac_cv_path_DPKG_ARCH if test -n "$DPKG_ARCH"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DPKG_ARCH" >&5 printf "%s\n" "$DPKG_ARCH" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_DPKG_ARCH"; then ac_pt_DPKG_ARCH=$DPKG_ARCH # Extract the first word of "dpkg-architecture", so it can be a program name with args. set dummy dpkg-architecture; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_DPKG_ARCH+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_DPKG_ARCH in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DPKG_ARCH="$ac_pt_DPKG_ARCH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DPKG_ARCH="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DPKG_ARCH=$ac_cv_path_ac_pt_DPKG_ARCH if test -n "$ac_pt_DPKG_ARCH"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DPKG_ARCH" >&5 printf "%s\n" "$ac_pt_DPKG_ARCH" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_DPKG_ARCH" = x; then DPKG_ARCH="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DPKG_ARCH=$ac_pt_DPKG_ARCH fi else DPKG_ARCH="$ac_cv_path_DPKG_ARCH" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multiarch paths" >&5 printf %s "checking for multiarch paths... " >&6; } multiarch_triplet="" DEBIAN_MULTIARCH_DIRS="" if test -n "$DPKG_ARCH"; then multiarch_triplet=$($DPKG_ARCH -qDEB_HOST_MULTIARCH 2> /dev/null) if test -z "$multiarch_triplet"; then multiarch_triplet=$($DPKG_ARCH -qDEB_HOST_GNU_TYPE) fi fi if test -n "$multiarch_triplet"; then DEBIAN_MULTIARCH_DIRS="/lib/$multiarch_triplet /usr/lib/$multiarch_triplet" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEBIAN_MULTIARCH_DIRS" >&5 printf "%s\n" "$DEBIAN_MULTIARCH_DIRS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi ###------------------------------------------------------------------------- # # check for libgcrypt # NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.2.0 printf "%s\n" "#define NEED_LIBGCRYPT_VERSION \"$NEED_LIBGCRYPT_VERSION\"" >>confdefs.h case "$OS_TYPE" in windows) LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="-lgcrypt" ;; *) # Check whether --with-libgcrypt-prefix was given. if test ${with_libgcrypt_prefix+y} then : withval=$with_libgcrypt_prefix; libgcrypt_config_prefix="$withval" else $as_nop libgcrypt_config_prefix="" fi if test x"${LIBGCRYPT_CONFIG}" = x ; then if test x"${libgcrypt_config_prefix}" != x ; then LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" fi fi use_gpgrt_config="" if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if $GPGRT_CONFIG libgcrypt --exists; then LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as libgcrypt-config" >&5 printf "%s\n" "$as_me: Use gpgrt-config as libgcrypt-config" >&6;} use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then if test x"${LIBGCRYPT_CONFIG}" = x ; then case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/libgcrypt-config" ; then LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" fi ;; '') ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5 printf "%s\n" "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;} ;; esac fi # Extract the first word of "libgcrypt-config", so it can be a program name with args. set dummy libgcrypt-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_LIBGCRYPT_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $LIBGCRYPT_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_LIBGCRYPT_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no" ;; esac fi LIBGCRYPT_CONFIG=$ac_cv_path_LIBGCRYPT_CONFIG if test -n "$LIBGCRYPT_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5 printf "%s\n" "$LIBGCRYPT_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi tmp="$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION" if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_libgcrypt_api=0 min_libgcrypt_version="$tmp" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBGCRYPT - version >= $min_libgcrypt_version" >&5 printf %s "checking for LIBGCRYPT - version >= $min_libgcrypt_version... " >&6; } ok=no if test "$LIBGCRYPT_CONFIG" != "no" ; then req_major=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` if test -z "$use_gpgrt_config"; then libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` else libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` fi major=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` micro=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes else if test "$minor" -eq "$req_minor"; then if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($libgcrypt_config_version)" >&5 printf "%s\n" "yes ($libgcrypt_config_version)" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test $ok = yes; then # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` else tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBGCRYPT API version" >&5 printf %s "checking LIBGCRYPT API version... " >&6; } if test "$req_libgcrypt_api" -eq "$tmp" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: okay" >&5 printf "%s\n" "okay" >&6; } else ok=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: does not match. want=$req_libgcrypt_api got=$tmp" >&5 printf "%s\n" "does not match. want=$req_libgcrypt_api got=$tmp" >&6; } fi fi fi fi if test $ok = yes; then LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` have_gcrypt="yes" if test -z "$use_gpgrt_config"; then libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` else libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** *** The config script \"$LIBGCRYPT_CONFIG\" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&5 printf "%s\n" "$as_me: WARNING: *** *** The config script \"$LIBGCRYPT_CONFIG\" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&2;} gpg_config_script_warn="$gpg_config_script_warn libgcrypt" fi fi else LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" have_gcrypt="no" fi if test "$have_gcrypt" != "yes"; then as_fn_error $? " **** Libgcrypt is required for Gwenhywfar. Please install it (including devel packages) **** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)" "$LINENO" 5 fi ;; esac ###------------------------------------------------------------------------- # # check for library for common error values and messages in GnuPG components # if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpg-error" >&5 printf %s "checking for gpg-error... " >&6; } if test -n "$GPG_ERROR_CFLAGS"; then pkg_cv_GPG_ERROR_CFLAGS="$GPG_ERROR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gpg-error\""; } >&5 ($PKG_CONFIG --exists --print-errors "gpg-error") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GPG_ERROR_CFLAGS=`$PKG_CONFIG --cflags "gpg-error" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GPG_ERROR_LIBS"; then pkg_cv_GPG_ERROR_LIBS="$GPG_ERROR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gpg-error\""; } >&5 ($PKG_CONFIG --exists --print-errors "gpg-error") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GPG_ERROR_LIBS=`$PKG_CONFIG --libs "gpg-error" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GPG_ERROR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gpg-error" 2>&1` else GPG_ERROR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gpg-error" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GPG_ERROR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gpg-error) were not met: $GPG_ERROR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GPG_ERROR_CFLAGS and GPG_ERROR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GPG_ERROR_CFLAGS and GPG_ERROR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GPG_ERROR_CFLAGS=$pkg_cv_GPG_ERROR_CFLAGS GPG_ERROR_LIBS=$pkg_cv_GPG_ERROR_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi ###------------------------------------------------------------------------- # # check for libgnutls # pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.9.8" >&5 printf %s "checking for gnutls >= 2.9.8... " >&6; } if test -n "$LIBGNUTLS_CFLAGS"; then pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.9.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.9.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.9.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGNUTLS_LIBS"; then pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.9.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.9.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.9.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 2.9.8" 2>&1` else LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 2.9.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGNUTLS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gnutls >= 2.9.8) were not met: $LIBGNUTLS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBGNUTLS_CFLAGS=$pkg_cv_LIBGNUTLS_CFLAGS LIBGNUTLS_LIBS=$pkg_cv_LIBGNUTLS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi ###------------------------------------------------------------------------- # # check for OpenSSL # pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5 printf %s "checking for openssl... " >&6; } if test -n "$OPENSSL_CFLAGS"; then pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OPENSSL_LIBS"; then pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1` else OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENSSL_PKG_ERRORS" >&5 ssl_available=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ssl_available=no else OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ssl_available=yes fi if test "$ssl_available" = "yes"; then printf "%s\n" "#define HAVE_OPENSSL 1" >>confdefs.h fi if test "$ssl_available" = "yes"; then IF_HAVE_OPENSSL_TRUE= IF_HAVE_OPENSSL_FALSE='#' else IF_HAVE_OPENSSL_TRUE='#' IF_HAVE_OPENSSL_FALSE= fi ###------------------------------------------------------------------------- # check for Distribution { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for preselected distribution name" >&5 printf %s "checking for preselected distribution name... " >&6; } if test -n "$aq_distrib_name"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $aq_distrib_name" >&5 printf "%s\n" "yes, $aq_distrib_name" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, will have to determine it" >&5 printf "%s\n" "no, will have to determine it" >&6; } aq_distrib_name="" aq_distrib_version="" aq_distrib_tag="" # Debian-style { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this is a Debian derivate" >&5 printf %s "checking whether this is a Debian derivate... " >&6; } case `basename $CC` in gcc | gcc-* | *-gcc | *-gcc-*) debtype="` ${CC} --version | head -1`" case $debtype in *\(Debian\ *) aq_distrib_name="Debian" aq_distrib_tag="debian" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $aq_distrib_name" >&5 printf "%s\n" "yes, $aq_distrib_name" >&6; } ;; *\(Ubuntu\ * | *\(KUbuntu\ *) aq_distrib_name="Ubuntu" aq_distrib_tag="ubuntu" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $aq_distrib_name" >&5 printf "%s\n" "yes, $aq_distrib_name" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi if test -z "$aq_distrib_name"; then # RPM-style { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this is an RPM distribution" >&5 printf %s "checking whether this is an RPM distribution... " >&6; } RPM_COMMAND="`which rpm`" aq_distrib_name="" aq_distrib_tag="" aq_distrib_version="" if test -n "${RPM_COMMAND}"; then if test -x "${RPM_COMMAND}"; then if test -e "/etc/mandriva-release"; then aq_distrib_name="mandriva" aq_distrib_tag="mdk" aq_distrib_version="`rpm -q --queryformat='%{VERSION}' mandriva-release 2>/dev/null`" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $aq_distrib_name" >&5 printf "%s\n" "yes, $aq_distrib_name" >&6; } elif test -e "/etc/mandrake-release"; then aq_distrib_name="mandrake" aq_distrib_tag="mdk" aq_distrib_version="`rpm -q --queryformat='%{VERSION}' mandrake-release 2>/dev/null`" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $aq_distrib_name" >&5 printf "%s\n" "yes, $aq_distrib_name" >&6; } elif test -e "/etc/SuSE-release"; then aq_distrib_name="suse" aq_distrib_tag="suse" read v1 v2 v3 v4 &5 printf "%s\n" "yes, $aq_distrib_name" >&6; } elif test -e "/etc/fedora-release"; then aq_distrib_name="fedora" aq_distrib_tag="fc" aq_distrib_version="`rpm -q --queryformat='%{VERSION}' fedora-release 2>/dev/null`" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $aq_distrib_name" >&5 printf "%s\n" "yes, $aq_distrib_name" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (RPM found, but unknown distribution)" >&5 printf "%s\n" "no (RPM found, but unknown distribution)" >&6; } fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (RPM not found)" >&5 printf "%s\n" "no (RPM not found)" >&6; } fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (no RPM installed)" >&5 printf "%s\n" "no (no RPM installed)" >&6; } fi fi ###------------------------------------------------------------------------- # # check for I18N # # check whether i18n files are to be created # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_XGETTEXT+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$XGETTEXT"; then ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_XGETTEXT="xgettext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_XGETTEXT" && ac_cv_prog_XGETTEXT="missing" fi fi XGETTEXT=$ac_cv_prog_XGETTEXT if test -n "$XGETTEXT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 printf "%s\n" "$XGETTEXT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi MAKE_I18N_FILES="yes" if test "$XGETTEXT" = "missing"; then MAKE_I18N_FILES="no" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xgettext is missing. Locale suport is disabled." >&5 printf "%s\n" "$as_me: WARNING: xgettext is missing. Locale suport is disabled." >&2;} fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="missing" ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 printf "%s\n" "$MSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$MSGFMT" = "missing"; then MAKE_I18N_FILES="no" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: msgfmt is missing. Locale suport is disabled." >&5 printf "%s\n" "$as_me: WARNING: msgfmt is missing. Locale suport is disabled." >&2;} fi if test "$MAKE_I18N_FILES" = "yes"; then IF_MAKE_I18N_FILES_TRUE= IF_MAKE_I18N_FILES_FALSE='#' else IF_MAKE_I18N_FILES_TRUE='#' IF_MAKE_I18N_FILES_FALSE= fi ## then check whether i18n support is to be compiled in #i18n_libs="" #HAVE_I18N="yes" #AC_CHECK_HEADERS([locale.h libintl.h], [], [HAVE_I18N="no"]) #if test "$OS_TYPE" != "windows"; then # oldlibs="$LIBS" # LIBS="" # AC_SEARCH_LIBS(libintl_bindtextdomain, intl, [], [HAVE_I18N="no"]) # i18n_libs="$LIBS" # LIBS="$oldlibs" #else # if test "$HAVE_I18N" != "no"; then # i18n_libs="-lintl" # all_libraries="${all_libraries} -lintl" # fi #fi # #if test "$HAVE_I18N" != "no"; then # AC_DEFINE_UNQUOTED(HAVE_I18N, 1, [whether I18N is available]) #fi # #AC_SUBST(HAVE_I18N) #AC_SUBST(i18n_libs) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test ${enable_nls+y} then : enableval=$enable_nls; USE_NLS=$enableval else $as_nop USE_NLS=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.20 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 printf "%s\n" "$MSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GMSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 printf "%s\n" "$GMSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XGETTEXT+y} then : printf %s "(cached) " >&6 else $as_nop case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 printf "%s\n" "$XGETTEXT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGMERGE+y} then : printf %s "(cached) " >&6 else $as_nop case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 printf "%s\n" "$MSGMERGE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' else if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' else MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' fi fi test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 printf %s "checking for CFPreferencesCopyAppValue... " >&6; } if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFPreferencesCopyAppValue=yes else $as_nop gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFLocaleCopyPreferredLanguages=yes else $as_nop gt_cv_func_CFLocaleCopyPreferredLanguages=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 printf %s "checking for GNU gettext in libc... " >&6; } if eval test \${$gt_func_gnugettext_libc+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libc=yes" else $as_nop eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else $as_nop am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else $as_nop am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes else $as_nop am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test ${with_libintl_prefix+y} then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBINTL= LTLIBINTL= INCINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libintl=yes" else $as_nop eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 printf %s "checking whether to use NLS... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 printf %s "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 printf "%s\n" "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 printf %s "checking how to link with libintl... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 printf "%s\n" "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" i18n_libs="$LTLIBINTL" all_libraries="${all_libraries} $LTLIBINTL" HAVE_I18N="$USE_NLS" if test "$HAVE_I18N" != "no"; then printf "%s\n" "#define HAVE_I18N 1" >>confdefs.h fi ###------------------------------------------------------------------------- # # check for iconv # # Check whether --with-iconv was given. if test ${with_iconv+y} then : withval=$with_iconv; ICONV_DIR="$withval" else $as_nop ICONV_DIR="/usr" fi if test "$ICONV_DIR" = "no" ; then echo Disabling ICONV support else if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" # Export this since our headers include iconv.h ICONV_INCLUDES="-I$ICONV_DIR/include" ICONV_LIBS="-L$ICONV_DIR/lib" fi ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" if test "x$ac_cv_header_iconv_h" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } WITH_ICONV=1 else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 printf %s "checking for iconv in -liconv... " >&6; } _ldflags="${LDFLAGS}" _libs="${LIBS}" LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } WITH_ICONV=1 ICONV_LIBS="${ICONV_LIBS} -liconv" LIBS="${_libs}" LDFLAGS="${_ldflags}" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } LIBS="${_libs}" LDFLAGS="${_ldflags}" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi fi printf "%s\n" "#define HAVE_ICONV $WITH_ICONV" >>confdefs.h ###------------------------------------------------------------------------- # # guis # # Check whether --with-guis was given. if test ${with_guis+y} then : withval=$with_guis; gwenhywfar_guis="$withval" else $as_nop gwenhywfar_guis="qt5 gtk3" fi if test "$gwenhywfar_guis" = "none"; then gwenhywfar_guis="" fi if test "$gwenhywfar_guis" = "yes"; then gwenhywfar_guis="" fi ###------------------------------------------------------------------------- # Check for fox toolkit # case "$gwenhywfar_guis" in *fox16*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FOX is allowed" >&5 printf %s "checking if FOX is allowed... " >&6; } # Check whether --enable-fox was given. if test ${enable_fox+y} then : enableval=$enable_fox; enable_fox="$enableval" else $as_nop enable_fox="yes" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fox" >&5 printf "%s\n" "$enable_fox" >&6; } if test "$enable_fox" = "no"; then fox_libs="" fox_includes="" have_fox="no" else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fox includes" >&5 printf %s "checking for fox includes... " >&6; } # Check whether --with-fox-includes was given. if test ${with_fox_includes+y} then : withval=$with_fox_includes; local_fox_includes="$withval" else $as_nop local_fox_includes="\ /usr/include/fox-1.6 \ /usr/local/include/fox-1.6 \ /opt/fox-1.6/include \ " fi if test -z "$fox_includes"; then for i in $local_fox_includes; do if test -z "$fox_includes"; then if test -f "$i/fxver.h"; then fox_includes="-I$i" break; fi fi done fi if test -n "$fox_includes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fox_includes" >&5 printf "%s\n" "$fox_includes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi # Check for x86_64 architecture; potentially set lib-directory suffix if test "$target_cpu" = "x86_64"; then libdirsuffix="64" else libdirsuffix="" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fox libraries" >&5 printf %s "checking for fox libraries... " >&6; } # Check whether --with-fox-libs was given. if test ${with_fox_libs+y} then : withval=$with_fox_libs; fox_libs="$withval" else $as_nop ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu SAVED_LDFLAGS=$LDFLAGS SAVED_CXXFLAGS=$CXXFLAGS LDFLAGS="$LDFLAGS -lFOX-1.6" CXXFLAGS="$CXXFLAGS $fox_includes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FX::FXDate dummy ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : fox_libs="-lFOX-1.6" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$SAVED_LDFLAGS CXXFLAGS=$SAVED_CXXFLAGS fi if test -z "$fox_libs"; then found_dir="" ls=$qt_searchname ld="$local_fox_libs" for li in $ld; do case "$build" in *-win32*) fname="$li\\$ls" ;; *) fname="$li/$ls" ;; esac if test -r "$fname"; then found_dir="$li" break fi done if test -n "$found_dir" ; then fox_libs="-L$found_dir -lFOX-1.6" fi fi if test -n "$fox_libs"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fox_libs" >&5 printf "%s\n" "$fox_libs" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi # check if all necessary fox components where found if test -z "$fox_includes" || \ test -z "$fox_libs"; then fox_libs="" fox_includes="" have_fox="no" else have_fox="yes" printf "%s\n" "#define HAVE_FOX 1" >>confdefs.h fi fi GIVEN_CFLAGS=$fox_includes INCLUDE_DIRS=`echo | ${CPP} -v 2>&1` INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e 's;-I$dir ;;' | sed -e 's;-I$dir$;;') done fox_includes=$GIVEN_CFLAGS if test "$have_fox" != "yes"; then as_fn_error $? " **** FOX Toolkit missing. **** If you want to use the FOX-GUI you will have to install the package **** libfox-1.6 and libfox-1.6-devel on Debian-like systems. **** On RPM systems like SuSE those packages might have different names. **** If you don't need the FOX-GUI you might want to use the option **** --with-guis" "$LINENO" 5 fi printf "%s\n" "#define BUILD_GUI_FOX16 1" >>confdefs.h with_gui_fox16="yes" ;; esac if test "$with_gui_fox16" = "yes"; then WITH_GUI_FOX16_TRUE= WITH_GUI_FOX16_FALSE='#' else WITH_GUI_FOX16_TRUE='#' WITH_GUI_FOX16_FALSE= fi ###------------------------------------------------------------------------- # Check for GTK+ # case "$gwenhywfar_guis" in *gtk2*) # We need at least GTK 2.17.5 because we use functions like # gtk_widget_get_sensitive() and gtk_widget_has_focus() pkg_modules="gtk+-2.0 >= 2.17.5" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pkg_modules" >&5 printf %s "checking for $pkg_modules... " >&6; } if test -n "$GTK2_CFLAGS"; then pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK2_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK2_LIBS"; then pkg_cv_GTK2_LIBS="$GTK2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK2_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_modules" 2>&1` else GTK2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK2_PKG_ERRORS" >&5 true elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } true else GTK2_CFLAGS=$pkg_cv_GTK2_CFLAGS GTK2_LIBS=$pkg_cv_GTK2_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi printf "%s\n" "#define BUILD_GUI_GTK2 1" >>confdefs.h with_gui_gtk2="yes" ;; esac if test "$with_gui_gtk2" = "yes"; then WITH_GUI_GTK2_TRUE= WITH_GUI_GTK2_FALSE='#' else WITH_GUI_GTK2_TRUE='#' WITH_GUI_GTK2_FALSE= fi ###------------------------------------------------------------------------- # Check for GTK+ # case "$gwenhywfar_guis" in *gtk3*) # Minimum required gtk3 version pkg_modules="gtk+-3.0 >= 3.10.8" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pkg_modules" >&5 printf %s "checking for $pkg_modules... " >&6; } if test -n "$GTK3_CFLAGS"; then pkg_cv_GTK3_CFLAGS="$GTK3_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK3_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK3_LIBS"; then pkg_cv_GTK3_LIBS="$GTK3_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK3_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_modules" 2>&1` else GTK3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK3_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($pkg_modules) were not met: $GTK3_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK3_CFLAGS and GTK3_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK3_CFLAGS and GTK3_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK3_CFLAGS=$pkg_cv_GTK3_CFLAGS GTK3_LIBS=$pkg_cv_GTK3_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi printf "%s\n" "#define BUILD_GUI_GTK3 1" >>confdefs.h with_gui_gtk3="yes" ;; esac if test "$with_gui_gtk3" = "yes"; then WITH_GUI_GTK3_TRUE= WITH_GUI_GTK3_FALSE='#' else WITH_GUI_GTK3_TRUE='#' WITH_GUI_GTK3_FALSE= fi ###------------------------------------------------------------------------- # # check whether libXML2 code is to be compiled # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libXML2-depending code" >&5 printf %s "checking libXML2-depending code... " >&6; } # Check whether --with-libxml2-code was given. if test ${with_libxml2_code+y} then : withval=$with_libxml2_code; gwen_with_libxml2_code="$withval" else $as_nop gwen_with_libxml2_code="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwen_with_libxml2_code" >&5 printf "%s\n" "$gwen_with_libxml2_code" >&6; } if test "$gwen_with_libxml2_code" = "yes"; then WITH_LIBXML2_CODE_TRUE= WITH_LIBXML2_CODE_FALSE='#' else WITH_LIBXML2_CODE_TRUE='#' WITH_LIBXML2_CODE_FALSE= fi ###------------------------------------------------------------------------- # # Check for libxml # if test "$gwen_with_libxml2_code" = "yes"; then printf "%s\n" "#define GWEN_COMPILE_LIBXML2_CODE 1" >>confdefs.h pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0" >&5 printf %s "checking for libxml-2.0... " >&6; } if test -n "$LIBXML_CFLAGS"; then pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBXML_LIBS"; then pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` else LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXML_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libxml-2.0) were not met: $LIBXML_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXML_CFLAGS and LIBXML_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBXML_CFLAGS and LIBXML_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS LIBXML_LIBS=$pkg_cv_LIBXML_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi ###------------------------------------------------------------------------- # # QT4 # UIC4="NO" QT4_BINDIR="" case "$gwenhywfar_guis" in *qt4*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for qt4 includes" >&5 printf %s "checking for qt4 includes... " >&6; } # Check whether --with-qt4-includes was given. if test ${with_qt4_includes+y} then : withval=$with_qt4_includes; local_qt4_includes="$withval" else $as_nop local_qt4_includes="\ $QTDIR/include \ /usr/include/qt4 \ /usr/local/include/qt4 \ /usr/lib/qt4/include \ /usr/local/lib/qt4/include \ /opt/qt4/include \ /usr/include/qt \ /usr/local/include/qt \ /usr/lib/qt/include \ /usr/local/lib/qt/include \ /usr/include \ /usr/local/include \ /opt/qt/include \ /usr/X11R6/include \ " fi if test -z "$qt4_includes"; then for i in $local_qt4_includes; do if test -z "$qt4_includes"; then qglobalh_paths="Qt QtCore" for q in $qglobalh_paths; do if test -f "$i/$q/qglobal.h"; then lv1=`grep -h "#define QT_VERSION_STR" $i/$q/qglobal.h` case $lv1 in *4.*) qt4_includes="-I$i -I$i/Qt -I$i/QtCore -I$i/QtGui" qt4_dir=`echo $i | ${SED} 's-/include.*--'` break; ;; esac fi done fi done fi if test -n "$qt4_includes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qt4_includes" >&5 printf "%s\n" "$qt4_includes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi # Check for x86_64 architecture; potentially set lib-directory suffix if test "$target_cpu" = "x86_64"; then libdirsuffix="64" else libdirsuffix="" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for qt4 libraries" >&5 printf %s "checking for qt4 libraries... " >&6; } # Check whether --with-qt4-libs was given. if test ${with_qt4_libs+y} then : withval=$with_qt4_libs; local_qt4_libs="$withval" else $as_nop local_qt4_libs="\ $qt4_dir/lib${libdirsuffix} \ $QTDIR/lib${libdirsuffix} \ $DEBIAN_MULTIARCH_DIRS \ /usr/lib/qt4 \ /usr/local/lib/qt4 \ /usr/lib/qt4/lib${libdirsuffix} \ /usr/local/lib/qt4/lib${libdirsuffix} \ /opt/qt4/lib${libdirsuffix} \ /usr/lib/qt \ /usr/local/lib/qt \ /usr/lib/qt/lib${libdirsuffix} \ /usr/local/lib/qt/lib${libdirsuffix} \ /usr/lib${libdirsuffix} \ /usr/lib${libdirsuffix}/qt4/lib \ /usr/lib${libdirsuffix}/qt-4.5/lib \ /usr/lib${libdirsuffix}/qt-4.6/lib \ /usr/local/lib${libdirsuffix} \ /opt/qt/lib${libdirsuffix} \ /usr/X11R6/lib${libdirsuffix} \ " fi # Determine the extension of a shared library; the variable # std_shrext comes from the AC_PROG_LIBTOOL macro. Copied from # libtool. # Shared library suffix. On linux this was set as # shrext_cmds='.so'; but on darwin it is actually a text command. eval std_shrext=\"$shrext_cmds\" if test -z "${std_shrext}"; then std_shrext='.so' fi qt_libname="QtGui" # This is the name of the qt library to search for. if test "x$OSYSTEM" = "xosx"; then qt_searchname="lib${qt_libname}.4.dylib" elif test "x$host" = "xi686-w64-mingw32" || test "x$host" = "xx86_64-w64-mingw32"; then qt_searchname="lib${qt_libname}4${std_shrext}.a" else qt_searchname="lib${qt_libname}${std_shrext}.4" fi if test -z "$qt4_libs"; then found_dir="" ls=$qt_searchname ld="$local_qt4_libs" for li in $ld; do case "$build" in *-win32*) fname="$li\\$ls" ;; *) fname="$li/$ls" ;; esac if test -r "$fname"; then found_dir="$li" break fi done if test -n "$found_dir" ; then if test "x$host" = "xi686-w64-mingw32" || test "x$host" = "xx86_64-w64-mingw32"; then qt4_libs="-L$found_dir -l${qt_libname}4 -lQtCore4 -no-undefined" else qt4_libs="-L$found_dir -l${qt_libname} -lQtCore" fi fi fi if test -n "$qt4_libs"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qt4_libs" >&5 printf "%s\n" "$qt4_libs" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for qt4 moc" >&5 printf %s "checking for qt4 moc... " >&6; } if test -z "$qt4_moc"; then # Check whether --with-qt4-moc was given. if test ${with_qt4_moc+y} then : withval=$with_qt4_moc; qt4_moc="$withval" else $as_nop qt4_moc="" fi fi if test -z "$qt4_moc"; then searchdir="\ $qt4_dir/bin \ $QTDIR/bin \ /usr/lib/qt4/bin \ /usr/local/lib/qt4/bin \ /opt/qt4/bin \ /usr/lib/qt/bin \ /usr/local/lib/qt/bin \ /usr/bin \ /usr/local/bin \ /opt/qt/bin \ /usr/X11R6/bin \ " # search for "moc-qt4" for f in $searchdir; do if test -x $f/moc-qt4; then qt4_moc="$f/moc-qt4" break fi done # fall back to "moc" if test -z "$qt4_moc"; then for f in $searchdir; do if test -x $f/moc; then qt4_moc="$f/moc" break fi done fi fi if test -n "$qt4_moc"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qt4_moc" >&5 printf "%s\n" "$qt4_moc" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for qt4 uic" >&5 printf %s "checking for qt4 uic... " >&6; } if test -z "$qt4_uic"; then # Check whether --with-qt4-uic was given. if test ${with_qt4_uic+y} then : withval=$with_qt4_uic; qt4_uic="$withval" else $as_nop qt4_uic="" fi searchdir="\ $qt4_dir/bin \ $QTDIR/bin \ /usr/lib/qt4/bin \ /usr/local/lib/qt4/bin \ /opt/qt4/bin \ /usr/lib/qt/bin \ /usr/local/lib/qt/bin \ /usr/bin \ /usr/local/bin \ /opt/qt/bin \ /usr/X11R6/bin \ " # search for "uic-qt4" for f in $searchdir; do if test -x $f/uic-qt4; then qt4_uic="$f/uic-qt4" break fi done # fall back to "uic" if test -z "$qt4_uic"; then for f in $searchdir; do if test -x $f/uic; then qt4_uic="$f/uic" break fi done fi fi if test -n "$qt4_uic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qt4_uic" >&5 printf "%s\n" "$qt4_uic" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } fi # check if all necessary qt4 components where found if test -z "$qt4_includes" || \ test -z "$qt4_moc" || \ test -z "$qt4_uic" || \ test -z "$qt4_libs"; then qt4_libs="" qt4_moc="" qt4_uic="" qt4_includes="" have_qt4="no" as_fn_error $? " Compilation of QT applications is enabled but I could not find some Qt components (see which are missing in messages above). If you don't want to compile Qt4 applications please explicitly specify which GUIs you want to support using \"--with-guis\". " "$LINENO" 5 else have_qt4="yes" printf "%s\n" "#define HAVE_QT4 1" >>confdefs.h fi GIVEN_CFLAGS=$qt4_includes INCLUDE_DIRS=`echo | ${CPP} -v 2>&1` INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e 's;-I$dir ;;' | sed -e 's;-I$dir$;;') done qt4_includes=$GIVEN_CFLAGS if test "$have_qt4" = "yes"; then # Define this macro to disable the cast from QString to const char # which implicitly uses latin1()! printf "%s\n" "#define QT_NO_ASCII_CAST 1" >>confdefs.h fi # Extract the first word of "yes", so it can be a program name with args. set dummy yes; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_YES+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$YES"; then ac_cv_prog_YES="$YES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_YES="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_YES" && ac_cv_prog_YES="echo -e 'y\ny\ny\ny\n'" fi fi YES=$ac_cv_prog_YES if test -n "$YES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YES" >&5 printf "%s\n" "$YES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi QT4_BINDIR="` echo ${qt4_moc} | ${SED} 's-/moc--' | ${SED} 's-/c/-c:\\\\-' | ${SED} 's-/-\\\\-g' `" UIC4="${qt4_uic}" printf "%s\n" "#define BUILD_GUI_QT4 1" >>confdefs.h with_gui_qt4="yes" ;; *) ;; esac if test "$with_gui_qt4" = "yes"; then WITH_GUI_QT4_TRUE= WITH_GUI_QT4_FALSE='#' else WITH_GUI_QT4_TRUE='#' WITH_GUI_QT4_FALSE= fi ###------------------------------------------------------------------------- # # QT5 # case "$gwenhywfar_guis" in *qt5*qt6* | *qt6*qt5*) as_fn_error $? "**** Configuring for Qt5 and Qt6 at the same time is not supported" "$LINENO" 5 ;; *qt5* | *qt6*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5 printf %s "checking for X... " >&6; } # Check whether --with-x was given. if test ${with_x+y} then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test ${ac_cv_have_x+y} then : printf %s "(cached) " >&6 else $as_nop # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no # Do we need to do anything special at all? ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { XrmInitialize () ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : # We can compile and link X programs with no special options. ac_x_includes= ac_x_libraries= fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" # If that didn't work, only try xmkmf and file system searches # for native compilation. if test x"$ac_x_includes" = xno && test "$cross_compiling" = no then : rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /opt/X11/include /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : # We can compile using X headers with no special include directory. ac_x_includes= else $as_nop for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { XrmInitialize () ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else $as_nop LIBS=$ac_save_LIBS for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no fi # Record the results. case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) : # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no" ;; #( *) : # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" ;; esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 printf "%s\n" "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 printf %s "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else $as_nop LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 printf "%s\n" "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int XOpenDisplay (); } int main (void) { return conftest::XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 printf %s "checking for dnet_ntoa in -ldnet... " >&6; } if test ${ac_cv_lib_dnet_dnet_ntoa+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int dnet_ntoa (); } int main (void) { return conftest::dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_dnet_dnet_ntoa=yes else $as_nop ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int dnet_ntoa (); } int main (void) { return conftest::dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else $as_nop ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes then : fi if test $ac_cv_func_gethostbyname = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 printf %s "checking for gethostbyname in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_gethostbyname+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int gethostbyname (); } int main (void) { return conftest::gethostbyname (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_nsl_gethostbyname=yes else $as_nop ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 printf %s "checking for gethostbyname in -lbsd... " >&6; } if test ${ac_cv_lib_bsd_gethostbyname+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int gethostbyname (); } int main (void) { return conftest::gethostbyname (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_bsd_gethostbyname=yes else $as_nop ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes then : fi if test $ac_cv_func_connect = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 printf %s "checking for connect in -lsocket... " >&6; } if test ${ac_cv_lib_socket_connect+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int connect (); } int main (void) { return conftest::connect (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_socket_connect=yes else $as_nop ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 printf "%s\n" "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes then : fi if test $ac_cv_func_remove = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 printf %s "checking for remove in -lposix... " >&6; } if test ${ac_cv_lib_posix_remove+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int remove (); } int main (void) { return conftest::remove (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_posix_remove=yes else $as_nop ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 printf "%s\n" "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes then : fi if test $ac_cv_func_shmat = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 printf %s "checking for shmat in -lipc... " >&6; } if test ${ac_cv_lib_ipc_shmat+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int shmat (); } int main (void) { return conftest::shmat (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_ipc_shmat=yes else $as_nop ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 printf %s "checking for IceConnectionNumber in -lICE... " >&6; } if test ${ac_cv_lib_ICE_IceConnectionNumber+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int IceConnectionNumber (); } int main (void) { return conftest::IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_lib_ICE_IceConnectionNumber=yes else $as_nop ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi # openSUSE leap 15.3 installs qmake-qt5, not qmake, for example. # Store the full name (like qmake-qt5) into QMAKE # and the specifier (like -qt5 or empty) into am_have_qt_qmexe_suff. if test -n "$ac_tool_prefix"; then for ac_prog in qmake qmake-qt6 qmake6 qmake-qt5 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_QMAKE+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$QMAKE"; then ac_cv_prog_QMAKE="$QMAKE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_QMAKE="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi QMAKE=$ac_cv_prog_QMAKE if test -n "$QMAKE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5 printf "%s\n" "$QMAKE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$QMAKE" && break done fi if test -z "$QMAKE"; then ac_ct_QMAKE=$QMAKE for ac_prog in qmake qmake-qt6 qmake6 qmake-qt5 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_QMAKE+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_QMAKE"; then ac_cv_prog_ac_ct_QMAKE="$ac_ct_QMAKE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_QMAKE="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_QMAKE=$ac_cv_prog_ac_ct_QMAKE if test -n "$ac_ct_QMAKE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_QMAKE" >&5 printf "%s\n" "$ac_ct_QMAKE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_QMAKE" && break done if test "x$ac_ct_QMAKE" = x; then QMAKE="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac QMAKE=$ac_ct_QMAKE fi fi # Check whether --with-qmake was given. if test ${with_qmake+y} then : withval=$with_qmake; QMAKE="$withval" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt" >&5 printf %s "checking for Qt... " >&6; } am_have_qt_qmexe_suff=`echo $QMAKE | sed 's,^.*qmake,,'` # If we have Qt5 or later in the path, we're golden ver=`$QMAKE --version | grep -o "Qt version ."` if test "$ver" ">" "Qt version 4"; then QT_MAJOR_VERSION="5" have_qt=yes # This pro file dumps qmake's variables, but it only works on Qt 5 or later am_have_qt_dir=`mktemp -d` am_have_qt_pro="$am_have_qt_dir/test.pro" am_have_qt_stash="$am_have_qt_dir/.qmake.stash" am_have_qt_makefile="$am_have_qt_dir/Makefile" # http://qt-project.org/doc/qt-5/qmake-variable-reference.html#qt cat > $am_have_qt_pro << EOF win32 { CONFIG -= debug_and_release CONFIG += release } qtHaveModule(axcontainer): QT += axcontainer qtHaveModule(axserver): QT += axserver qtHaveModule(concurrent): QT += concurrent qtHaveModule(core): QT += core qtHaveModule(dbus): QT += dbus qtHaveModule(declarative): QT += declarative qtHaveModule(designer): QT += designer qtHaveModule(gui): QT += gui qtHaveModule(help): QT += help qtHaveModule(multimedia): QT += multimedia qtHaveModule(multimediawidgets): QT += multimediawidgets qtHaveModule(network): QT += network qtHaveModule(opengl): QT += opengl qtHaveModule(printsupport): QT += printsupport qtHaveModule(qml): QT += qml qtHaveModule(qmltest): QT += qmltest qtHaveModule(x11extras): QT += x11extras qtHaveModule(script): QT += script qtHaveModule(scripttools): QT += scripttools qtHaveModule(sensors): QT += sensors qtHaveModule(serialport): QT += serialport qtHaveModule(sql): QT += sql qtHaveModule(svg): QT += svg qtHaveModule(testlib): QT += testlib qtHaveModule(uitools): QT += uitools qtHaveModule(webkit): QT += webkit qtHaveModule(webkitwidgets): QT += webkitwidgets qtHaveModule(xml): QT += xml qtHaveModule(xmlpatterns): QT += xmlpatterns percent.target = % percent.commands = @echo -n "\$(\$(@))\ " QMAKE_EXTRA_TARGETS += percent EOF $QMAKE $am_have_qt_pro -o $am_have_qt_makefile QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile CXXFLAGS INCPATH` QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile LIBS` rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile rmdir $am_have_qt_dir if test "$ver" ">" "Qt version 5"; then QT_MAJOR_VERSION="6" if test -n "$ac_tool_prefix"; then for ac_prog in qtpaths-qt6 qtpaths6 qtpaths do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_QTPATHS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$QTPATHS"; then ac_cv_prog_QTPATHS="$QTPATHS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_QTPATHS="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi QTPATHS=$ac_cv_prog_QTPATHS if test -n "$QTPATHS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QTPATHS" >&5 printf "%s\n" "$QTPATHS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$QTPATHS" && break done fi if test -z "$QTPATHS"; then ac_ct_QTPATHS=$QTPATHS for ac_prog in qtpaths-qt6 qtpaths6 qtpaths do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_QTPATHS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_QTPATHS"; then ac_cv_prog_ac_ct_QTPATHS="$ac_ct_QTPATHS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_QTPATHS="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_QTPATHS=$ac_cv_prog_ac_ct_QTPATHS if test -n "$ac_ct_QTPATHS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_QTPATHS" >&5 printf "%s\n" "$ac_ct_QTPATHS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_QTPATHS" && break done if test "x$ac_ct_QTPATHS" = x; then QTPATHS="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac QTPATHS=$ac_ct_QTPATHS fi fi else if test -n "$ac_tool_prefix"; then for ac_prog in qtpaths-qt5 qtpaths5 qtpaths do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_QTPATHS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$QTPATHS"; then ac_cv_prog_QTPATHS="$QTPATHS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_QTPATHS="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi QTPATHS=$ac_cv_prog_QTPATHS if test -n "$QTPATHS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QTPATHS" >&5 printf "%s\n" "$QTPATHS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$QTPATHS" && break done fi if test -z "$QTPATHS"; then ac_ct_QTPATHS=$QTPATHS for ac_prog in qtpaths-qt5 qtpaths5 qtpaths do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_QTPATHS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_QTPATHS"; then ac_cv_prog_ac_ct_QTPATHS="$ac_ct_QTPATHS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_QTPATHS="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_QTPATHS=$ac_cv_prog_ac_ct_QTPATHS if test -n "$ac_ct_QTPATHS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_QTPATHS" >&5 printf "%s\n" "$ac_ct_QTPATHS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_QTPATHS" && break done if test "x$ac_ct_QTPATHS" = x; then QTPATHS="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac QTPATHS=$ac_ct_QTPATHS fi fi fi ver=`$QTPATHS --version | cut -d' ' -f 2` if test "$ver" = "2.0"; then # Add QT_HOST_BINS and QT_HOST_LIBEXECS paths to PATH for var in QT_HOST_BINS QT_HOST_LIBEXECS; do PATH=$PATH:`$QTPATHS --query $var` done fi # Look for specific tools in $PATH # Extract the first word of "moc$am_have_qt_qmexe_suff", so it can be a program name with args. set dummy moc$am_have_qt_qmexe_suff; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_MOC+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_MOC in [\\/]* | ?:[\\/]*) ac_cv_path_QT_MOC="$QT_MOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_MOC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_MOC=$ac_cv_path_QT_MOC if test -n "$QT_MOC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_MOC" >&5 printf "%s\n" "$QT_MOC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$QT_MOC" = ""; then # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_MOC+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_MOC in [\\/]* | ?:[\\/]*) ac_cv_path_QT_MOC="$QT_MOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_MOC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_MOC=$ac_cv_path_QT_MOC if test -n "$QT_MOC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_MOC" >&5 printf "%s\n" "$QT_MOC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi # Extract the first word of "uic$am_have_qt_qmexe_suff", so it can be a program name with args. set dummy uic$am_have_qt_qmexe_suff; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_UIC+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_UIC in [\\/]* | ?:[\\/]*) ac_cv_path_QT_UIC="$QT_UIC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_UIC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_UIC=$ac_cv_path_QT_UIC if test -n "$QT_UIC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_UIC" >&5 printf "%s\n" "$QT_UIC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$QT_UIC" = ""; then # Extract the first word of "uic", so it can be a program name with args. set dummy uic; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_UIC+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_UIC in [\\/]* | ?:[\\/]*) ac_cv_path_QT_UIC="$QT_UIC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_UIC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_UIC=$ac_cv_path_QT_UIC if test -n "$QT_UIC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_UIC" >&5 printf "%s\n" "$QT_UIC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi # Extract the first word of "rcc$am_have_qt_qmexe_suff", so it can be a program name with args. set dummy rcc$am_have_qt_qmexe_suff; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_RCC+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_RCC in [\\/]* | ?:[\\/]*) ac_cv_path_QT_RCC="$QT_RCC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_RCC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_RCC=$ac_cv_path_QT_RCC if test -n "$QT_RCC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_RCC" >&5 printf "%s\n" "$QT_RCC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$QT_RCC" = ""; then # Extract the first word of "rcc", so it can be a program name with args. set dummy rcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_RCC+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_RCC in [\\/]* | ?:[\\/]*) ac_cv_path_QT_RCC="$QT_RCC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_RCC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_RCC=$ac_cv_path_QT_RCC if test -n "$QT_RCC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_RCC" >&5 printf "%s\n" "$QT_RCC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi # Extract the first word of "lrelease$am_have_qt_qmexe_suff", so it can be a program name with args. set dummy lrelease$am_have_qt_qmexe_suff; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_LRELEASE+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_LRELEASE in [\\/]* | ?:[\\/]*) ac_cv_path_QT_LRELEASE="$QT_LRELEASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_LRELEASE="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_LRELEASE=$ac_cv_path_QT_LRELEASE if test -n "$QT_LRELEASE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_LRELEASE" >&5 printf "%s\n" "$QT_LRELEASE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$QT_LRELEASE" = ""; then # Extract the first word of "lrelease", so it can be a program name with args. set dummy lrelease; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_LRELEASE+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_LRELEASE in [\\/]* | ?:[\\/]*) ac_cv_path_QT_LRELEASE="$QT_LRELEASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_LRELEASE="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_LRELEASE=$ac_cv_path_QT_LRELEASE if test -n "$QT_LRELEASE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_LRELEASE" >&5 printf "%s\n" "$QT_LRELEASE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi # Extract the first word of "lupdate$am_have_qt_qmexe_suff", so it can be a program name with args. set dummy lupdate$am_have_qt_qmexe_suff; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_LUPDATE+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_LUPDATE in [\\/]* | ?:[\\/]*) ac_cv_path_QT_LUPDATE="$QT_LUPDATE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_LUPDATE="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_LUPDATE=$ac_cv_path_QT_LUPDATE if test -n "$QT_LUPDATE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_LUPDATE" >&5 printf "%s\n" "$QT_LUPDATE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$QT_LUPDATE" = ""; then # Extract the first word of "lupdate", so it can be a program name with args. set dummy lupdate; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_QT_LUPDATE+y} then : printf %s "(cached) " >&6 else $as_nop case $QT_LUPDATE in [\\/]* | ?:[\\/]*) ac_cv_path_QT_LUPDATE="$QT_LUPDATE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_QT_LUPDATE="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi QT_LUPDATE=$ac_cv_path_QT_LUPDATE if test -n "$QT_LUPDATE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_LUPDATE" >&5 printf "%s\n" "$QT_LUPDATE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi # Get Qt version from qmake QT_DIR=`$QMAKE --version | grep -o -E /.+` # All variables are defined, report the result { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_qt: QT_CXXFLAGS=$QT_CXXFLAGS QT_DIR=$QT_DIR QT_LIBS=$QT_LIBS QT_UIC=$QT_UIC QT_MOC=$QT_MOC QT_RCC=$QT_RCC QT_LRELEASE=$QT_LRELEASE QT_LUPDATE=$QT_LUPDATE QT_MAJOR_VERSION=$QT_MAJOR_VERSION" >&5 printf "%s\n" "$have_qt: QT_CXXFLAGS=$QT_CXXFLAGS QT_DIR=$QT_DIR QT_LIBS=$QT_LIBS QT_UIC=$QT_UIC QT_MOC=$QT_MOC QT_RCC=$QT_RCC QT_LRELEASE=$QT_LRELEASE QT_LUPDATE=$QT_LUPDATE QT_MAJOR_VERSION=$QT_MAJOR_VERSION" >&6; } else # Qt was not found have_qt=no QT_CXXFLAGS= QT_DIR= QT_LIBS= QT_UIC= QT_MOC= QT_RCC= QT_LRELEASE= QT_LUPDATE= QT_MAJOR_VERSION= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_qt" >&5 printf "%s\n" "$have_qt" >&6; } fi #### Being paranoid: if test x"$have_qt" = xyes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking correct functioning of Qt installation" >&5 printf %s "checking correct functioning of Qt installation... " >&6; } if test ${ax_cv_qt_test_result+y} then : printf %s "(cached) " >&6 else $as_nop cat > ax_qt_test.h << EOF #include class Test : public QObject { Q_OBJECT public: Test() {} ~Test() {} public slots: void receive() {} signals: void send(); }; EOF cat > ax_qt_main.$ac_ext << EOF #include "ax_qt_test.h" #include int main( int argc, char **argv ) { QApplication app( argc, argv ); Test t; QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); } EOF ax_cv_qt_test_result="failure" ax_try_1="$QT_MOC ax_qt_test.h -o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null" { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ax_try_1\""; } >&5 (eval $ax_try_1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test x"$ac_status" != x0; then echo "$ax_err_1" >&5 echo "configure: could not run $QT_MOC on:" >&5 cat ax_qt_test.h >&5 else ax_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_ax_qt_test.o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null" { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ax_try_2\""; } >&5 (eval $ax_try_2) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test x"$ac_status" != x0; then echo "$ax_err_2" >&5 echo "configure: could not compile:" >&5 cat moc_ax_qt_test.$ac_ext >&5 else ax_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o ax_qt_main.o ax_qt_main.$ac_ext >/dev/null 2>/dev/null" { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ax_try_3\""; } >&5 (eval $ax_try_3) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test x"$ac_status" != x0; then echo "$ax_err_3" >&5 echo "configure: could not compile:" >&5 cat ax_qt_main.$ac_ext >&5 else ax_try_4="$CXX -o ax_qt_main ax_qt_main.o moc_ax_qt_test.o $QT_LIBS $LIBS >/dev/null 2>/dev/null" { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ax_try_4\""; } >&5 (eval $ax_try_4) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test x"$ac_status" != x0; then echo "$ax_err_4" >&5 else ax_cv_qt_test_result="success" fi fi fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_qt_test_result" >&5 printf "%s\n" "$ax_cv_qt_test_result" >&6; } if test x"$ax_cv_qt_test_result" = "xfailure"; then as_fn_error $? "Failed to find matching components of a complete Qt installation. Try using more options, see ./configure --help." "$LINENO" 5 fi rm -f ax_qt_test.h moc_ax_qt_test.$ac_ext moc_ax_qt_test.o \ ax_qt_main.$ac_ext ax_qt_main.o ax_qt_main fi ;; esac ###------------------------------------------------------------------------- # # check docpath # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking docpath" >&5 printf %s "checking docpath... " >&6; } # Check whether --with-docpath was given. if test ${with_docpath+y} then : withval=$with_docpath; docpath="$withval" else $as_nop docpath="${HOME}/apidoc" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $docpath" >&5 printf "%s\n" "$docpath" >&6; } ###------------------------------------------------------------------------- # # search for tag files # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking doxygen tag files" >&5 printf %s "checking doxygen tag files... " >&6; } DOXYGEN_TAGFILES="" DOXYGEN_TAGFILEPATHS="" if test -d "${docpath}"; then tagfiles="`cd ${docpath} && ls *.tag`" if test -n "${tagfiles}"; then # remove own package from list tagfiles="`echo ${tagfiles} | ${SED} -e s/${PACKAGE}.tag//`" # add every remaining tag file for ff in ${tagfiles}; do DOXYGEN_TAGFILES="${DOXYGEN_TAGFILES} ${docpath}/${ff}=${docpath}/`basename -s .tag ${ff}`" done fi fi if test -z "${DOXYGEN_TAGFILES}"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 printf "%s\n" "found" >&6; } fi ###------------------------------------------------------------------------- # # Search for dlopen # LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 printf %s "checking for library containing dlopen... " >&6; } if test ${ac_cv_search_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int dlopen (); } int main (void) { return conftest::dlopen (); ; return 0; } _ACEOF for ac_lib in '' c dl do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO" then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_dlopen+y} then : break fi done if test ${ac_cv_search_dlopen+y} then : else $as_nop ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 printf "%s\n" "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi if test "$LIBS" = "-lc"; then LIBS="" fi ld_library="$LIBS" LIBS="" all_libraries="$all_libraries $ld_library" ###------------------------------------------------------------------------- # # check for release # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this is an official release" >&5 printf %s "checking whether this is an official release... " >&6; } # Check whether --enable-release was given. if test ${enable_release+y} then : enableval=$enable_release; case "${enableval}" in yes) enable_release="yes";; no) enable_release="no";; *) as_fn_error $? "bad value ${enableval} for --enable-release" "$LINENO" 5;; esac else $as_nop enable_release="no" fi if test "$enable_release" = "yes"; then STRIPALL="-s" else STRIPALL="" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_release" >&5 printf "%s\n" "$enable_release" >&6; } ###------------------------------------------------------------------------- # # Compiler check for symbol visibility # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports symbol visibility" >&5 printf %s "checking whether compiler supports symbol visibility... " >&6; } if test ${ac_cv_hidden_visibility_attribute+y} then : printf %s "(cached) " >&6 else $as_nop echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > conftest.c ac_cv_hidden_visibility_attribute=no if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then if grep '\.hidden.*foo' conftest.s >/dev/null; then ac_cv_hidden_visibility_attribute=yes fi fi rm -f conftest.* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hidden_visibility_attribute" >&5 printf "%s\n" "$ac_cv_hidden_visibility_attribute" >&6; } if test $ac_cv_hidden_visibility_attribute = yes; then printf "%s\n" "#define GCC_WITH_VISIBILITY_ATTRIBUTE 1" >>confdefs.h visibility_cflags="-fvisibility=hidden" visibility_supported="yes" fi ###------------------------------------------------------------------------- # # check for werror # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CFLAG -Werror is to be used" >&5 printf %s "checking if CFLAG -Werror is to be used... " >&6; } # Check whether --enable-error-on-warning was given. if test ${enable_error_on_warning+y} then : enableval=$enable_error_on_warning; enable_werror="$enableval" else $as_nop enable_werror="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_werror" >&5 printf "%s\n" "$enable_werror" >&6; } WERROR="" if test "$enable_werror" != "no"; then WERROR="-Werror" fi # Debug arguments for compilation # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -g" CFLAGS="${CFLAGS} -g" LDFLAGS="${LDFLAGS} -g" printf "%s\n" "#define DEBUG 1" >>confdefs.h ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" fi if test ${GCC}x = yesx; then # Check whether --enable-warnings was given. if test ${enable_warnings+y} then : enableval=$enable_warnings; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" ;; all) CXXFLAGS="${CXXFLAGS} -Wall -pedantic -ansi" CFLAGS="${CFLAGS} -Wall -pedantic -ansi" ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-warnings" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" fi GCC_VERSION=`${CC} -dumpversion` if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then # This is gcc >= 3.x.x if test `echo ${GCC_VERSION} | cut -d. -f2 | cut -d- -f1` -ge 4; then # This is gcc >= 3.4.x CFLAGS="${CFLAGS} -Wdeclaration-after-statement" fi fi # Check whether --enable-error-on-warning was given. if test ${enable_error_on_warning+y} then : enableval=$enable_error_on_warning; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Werror" CFLAGS="${CFLAGS} -Werror" ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-error-on-warning" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" fi fi ###------------------------------------------------------------------------- # # check for MEMTRACE # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if MEMTRACE is wanted" >&5 printf %s "checking if MEMTRACE is wanted... " >&6; } # Check whether --enable-memtrace was given. if test ${enable_memtrace+y} then : enableval=$enable_memtrace; enable_memtrace="$enableval" else $as_nop enable_memtrace="no" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_memtrace" >&5 printf "%s\n" "$enable_memtrace" >&6; } if test "$enable_memtrace" != "no"; then #AC_DEFINE(GWEN_MEMTRACE, 1, [if memory trace is wanted]) printf "%s\n" "#define GWEN_MEMORY_DEBUG 1" >>confdefs.h fi # Debug arguments for compilation # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -g" CFLAGS="${CFLAGS} -g" LDFLAGS="${LDFLAGS} -g" printf "%s\n" "#define DEBUG 1" >>confdefs.h ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" fi if test ${GCC}x = yesx; then # Check whether --enable-warnings was given. if test ${enable_warnings+y} then : enableval=$enable_warnings; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" ;; all) CXXFLAGS="${CXXFLAGS} -Wall -pedantic -ansi" CFLAGS="${CFLAGS} -Wall -pedantic -ansi" ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-warnings" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" fi GCC_VERSION=`${CC} -dumpversion` if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then # This is gcc >= 3.x.x if test `echo ${GCC_VERSION} | cut -d. -f2 | cut -d- -f1` -ge 4; then # This is gcc >= 3.4.x CFLAGS="${CFLAGS} -Wdeclaration-after-statement" fi fi # Check whether --enable-error-on-warning was given. if test ${enable_error_on_warning+y} then : enableval=$enable_error_on_warning; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Werror" CFLAGS="${CFLAGS} -Werror" ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-error-on-warning" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" fi fi ###------------------------------------------------------------------------- # # check buffer hard limit # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default buffer hard limit" >&5 printf %s "checking default buffer hard limit... " >&6; } # Check whether --with-buffer-hardlimit was given. if test ${with_buffer_hardlimit+y} then : withval=$with_buffer_hardlimit; gwenhywfar_buffer_hardlimit="$withval" else $as_nop gwenhywfar_buffer_hardlimit="" fi if test -z "${gwenhywfar_buffer_hardlimit}"; then gwenhywfar_buffer_hardlimit="(16*1024*1024)" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gwenhywfar_buffer_hardlimit" >&5 printf "%s\n" "$gwenhywfar_buffer_hardlimit" >&6; } ###------------------------------------------------------------------------- # # compile program flags # PROG_LIBRARIES="${PROG_LIBRARIES} ${ncurses_libs}" # Clean up include variables GIVEN_CFLAGS=$gwenhywfar_includes INCLUDE_DIRS=`echo | ${CPP} -v 2>&1` INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e 's;-I$dir ;;' | sed -e 's;-I$dir$;;') done gwenhywfar_includes=$GIVEN_CFLAGS GIVEN_CFLAGS=$all_includes INCLUDE_DIRS=`echo | ${CPP} -v 2>&1` INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e 's;-I$dir ;;' | sed -e 's;-I$dir$;;') done all_includes=$GIVEN_CFLAGS ###------------------------------------------------------------------------- # # check for doc type # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if full docu should be created" >&5 printf %s "checking if full docu should be created... " >&6; } # Check whether --enable-full-doc was given. if test ${enable_full_doc+y} then : enableval=$enable_full_doc; case "${enableval}" in yes) enable_fulldoc="yes";; no) enable_fulldoc="no";; *) as_fn_error $? "bad value ${enableval} for --enable-full-doc" "$LINENO" 5;; esac else $as_nop enable_fulldoc="no" fi if test "$enable_fulldoc" = "yes"; then DOXYGEN_INPUT="listdoc.h src gui plugins tools" DOXYGEN_DEFINE="" DOXYGEN_GENERATE_QHP="NO" DOXYGEN_QHG_LOCATION="" DOXYGEN_QHP_NAMESPACE=de.aquamaniac.gwenhywfar-$GWENHYWFAR_VERSION_STRING if which qhelpgenerator >/dev/null ; then DOXYGEN_QHG_LOCATION=$(which qhelpgenerator) DOXYGEN_GENERATE_QHP="YES" USE_DOT=NO elif which qhelpgenerator-qt5 >/dev/null ; then DOXYGEN_QHG_LOCATION=$(which qhelpgenerator-qt5) DOXYGEN_GENERATE_QHP="YES" USE_DOT=NO fi else DOXYGEN_DEFINE="DOXYGEN_HIDE" DOXYGEN_INPUT="listdoc.h gwenhywfar5" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fulldoc" >&5 printf "%s\n" "$enable_fulldoc" >&6; } # Debug arguments for compilation # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -g" CFLAGS="${CFLAGS} -g" LDFLAGS="${LDFLAGS} -g" printf "%s\n" "#define DEBUG 1" >>confdefs.h ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" fi if test ${GCC}x = yesx; then # Check whether --enable-warnings was given. if test ${enable_warnings+y} then : enableval=$enable_warnings; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" ;; all) CXXFLAGS="${CXXFLAGS} -Wall -pedantic -ansi" CFLAGS="${CFLAGS} -Wall -pedantic -ansi" ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-warnings" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" fi GCC_VERSION=`${CC} -dumpversion` if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then # This is gcc >= 3.x.x if test `echo ${GCC_VERSION} | cut -d. -f2 | cut -d- -f1` -ge 4; then # This is gcc >= 3.4.x CFLAGS="${CFLAGS} -Wdeclaration-after-statement" fi fi # Check whether --enable-error-on-warning was given. if test ${enable_error_on_warning+y} then : enableval=$enable_error_on_warning; case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Werror" CFLAGS="${CFLAGS} -Werror" ;; no) ;; *) as_fn_error $? "bad value ${enableval} for --enable-error-on-warning" "$LINENO" 5 ;; esac else $as_nop # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" fi fi ###------------------------------------------------------------------------- # # substitute vars # ###------------------------------------------------------------------------- # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking crypt token plugins" >&5 printf %s "checking crypt token plugins... " >&6; } # Check whether --with-plugins-ct was given. if test ${with_plugins_ct+y} then : withval=$with_plugins_ct; plugins="$withval" else $as_nop plugins="all" fi if test "$plugins" = "all"; then plugins="ohbci"; fi gwenhywfar_plugins_ct_dirs="" gwenhywfar_plugins_ct_libs="" for plugin in $plugins; do case "$plugin" in ohbci) gwenhywfar_plugins_ct_dirs="$gwenhywfar_plugins_ct_dirs ohbci" gwenhywfar_plugins_ct_libs="$gwenhywfar_plugins_ct_libs ohbci/libct_ohbci.la" printf "%s\n" "#define GWENHYWFAR_WITH_PLUGIN_CT_OHBCI 1" >>confdefs.h ;; *) as_fn_error $? ""ERROR: Unknown plugin \"$plugin\""" "$LINENO" 5 ;; esac done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $plugins" >&5 printf "%s\n" "$plugins" >&6; } ###------------------------------------------------------------------------- # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DBIO plugins" >&5 printf %s "checking DBIO plugins... " >&6; } # Check whether --with-plugins-dbio was given. if test ${with_plugins_dbio+y} then : withval=$with_plugins_dbio; plugins="$withval" else $as_nop plugins="all" fi if test "$plugins" = "all"; then plugins="csv olddb xmldb"; fi gwenhywfar_plugins_dbio_dirs="" gwenhywfar_plugins_dbio_libs="" for plugin in $plugins; do case "$plugin" in csv) gwenhywfar_plugins_dbio_dirs="$gwenhywfar_plugins_dbio_dirs csv" gwenhywfar_plugins_dbio_libs="$gwenhywfar_plugins_dbio_libs csv/libdbio_csv.la" printf "%s\n" "#define GWENHYWFAR_WITH_PLUGIN_DBIO_CSV 1" >>confdefs.h ;; olddb) gwenhywfar_plugins_dbio_dirs="$gwenhywfar_plugins_dbio_dirs olddb" gwenhywfar_plugins_dbio_libs="$gwenhywfar_plugins_dbio_libs olddb/libdbio_olddb.la" printf "%s\n" "#define GWENHYWFAR_WITH_PLUGIN_DBIO_OLDDB 1" >>confdefs.h ;; xmldb) gwenhywfar_plugins_dbio_dirs="$gwenhywfar_plugins_dbio_dirs xmldb" gwenhywfar_plugins_dbio_libs="$gwenhywfar_plugins_dbio_libs xmldb/libdbio_xmldb.la" printf "%s\n" "#define GWENHYWFAR_WITH_PLUGIN_DBIO_XMLDB 1" >>confdefs.h ;; *) as_fn_error $? ""ERROR: Unknown plugin \"$plugin\""" "$LINENO" 5 ;; esac done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $plugins" >&5 printf "%s\n" "$plugins" >&6; } ###------------------------------------------------------------------------- # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ConfigManager plugins" >&5 printf %s "checking ConfigManager plugins... " >&6; } # Check whether --with-plugins-cfgmgr was given. if test ${with_plugins_cfgmgr+y} then : withval=$with_plugins_cfgmgr; plugins="$withval" else $as_nop plugins="all" fi if test "$plugins" = "all"; then plugins="dir"; fi gwenhywfar_plugins_cfgmgr_dirs="" gwenhywfar_plugins_cfgmgr_libs="" for plugin in $plugins; do case "$plugin" in dir) gwenhywfar_plugins_cfgmgr_dirs="$gwenhywfar_plugins_cfgmgr_dirs dir" gwenhywfar_plugins_cfgmgr_libs="$gwenhywfar_plugins_cfgmgr_libs dir/libcfgmgr_dir.la" printf "%s\n" "#define GWENHYWFAR_WITH_PLUGIN_CFGMGR_DIR 1" >>confdefs.h ;; *) as_fn_error $? ""ERROR: Unknown plugin \"$plugin\""" "$LINENO" 5 ;; esac done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $plugins" >&5 printf "%s\n" "$plugins" >&6; } ###------------------------------------------------------------------------- # # list of files to create # ac_config_files="$ac_config_files Doxyfile Makefile admin/Makefile m4/Makefile po/Makefile gwenhywfar-config.in gwenhywfar.pc gwenhywfar-config.cmake gwenhywfar-config-version.cmake gwenhywfar.spec gwenhywfar.iss checks/Makefile data/Makefile doc/Makefile doc/dialog/Makefile doc/dialog/images/Makefile doc/inherit/Makefile doc/plugindescr.xsd src/Makefile src/types.h src/ressource.rc src/version.h src/base/Makefile src/crypt3/Makefile src/cryptmsg/Makefile src/crypttoken/Makefile src/gui/Makefile src/sio/Makefile src/html/Makefile src/os/Makefile src/os/posix/Makefile src/os/posix/system.h src/os/windows/Makefile src/os/windows/system.h src/parser/Makefile src/sar/Makefile src/test_framework/Makefile src/xmlcmd/Makefile src/msgio/Makefile plugins/Makefile plugins/dbio/Makefile plugins/dbio/csv/Makefile plugins/dbio/csv/csv.xml plugins/dbio/csv/ressource.rc plugins/dbio/olddb/Makefile plugins/dbio/olddb/olddb.xml plugins/dbio/olddb/ressource.rc plugins/dbio/xmldb/Makefile plugins/dbio/xmldb/xmldb.xml plugins/dbio/xmldb/ressource.rc plugins/ct/Makefile plugins/ct/ohbci/Makefile plugins/ct/ohbci/ohbci.xml plugins/ct/ohbci/ressource.rc plugins/configmgr/Makefile plugins/configmgr/dir/Makefile plugins/configmgr/dir/dir.xml tools/Makefile tools/xmlmerge/Makefile tools/typemaker/Makefile tools/typemaker2/Makefile tools/typemaker2/c/Makefile tools/typemaker2/types/Makefile tools/typemaker2/types/c/Makefile tools/gcttool/Makefile tools/gsa/Makefile tools/gwenbuild/Makefile tools/gwenbuild/parser/Makefile tools/gwenbuild/tools/Makefile tools/gwenbuild/buildctx/Makefile tools/gwenbuild/builders/Makefile tools/gwenbuild/builders/posix/Makefile tools/gwenbuild/builders/windows/Makefile tools/gwenbuild/types/Makefile tools/gwenbuild/templates/Makefile test/Makefile gui/Makefile gui/cpp/Makefile gui/cpp/gwengui-cpp-config.cmake gui/cpp/gwengui-cpp-config-version.cmake gui/qt4/Makefile gui/qt4/gwengui-qt4.pc gui/qt4/gwengui-qt4-config.cmake gui/qt4/gwengui-qt4-config-version.cmake gui/qt5/Makefile gui/qt5/gwengui-qt5.pc gui/qt5/gwengui-qt5-config.cmake gui/qt5/gwengui-qt5-config-version.cmake gui/qt5/gwengui-qt6.pc gui/qt5/gwengui-qt6-config.cmake gui/qt5/gwengui-qt6-config-version.cmake gui/fox16/Makefile gui/fox16/gwengui-fox16.pc gui/gtk2/Makefile gui/gtk2/gwengui-gtk2.pc gui/gtk3/Makefile gui/gtk3/gwengui-gtk3.pc gui/cocoa/Makefile gui/testdialogs/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_CERTS_TRUE}" && test -z "${INSTALL_CERTS_FALSE}"; then as_fn_error $? "conditional \"INSTALL_CERTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_WINDOWS_TRUE}" && test -z "${IS_WINDOWS_FALSE}"; then as_fn_error $? "conditional \"IS_WINDOWS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IF_HAVE_OPENSSL_TRUE}" && test -z "${IF_HAVE_OPENSSL_FALSE}"; then as_fn_error $? "conditional \"IF_HAVE_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IF_MAKE_I18N_FILES_TRUE}" && test -z "${IF_MAKE_I18N_FILES_FALSE}"; then as_fn_error $? "conditional \"IF_MAKE_I18N_FILES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_GUI_FOX16_TRUE}" && test -z "${WITH_GUI_FOX16_FALSE}"; then as_fn_error $? "conditional \"WITH_GUI_FOX16\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_GUI_GTK2_TRUE}" && test -z "${WITH_GUI_GTK2_FALSE}"; then as_fn_error $? "conditional \"WITH_GUI_GTK2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_GUI_GTK3_TRUE}" && test -z "${WITH_GUI_GTK3_FALSE}"; then as_fn_error $? "conditional \"WITH_GUI_GTK3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_LIBXML2_CODE_TRUE}" && test -z "${WITH_LIBXML2_CODE_FALSE}"; then as_fn_error $? "conditional \"WITH_LIBXML2_CODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_GUI_QT4_TRUE}" && test -z "${WITH_GUI_QT4_FALSE}"; then as_fn_error $? "conditional \"WITH_GUI_QT4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # 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 generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_RC='`$ECHO "$compiler_lib_search_dirs_RC" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_RC='`$ECHO "$predep_objects_RC" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_RC='`$ECHO "$postdep_objects_RC" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' predeps_RC='`$ECHO "$predeps_RC" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_RC='`$ECHO "$postdeps_RC" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_RC='`$ECHO "$compiler_lib_search_path_RC" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ AS \ LD_CXX \ LD_RC \ reload_flag_CXX \ reload_flag_RC \ compiler_CXX \ compiler_RC \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_RC \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_RC \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_wl_RC \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_RC \ lt_cv_prog_compiler_c_o_CXX \ lt_cv_prog_compiler_c_o_RC \ export_dynamic_flag_spec_CXX \ export_dynamic_flag_spec_RC \ whole_archive_flag_spec_CXX \ whole_archive_flag_spec_RC \ compiler_needs_object_CXX \ compiler_needs_object_RC \ with_gnu_ld_CXX \ with_gnu_ld_RC \ allow_undefined_flag_CXX \ allow_undefined_flag_RC \ no_undefined_flag_CXX \ no_undefined_flag_RC \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_RC \ exclude_expsyms_CXX \ exclude_expsyms_RC \ include_expsyms_CXX \ include_expsyms_RC \ file_list_spec_CXX \ file_list_spec_RC \ compiler_lib_search_dirs_CXX \ compiler_lib_search_dirs_RC \ predep_objects_CXX \ predep_objects_RC \ postdep_objects_CXX \ postdep_objects_RC \ predeps_CXX \ predeps_RC \ postdeps_CXX \ postdeps_RC \ compiler_lib_search_path_CXX \ compiler_lib_search_path_RC; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ reload_cmds_RC \ old_archive_cmds_CXX \ old_archive_cmds_RC \ old_archive_from_new_cmds_CXX \ old_archive_from_new_cmds_RC \ old_archive_from_expsyms_cmds_CXX \ old_archive_from_expsyms_cmds_RC \ archive_cmds_CXX \ archive_cmds_RC \ archive_expsym_cmds_CXX \ archive_expsym_cmds_RC \ module_cmds_CXX \ module_cmds_RC \ module_expsym_cmds_CXX \ module_expsym_cmds_RC \ export_symbols_cmds_CXX \ export_symbols_cmds_RC \ prelink_cmds_CXX \ prelink_cmds_RC \ postlink_cmds_CXX \ postlink_cmds_RC; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "admin/Makefile") CONFIG_FILES="$CONFIG_FILES admin/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "gwenhywfar-config.in") CONFIG_FILES="$CONFIG_FILES gwenhywfar-config.in" ;; "gwenhywfar.pc") CONFIG_FILES="$CONFIG_FILES gwenhywfar.pc" ;; "gwenhywfar-config.cmake") CONFIG_FILES="$CONFIG_FILES gwenhywfar-config.cmake" ;; "gwenhywfar-config-version.cmake") CONFIG_FILES="$CONFIG_FILES gwenhywfar-config-version.cmake" ;; "gwenhywfar.spec") CONFIG_FILES="$CONFIG_FILES gwenhywfar.spec" ;; "gwenhywfar.iss") CONFIG_FILES="$CONFIG_FILES gwenhywfar.iss" ;; "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/dialog/Makefile") CONFIG_FILES="$CONFIG_FILES doc/dialog/Makefile" ;; "doc/dialog/images/Makefile") CONFIG_FILES="$CONFIG_FILES doc/dialog/images/Makefile" ;; "doc/inherit/Makefile") CONFIG_FILES="$CONFIG_FILES doc/inherit/Makefile" ;; "doc/plugindescr.xsd") CONFIG_FILES="$CONFIG_FILES doc/plugindescr.xsd" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/types.h") CONFIG_FILES="$CONFIG_FILES src/types.h" ;; "src/ressource.rc") CONFIG_FILES="$CONFIG_FILES src/ressource.rc" ;; "src/version.h") CONFIG_FILES="$CONFIG_FILES src/version.h" ;; "src/base/Makefile") CONFIG_FILES="$CONFIG_FILES src/base/Makefile" ;; "src/crypt3/Makefile") CONFIG_FILES="$CONFIG_FILES src/crypt3/Makefile" ;; "src/cryptmsg/Makefile") CONFIG_FILES="$CONFIG_FILES src/cryptmsg/Makefile" ;; "src/crypttoken/Makefile") CONFIG_FILES="$CONFIG_FILES src/crypttoken/Makefile" ;; "src/gui/Makefile") CONFIG_FILES="$CONFIG_FILES src/gui/Makefile" ;; "src/sio/Makefile") CONFIG_FILES="$CONFIG_FILES src/sio/Makefile" ;; "src/html/Makefile") CONFIG_FILES="$CONFIG_FILES src/html/Makefile" ;; "src/os/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/Makefile" ;; "src/os/posix/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/posix/Makefile" ;; "src/os/posix/system.h") CONFIG_FILES="$CONFIG_FILES src/os/posix/system.h" ;; "src/os/windows/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/windows/Makefile" ;; "src/os/windows/system.h") CONFIG_FILES="$CONFIG_FILES src/os/windows/system.h" ;; "src/parser/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/Makefile" ;; "src/sar/Makefile") CONFIG_FILES="$CONFIG_FILES src/sar/Makefile" ;; "src/test_framework/Makefile") CONFIG_FILES="$CONFIG_FILES src/test_framework/Makefile" ;; "src/xmlcmd/Makefile") CONFIG_FILES="$CONFIG_FILES src/xmlcmd/Makefile" ;; "src/msgio/Makefile") CONFIG_FILES="$CONFIG_FILES src/msgio/Makefile" ;; "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "plugins/dbio/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dbio/Makefile" ;; "plugins/dbio/csv/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dbio/csv/Makefile" ;; "plugins/dbio/csv/csv.xml") CONFIG_FILES="$CONFIG_FILES plugins/dbio/csv/csv.xml" ;; "plugins/dbio/csv/ressource.rc") CONFIG_FILES="$CONFIG_FILES plugins/dbio/csv/ressource.rc" ;; "plugins/dbio/olddb/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dbio/olddb/Makefile" ;; "plugins/dbio/olddb/olddb.xml") CONFIG_FILES="$CONFIG_FILES plugins/dbio/olddb/olddb.xml" ;; "plugins/dbio/olddb/ressource.rc") CONFIG_FILES="$CONFIG_FILES plugins/dbio/olddb/ressource.rc" ;; "plugins/dbio/xmldb/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dbio/xmldb/Makefile" ;; "plugins/dbio/xmldb/xmldb.xml") CONFIG_FILES="$CONFIG_FILES plugins/dbio/xmldb/xmldb.xml" ;; "plugins/dbio/xmldb/ressource.rc") CONFIG_FILES="$CONFIG_FILES plugins/dbio/xmldb/ressource.rc" ;; "plugins/ct/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/ct/Makefile" ;; "plugins/ct/ohbci/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/ct/ohbci/Makefile" ;; "plugins/ct/ohbci/ohbci.xml") CONFIG_FILES="$CONFIG_FILES plugins/ct/ohbci/ohbci.xml" ;; "plugins/ct/ohbci/ressource.rc") CONFIG_FILES="$CONFIG_FILES plugins/ct/ohbci/ressource.rc" ;; "plugins/configmgr/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/configmgr/Makefile" ;; "plugins/configmgr/dir/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/configmgr/dir/Makefile" ;; "plugins/configmgr/dir/dir.xml") CONFIG_FILES="$CONFIG_FILES plugins/configmgr/dir/dir.xml" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/xmlmerge/Makefile") CONFIG_FILES="$CONFIG_FILES tools/xmlmerge/Makefile" ;; "tools/typemaker/Makefile") CONFIG_FILES="$CONFIG_FILES tools/typemaker/Makefile" ;; "tools/typemaker2/Makefile") CONFIG_FILES="$CONFIG_FILES tools/typemaker2/Makefile" ;; "tools/typemaker2/c/Makefile") CONFIG_FILES="$CONFIG_FILES tools/typemaker2/c/Makefile" ;; "tools/typemaker2/types/Makefile") CONFIG_FILES="$CONFIG_FILES tools/typemaker2/types/Makefile" ;; "tools/typemaker2/types/c/Makefile") CONFIG_FILES="$CONFIG_FILES tools/typemaker2/types/c/Makefile" ;; "tools/gcttool/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gcttool/Makefile" ;; "tools/gsa/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gsa/Makefile" ;; "tools/gwenbuild/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/Makefile" ;; "tools/gwenbuild/parser/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/parser/Makefile" ;; "tools/gwenbuild/tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/tools/Makefile" ;; "tools/gwenbuild/buildctx/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/buildctx/Makefile" ;; "tools/gwenbuild/builders/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/builders/Makefile" ;; "tools/gwenbuild/builders/posix/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/builders/posix/Makefile" ;; "tools/gwenbuild/builders/windows/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/builders/windows/Makefile" ;; "tools/gwenbuild/types/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/types/Makefile" ;; "tools/gwenbuild/templates/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gwenbuild/templates/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "gui/Makefile") CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;; "gui/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES gui/cpp/Makefile" ;; "gui/cpp/gwengui-cpp-config.cmake") CONFIG_FILES="$CONFIG_FILES gui/cpp/gwengui-cpp-config.cmake" ;; "gui/cpp/gwengui-cpp-config-version.cmake") CONFIG_FILES="$CONFIG_FILES gui/cpp/gwengui-cpp-config-version.cmake" ;; "gui/qt4/Makefile") CONFIG_FILES="$CONFIG_FILES gui/qt4/Makefile" ;; "gui/qt4/gwengui-qt4.pc") CONFIG_FILES="$CONFIG_FILES gui/qt4/gwengui-qt4.pc" ;; "gui/qt4/gwengui-qt4-config.cmake") CONFIG_FILES="$CONFIG_FILES gui/qt4/gwengui-qt4-config.cmake" ;; "gui/qt4/gwengui-qt4-config-version.cmake") CONFIG_FILES="$CONFIG_FILES gui/qt4/gwengui-qt4-config-version.cmake" ;; "gui/qt5/Makefile") CONFIG_FILES="$CONFIG_FILES gui/qt5/Makefile" ;; "gui/qt5/gwengui-qt5.pc") CONFIG_FILES="$CONFIG_FILES gui/qt5/gwengui-qt5.pc" ;; "gui/qt5/gwengui-qt5-config.cmake") CONFIG_FILES="$CONFIG_FILES gui/qt5/gwengui-qt5-config.cmake" ;; "gui/qt5/gwengui-qt5-config-version.cmake") CONFIG_FILES="$CONFIG_FILES gui/qt5/gwengui-qt5-config-version.cmake" ;; "gui/qt5/gwengui-qt6.pc") CONFIG_FILES="$CONFIG_FILES gui/qt5/gwengui-qt6.pc" ;; "gui/qt5/gwengui-qt6-config.cmake") CONFIG_FILES="$CONFIG_FILES gui/qt5/gwengui-qt6-config.cmake" ;; "gui/qt5/gwengui-qt6-config-version.cmake") CONFIG_FILES="$CONFIG_FILES gui/qt5/gwengui-qt6-config-version.cmake" ;; "gui/fox16/Makefile") CONFIG_FILES="$CONFIG_FILES gui/fox16/Makefile" ;; "gui/fox16/gwengui-fox16.pc") CONFIG_FILES="$CONFIG_FILES gui/fox16/gwengui-fox16.pc" ;; "gui/gtk2/Makefile") CONFIG_FILES="$CONFIG_FILES gui/gtk2/Makefile" ;; "gui/gtk2/gwengui-gtk2.pc") CONFIG_FILES="$CONFIG_FILES gui/gtk2/gwengui-gtk2.pc" ;; "gui/gtk3/Makefile") CONFIG_FILES="$CONFIG_FILES gui/gtk3/Makefile" ;; "gui/gtk3/gwengui-gtk3.pc") CONFIG_FILES="$CONFIG_FILES gui/gtk3/gwengui-gtk3.pc" ;; "gui/cocoa/Makefile") CONFIG_FILES="$CONFIG_FILES gui/cocoa/Makefile" ;; "gui/testdialogs/Makefile") CONFIG_FILES="$CONFIG_FILES gui/testdialogs/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX RC ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive (by configure). lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Assembler program. AS=$lt_AS # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: RC # The linker used to build libraries. LD=$lt_LD_RC # How to create reloadable object files. reload_flag=$lt_reload_flag_RC reload_cmds=$lt_reload_cmds_RC # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_RC # A language specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU compiler? with_gcc=$GCC_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_RC # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_RC # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_RC # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_RC # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_RC # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_RC # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_RC # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_RC # Specify filename containing input files. file_list_spec=$lt_file_list_spec_RC # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_RC postdep_objects=$lt_postdep_objects_RC predeps=$lt_predeps_RC postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # ### END LIBTOOL TAG CONFIG: RC _LT_EOF ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ###------------------------------------------------------------------------- # # create header directory, make symlinks # HEADER_DIRS="src src/base src/crypt3 src/cryptmsg src/crypttoken src/sio src/os src/os/${GWEN_OS} src/gui src/html" HEADER_DIRS="${HEADER_DIRS} src/parser src/sar src/xmlcmd src/msgio src/test_framework" lprefix="${srcdir}" lprefix=`( cd ${lprefix} ; pwd )` rm -Rf gwenhywfar5 2>/dev/null mkdir -p gwenhywfar5/gwenhywfar for d in ${HEADER_DIRS}; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwenhywfar/${f}" ;; esac done done #ln -s "${lprefix}/src/os/$OS_TYPE/system.h" "gwenhywfar5/gwenhywfar/system.h" 2>/dev/null # cpp # rm -Rf gwenhywfar5/gwen-gui-cpp 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-cpp for d in gui/cpp; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-cpp/${f}" ;; esac done done # qt4 # rm -Rf gwenhywfar5/gwen-gui-qt4 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-qt4 for d in gui/qt4; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp | qt4_gui_*.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-qt4/${f}" ;; esac done done # qt5 # rm -Rf gwenhywfar5/gwen-gui-qt5 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-qt5 for d in gui/qt5; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp | qt5_gui_*.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-qt5/${f}" ;; esac done done # fox16 # rm -Rf gwenhywfar5/gwen-gui-fox16 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-fox16 for d in gui/fox16; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp | fox16_gui_*.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-fox16/${f}" ;; esac done done # gtk2 # rm -Rf gwenhywfar5/gwen-gui-gtk2 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-gtk2 for d in gui/gtk2; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h | gtk2_gui_*.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-gtk2/${f}" ;; esac done done # gtk3 # rm -Rf gwenhywfar5/gwen-gui-gtk3 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-gtk3 for d in gui/gtk3; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h | gtk3_gui_*.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-gtk3/${f}" ;; esac done done # cocoa # rm -Rf gwenhywfar5/gwen-gui-cocoa 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-cocoa for d in gui/cocoa; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h | gtk2_gui_*.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-cocoa/${f}" ;; esac done done ###------------------------------------------------------------------------- # # summary # echo echo "Summary" echo "=============================================" echo "Version : $GWENHYWFAR_VERSION_FULL_STRING" echo "System : $OSYSTEM" echo "Installation Folder : $prefix" echo "Local Installation Mode : $enable_local_install" echo "Plugin Installation Folder : $gwenhywfar_plugindir" echo "Plugin Search Folder : $gwenhywfar_plugin_searchdir" echo "Data Search Folder : $gwenhywfar_data_searchdir" echo "Locale Search Folder : $gwenhywfar_locale_searchdir" echo "Config Search Folder : $gwenhywfar_cfg_searchdir" echo "Buffer Default Hard Limit : $gwenhywfar_buffer_hardlimit" echo "Symbol Visibility : $visibility_supported" echo "OpenSSL Support for gct-tool : $ssl_available" echo "GUI Support : $gwenhywfar_guis" echo "Use system-wide certificates : $enable_system_certs" echo "Compiling test code enabled : $enable_testcode" echo "Compile LibXML2 code : $gwen_with_libxml2_code" echo echo "Plugins" echo "=============================================" echo " Crypt token plugins :$gwenhywfar_plugins_ct_dirs" echo " DBIO plugins :$gwenhywfar_plugins_dbio_dirs" echo " ConfigManager plugins :$gwenhywfar_plugins_cfgmgr_dirs" echo echo "You can now use the command 'make' (or on *BSD 'gmake') to " echo "build Gwenhywfar." echo gwenhywfar-5.12.1/INSTALL0000644000175000017500000002203013142134462011730 00000000000000Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. gwenhywfar-5.12.1/ChangeLog0000644000175000017500000004540315032533707012467 00000000000000------------------------------------------------------------------ 2025-07-05 10:40:11 +0200 Thomas Baumgart Added missing symlink for Qt6 ------------------------------------------------------------------ 2025-06-16 20:12:10 +0200 Thomas Baumgart Support building for Qt6 ------------------------------------------------------------------ 2025-06-18 00:22:56 +0200 Martin Preuss nogui: fixed a bug. returning 1 completely disables logging in NOGUI module which isn't exactly what's intended; we don't want console output by NOGUI, but we don't want to suppress logs to files or syslog. ------------------------------------------------------------------ 2025-06-18 00:20:01 +0200 Martin Preuss logger: don't open already opened logger. ------------------------------------------------------------------ 2025-06-16 19:59:53 +0200 Thomas Baumgart Fix name of output variable ------------------------------------------------------------------ 2025-03-20 01:10:01 +0100 Martin Preuss inetsocket: added flags (for raw dumping). ------------------------------------------------------------------ 2025-03-20 01:08:44 +0100 Martin Preuss tag16: added some tag read/write functions. ------------------------------------------------------------------ 2025-03-20 01:08:20 +0100 Martin Preuss added GWEN_Timestamp_GetWeekDay() ------------------------------------------------------------------ 2025-02-23 21:44:55 +0100 Micha Lenk Remove double declaration of HtmlObject_Grid_new This fixes a build failure when compiling with GCC 15 due to conflicting declarations of HtmlObject_Grid_new. The build failure was initially reported by Matthias Klose as Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097194 ------------------------------------------------------------------ 2024-12-25 15:43:00 +0100 Thomas Baumgart Fix compilation under MacOS ------------------------------------------------------------------ 2024-12-17 20:15:01 +0100 Martin Preuss Released 5.12.0 ------------------------------------------------------------------ 2024-12-17 19:57:07 +0100 Martin Preuss Prepared release 5.12.0 ------------------------------------------------------------------ 2024-12-17 19:51:11 +0100 Martin Preuss msgio: add argument REASON to GWEN_MsgRequest_Abort() ------------------------------------------------------------------ 2024-10-01 21:36:51 +0200 Martin Preuss msgio: add class GWEN_REQUEST. ------------------------------------------------------------------ 2024-10-01 21:36:05 +0200 Martin Preuss msgio/endpoint: added reference counter. ------------------------------------------------------------------ 2024-10-01 21:35:25 +0200 Martin Preuss timestamp: added GWEN_Timestamp_AddSeconds(). ------------------------------------------------------------------ 2024-09-24 16:41:33 +0200 Martin Preuss msgio: improved error handling. ------------------------------------------------------------------ 2024-09-24 16:41:07 +0200 Martin Preuss test: adjusted to latest changes. ------------------------------------------------------------------ 2024-09-24 16:40:28 +0200 Martin Preuss parser: fixed a typo. ------------------------------------------------------------------ 2024-09-24 16:40:11 +0200 Martin Preuss msgio: added fields ID and REFID to ipc messages. Use new convenience fns of GWEN_MSG. ------------------------------------------------------------------ 2024-09-24 16:38:52 +0200 Martin Preuss msgio: added missing change. ------------------------------------------------------------------ 2024-09-24 16:38:32 +0200 Martin Preuss msgio: improved GWEN_MSG, added convenience functions. ------------------------------------------------------------------ 2024-09-24 16:37:54 +0200 Martin Preuss msgio: introduce GWEN_MsgEndpoint_GetNextMessageId() ------------------------------------------------------------------ 2024-08-03 11:57:04 +0200 Micha Lenk Use pkgconf for gpg-error build flags On some build systems the old automake macro AM_PATH_GPG_ERROR doesn't work because the binary gpg-error-config no longer exists. As a gpg-error.pc file is available, let's switch to this more contemporary approach to determine the gpg-error build flags. ------------------------------------------------------------------ 2024-07-05 23:52:17 +0200 Martin Preuss Fixed call to readlink(). readlink() doesn't append a NULL!! ------------------------------------------------------------------ 2024-06-14 21:46:54 +0200 Martin Preuss gsa: fixed handling of symbolic links. ------------------------------------------------------------------ 2024-06-14 21:08:38 +0200 Martin Preuss incremented version. ------------------------------------------------------------------ 2024-06-14 21:08:27 +0200 Martin Preuss gwenbuild: use lstat if possible (otherwise symbolic links will be resolved). ------------------------------------------------------------------ 2024-06-14 21:07:44 +0200 Martin Preuss gwenbuild: also install symbolic links for libs. ------------------------------------------------------------------ 2024-04-21 18:18:46 +0200 Martin Preuss Incremented version. ------------------------------------------------------------------ 2024-04-21 18:18:34 +0200 Martin Preuss README: remove var from documentation (no longer used). ------------------------------------------------------------------ 2024-04-21 16:10:40 +0200 Martin Preuss Added GWENHYWFAR_CB to function implementations also (seems to be required from MinGW64, see #306) ------------------------------------------------------------------ 2024-04-21 16:06:29 +0200 Martin Preuss Use GWEN_Text_strndup() instead of strndup (the latter is not available with MinGW64). ------------------------------------------------------------------ 2024-04-21 16:02:18 +0200 Martin Preuss Added license info for portable_endian.h (public domain). ------------------------------------------------------------------ 2024-04-21 15:57:35 +0200 Martin Preuss Fixed a bug in GWEN_Date (day numbering starts at 1, not zero). ------------------------------------------------------------------ 2024-04-21 15:56:42 +0200 Martin Preuss Use new "portable_endian.h" instead of endian.h ------------------------------------------------------------------ 2024-04-21 15:56:16 +0200 Martin Preuss Added "portable_endian.h" from https://gist.github.com/panzi/6856583 ------------------------------------------------------------------ 2024-04-12 12:36:09 +0200 Martin Preuss gwenbuild: improved error message handling. Frame error messages from gcc or other called tools with "entering directory ..." and "leaving directory ..." to improve error handling when calling gwbuild from an IDE (or in my case FTE). Those lines help the IDE to locate files (e.g. when there are errors in included files). ------------------------------------------------------------------ 2024-03-19 22:47:52 +0100 Martin Preuss incremented version. ------------------------------------------------------------------ 2024-03-19 22:39:30 +0100 Martin Preuss make list types typesafe. "typedef GWEN_LIST1 t##_LIST" will not allow to detect when a wrong list type is used as long as any list type is used. That will most likely lead to undefined behaviour. Maybe we will need to increment the major build version because of this. ------------------------------------------------------------------ 2024-03-19 22:13:37 +0100 Martin Preuss gwen_buffer: corrected use of va_start and va_end. ------------------------------------------------------------------ 2024-03-19 00:03:17 +0100 Martin Preuss Released 5.11.0beta. ------------------------------------------------------------------ 2024-02-24 18:40:20 +0100 Martin Preuss Decreased verbosity. ------------------------------------------------------------------ 2024-02-24 18:39:43 +0100 Martin Preuss Fixed problem with arrays and objects when searching for keys. ------------------------------------------------------------------ 2024-02-23 21:00:51 +0100 Martin Preuss Fixed a memory leak. ------------------------------------------------------------------ 2023-11-08 23:28:46 +0100 Martin Preuss Cleanup GWEN_Gui_Internal_GetPassword() Make this function easier to understand. ------------------------------------------------------------------ 2023-11-08 22:29:19 +0100 Martin Preuss Fixed a memory leak. ------------------------------------------------------------------ 2023-10-07 17:16:49 +0200 Martin Preuss Hopefully fixed delay between two messages in the output queue. ------------------------------------------------------------------ 2023-10-06 14:47:17 +0200 Martin Preuss added missing files to Makefiles. ------------------------------------------------------------------ 2023-10-01 15:25:35 +0200 Martin Preuss msgio: add INHERIT functionality to GWEN_MSG. ------------------------------------------------------------------ 2023-10-01 14:08:06 +0200 Martin Preuss gwentest: added missing NEWLINE. ------------------------------------------------------------------ 2023-10-01 14:07:51 +0200 Martin Preuss tag16: added functions with test - GWEN_Tag16_StartTagInBuffer() - GWEN_Tag16_EndTagInBuffer() ------------------------------------------------------------------ 2023-09-20 17:23:21 +0200 Martin Preuss endpoint_multilayer: added "stage" field. this field can be used by complex derived classes to store the current stage. ------------------------------------------------------------------ 2023-09-17 19:13:47 +0200 Martin Preuss msgio: added multilayer endpoint Use this endpoint to allow for autoconnect while using a handshake protocol ------------------------------------------------------------------ 2023-09-17 19:11:20 +0200 Martin Preuss msg: allow for dynamic memory allocation. ------------------------------------------------------------------ 2023-09-17 19:10:50 +0200 Martin Preuss Fixed a bug. ------------------------------------------------------------------ 2023-09-13 10:31:12 +0200 Martin Preuss tag16: added function GWEN_Tag16_WriteTagToBuffer(). will replace GWEN_Tag16_DirectlyToBuffer(). ------------------------------------------------------------------ 2023-09-12 21:31:40 +0200 Martin Preuss Revert "Add INHERIT logic to GWEN_MSG." This reverts commit 240977be4e76ed784450eddad08aa0a1c6764e52. ------------------------------------------------------------------ 2023-09-12 21:31:26 +0200 Martin Preuss Add INHERIT logic to GWEN_MSG. ------------------------------------------------------------------ 2023-09-10 16:58:20 +0200 Martin Preuss Added apidoc, allow to use header from c++. ------------------------------------------------------------------ 2023-09-10 16:51:37 +0200 Martin Preuss tag16: code cleanup, added functions, added unit tests. ------------------------------------------------------------------ 2023-09-10 14:23:31 +0200 Martin Preuss Fixed function params, added GWEN_Msg_GetUint64At(). ------------------------------------------------------------------ 2023-09-09 10:28:15 +0200 Micha Lenk Fix cross compilation libgwenhywfar failed to cross build from source, because it fails running mklistdoc with an "Exec format error". This happens when attempting to run a tool that is built for the host architecture. mklistdoc really needs to be built for the host architecture, because it is installed into gwenhywfar-tools. On the flip side that means that we can just run the mklistdoc from a system gwenhywfar-tools. Note that this change only affects cross compilation. In native builds, the built mklistdoc will continue to be used. These changes were initially reported by Helmut Grohne via the Debian bug tracker (see https://bugs.debian.org/1051173). ------------------------------------------------------------------ 2023-08-11 17:30:49 +0200 Martin Preuss fixed a typo. ------------------------------------------------------------------ 2023-08-11 17:29:49 +0200 Martin Preuss Modified toObject/fromObject functions for "double" type. Those templates are only used in projects using AqDatabase. Those projects will need the latest git version of AqDatabase. ------------------------------------------------------------------ 2023-08-10 12:26:36 +0200 Martin Preuss gwbuild: added some "static"s. ------------------------------------------------------------------ 2023-08-10 12:26:18 +0200 Martin Preuss gwbuild: no longer try to install symlinks for sharedlibs. Those symlinks are needed when running freshly built binaries from within the build folder without installing them. But after installation the command "ldconfig" is responsible for creating appropriate symlinks. ------------------------------------------------------------------ 2023-08-10 12:05:44 +0200 Martin Preuss gwbuild: added comment for element inside ") */ if (n->data) { GWEN_FASTBUFFER_WRITEFORCED(fb, rv, "data, -1); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (flags & GWEN_XML_FLAGS_SIMPLE) { #if 0 if (!hasSubTags) { GWEN_FASTBUFFER_WRITELINE(fb, rv, ">"); } else { GWEN_FASTBUFFER_WRITEFORCED(fb, rv, ">", -1); } #else GWEN_FASTBUFFER_WRITELINE(fb, rv, ">"); #endif } else { GWEN_FASTBUFFER_WRITELINE(fb, rv, ">"); } if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { GWEN_FASTBUFFER_WRITELINE(fb, rv, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } static int GWEN_XMLNode__WriteDataToStream(const GWEN_XMLNODE *n, GWEN_FAST_BUFFER *fb, uint32_t flags, const char *encoding, unsigned int ind) { if (n->data) { GWEN_BUFFER *buf; int rv=0; if (!(flags & GWEN_XML_FLAGS_SIMPLE)) { if (flags & GWEN_XML_FLAGS_INDENT) { rv=GWEN_XMLNode__WriteIndents(fb, ind); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } buf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Text_ConvertCharset("UTF-8", encoding, n->data, strlen(n->data), buf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(buf); return rv; } GWEN_FASTBUFFER_WRITEFORCED(fb, rv, GWEN_Buffer_GetStart(buf), -1); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(buf); return rv; } GWEN_Buffer_free(buf); if (!(flags & GWEN_XML_FLAGS_SIMPLE)) { GWEN_FASTBUFFER_WRITELINE(fb, rv, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } static int GWEN_XMLNode__WriteCommentToStream(const GWEN_XMLNODE *n, GWEN_FAST_BUFFER *fb, uint32_t flags, const char *encoding, unsigned int ind) { if (n->data) { GWEN_BUFFER *buf; int rv=0; if (!(flags & GWEN_XML_FLAGS_SIMPLE)) { if (flags & GWEN_XML_FLAGS_INDENT) { rv=GWEN_XMLNode__WriteIndents(fb, ind); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } GWEN_FASTBUFFER_WRITEFORCED(fb, rv, "", -1); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (!(flags & GWEN_XML_FLAGS_SIMPLE)) { GWEN_FASTBUFFER_WRITELINE(fb, rv, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } static int GWEN_XMLNode__WriteToStream(const GWEN_XMLNODE *n, GWEN_FAST_BUFFER *fb, uint32_t flags, const char *encoding, unsigned int ind) { int rv; assert(n); if (n->type==GWEN_XMLNodeTypeTag) { rv=GWEN_XMLNode__WriteTagToStream(n, fb, flags, encoding, ind); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else if (n->type==GWEN_XMLNodeTypeData) { rv=GWEN_XMLNode__WriteDataToStream(n, fb, flags, encoding, ind); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else if (n->type==GWEN_XMLNodeTypeComment) { if (flags & GWEN_XML_FLAGS_HANDLE_COMMENTS) { rv=GWEN_XMLNode__WriteCommentToStream(n, fb, flags, encoding, ind); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown tag type (%d)", n->type); } return 0; } int GWEN_XMLNode_WriteToStream(const GWEN_XMLNODE *n, GWEN_XML_CONTEXT *ctx, GWEN_SYNCIO *sio) { const GWEN_XMLNODE *nn; const GWEN_XMLNODE *nchild; const GWEN_XMLNODE *nheader; uint32_t flags; GWEN_FAST_BUFFER *fb; int rv; flags=GWEN_XmlCtx_GetFlags(ctx); nchild=GWEN_XMLNode_GetChild(n); nheader=GWEN_XMLNode_GetHeader(n); fb=GWEN_FastBuffer_new(512, sio); if (nheader && (flags & GWEN_XML_FLAGS_HANDLE_HEADERS)) { nn=nheader; while (nn) { const GWEN_XMLNODE *next; rv=GWEN_XMLNode__WriteToStream(nn, fb, flags, GWEN_XmlCtx_GetEncoding(ctx), 0); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_FastBuffer_free(fb); return rv; } next=GWEN_XMLNode_Next(nn); if (next) { int err; GWEN_FASTBUFFER_WRITELINE(fb, err, ""); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", err); GWEN_FastBuffer_free(fb); return err; } } if (strcmp(GWEN_XMLNode_GetData(nn), "?xml")==0) { const char *encoding; encoding=GWEN_XMLNode_GetProperty(nn, "encoding", NULL); if (encoding) { if (strcasecmp(encoding, "UTF-8")==0 || strcasecmp(encoding, "UTF8")==0) encoding=NULL; GWEN_XmlCtx_SetEncoding(ctx, encoding); } } nn=next; } if (nchild) { int err; GWEN_FASTBUFFER_WRITELINE(fb, err, ""); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", err); GWEN_FastBuffer_free(fb); return err; } } } nn=nchild; while (nn) { const GWEN_XMLNODE *next; if (GWEN_XMLNode__WriteToStream(nn, fb, flags, GWEN_XmlCtx_GetEncoding(ctx), 0)) return -1; next=GWEN_XMLNode_Next(nn); if (next) { int err; GWEN_FASTBUFFER_WRITELINE(fb, err, ""); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", err); GWEN_FastBuffer_free(fb); return err; } } nn=next; } /* while */ GWEN_FASTBUFFER_FLUSH(fb, rv); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_FastBuffer_free(fb); return rv; } GWEN_FastBuffer_free(fb); return 0; } int GWEN_XMLNode_WriteFile(const GWEN_XMLNODE *n, const char *fname, uint32_t flags) { GWEN_XML_CONTEXT *ctx; GWEN_SYNCIO *sio; int rv; sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_CreateAlways); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } /* create context and io layers */ ctx=GWEN_XmlCtxStore_new(NULL, flags); /* write data to stream */ rv=GWEN_XMLNode_WriteToStream(n, ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return rv; } /* close file */ GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return 0; } int GWEN_XMLNode_toBuffer(const GWEN_XMLNODE *n, GWEN_BUFFER *buf, uint32_t flags) { GWEN_XML_CONTEXT *ctx; GWEN_SYNCIO *sio; int rv; sio=GWEN_SyncIo_Memory_new(buf, 0); /* create context and io layers */ ctx=GWEN_XmlCtxStore_new(NULL, flags); /* write data to stream */ rv=GWEN_XMLNode_WriteToStream(n, ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return rv; } GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return 0; } int GWEN_XML__ReadData(GWEN_XML_CONTEXT *ctx, GWEN_FAST_BUFFER *fb, GWEN_UNUSED uint32_t flags) { int chr; unsigned char uc; GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); for (;;) { GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { if (chr==GWEN_ERROR_EOF) break; else { GWEN_Buffer_free(dbuf); return chr; } } uc=(unsigned char) chr; if (uc=='<') break; fb->bufferReadPos++; GWEN_Buffer_AppendByte(dbuf, uc); } if (GWEN_Buffer_GetUsedBytes(dbuf)) { int rv; uint32_t len; char *s; len=GWEN_Buffer_GetUsedBytes(dbuf); s=strdup(GWEN_Buffer_GetStart(dbuf)); assert(s); GWEN_Buffer_Reset(dbuf); rv=GWEN_Text_ConvertCharset(GWEN_XmlCtx_GetEncoding(ctx), "UTF-8", s, len, dbuf); free(s); if (rv) { GWEN_Buffer_free(dbuf); return rv; } s=GWEN_Buffer_GetStart(dbuf); if (*s) { rv=GWEN_XmlCtx_AddData(ctx, s); if (rv) { GWEN_Buffer_free(dbuf); return rv; } } } GWEN_Buffer_free(dbuf); return 0; } int GWEN_XML__ReadTag(GWEN_XML_CONTEXT *ctx, GWEN_FAST_BUFFER *fb, GWEN_UNUSED uint32_t flags, GWEN_BUFFER *dbuf) { int chr; unsigned char uc=0; int rv; /* skip blanks */ for (;;) { GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc>32) break; } if (uc=='/') { /* read end tag */ GWEN_Buffer_AppendByte(dbuf, uc); for (;;) { GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc=='>' || uc<33) break; GWEN_Buffer_AppendByte(dbuf, uc); } rv=GWEN_XmlCtx_StartTag(ctx, GWEN_Buffer_GetStart(dbuf)); if (rv) { return rv; } if (uc!='>') { for (;;) { /* skip blanks, expect '>' */ GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc>32) break; } } if (uc!='>') { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected character"); DBG_ERROR(GWEN_LOGDOMAIN, "Data so far:"); GWEN_Buffer_Dump(dbuf, 2); return GWEN_ERROR_BAD_DATA; } /* tag finished */ rv=GWEN_XmlCtx_EndTag(ctx, 0); if (rv) { return rv; } return 0; } else if (uc=='!') { /* check for comment */ GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc=='-') { fb->bufferReadPos++; GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc=='-') { GWEN_BUFFER *cbuf; /* found comment */ fb->bufferReadPos++; cbuf=GWEN_Buffer_new(0, 256, 0, 1); for (;;) { GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { GWEN_Buffer_free(cbuf); return chr; } uc=(unsigned char) chr; GWEN_Buffer_AppendByte(cbuf, uc); if (GWEN_Buffer_GetUsedBytes(cbuf)>2) { char *p; p=GWEN_Buffer_GetStart(cbuf); p+=GWEN_Buffer_GetUsedBytes(cbuf)-3; if (strcmp(p, "-->")==0) { uint32_t len; *p=0; len=GWEN_Buffer_GetUsedBytes(cbuf)-3; p=strdup(GWEN_Buffer_GetStart(cbuf)); assert(p); GWEN_Buffer_Reset(cbuf); rv=GWEN_Text_ConvertCharset(GWEN_XmlCtx_GetEncoding(ctx), "UTF-8", p, len, cbuf); free(p); if (rv) { GWEN_Buffer_free(cbuf); return rv; } rv=GWEN_XmlCtx_AddComment(ctx, GWEN_Buffer_GetStart(cbuf)); if (rv) { GWEN_Buffer_free(cbuf); return rv; } GWEN_Buffer_free(cbuf); return 0; } } } } else { GWEN_Buffer_AppendString(dbuf, "!-"); } } else uc='!'; } /* read name */ for (;;) { if (uc==' ' || uc=='>' || uc=='/') break; else if (GWEN_Buffer_GetUsedBytes(dbuf)) { unsigned char fc; fc=*GWEN_Buffer_GetStart(dbuf); if ((fc=='!' && uc=='!') || (fc=='?' && uc=='?')) { GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc=='>') { fb->bufferReadPos++; break; } } } GWEN_Buffer_AppendByte(dbuf, uc); GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { if (chr==GWEN_ERROR_EOF) { return chr; } else { return chr; } } uc=(unsigned char) chr; } /* tag started */ if (GWEN_Buffer_GetUsedBytes(dbuf)==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Element name missing"); return GWEN_ERROR_BAD_DATA; } rv=GWEN_XmlCtx_StartTag(ctx, GWEN_Buffer_GetStart(dbuf)); if (rv) { return rv; } if (uc=='/' || uc=='?' || uc=='!') { GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc=='>') { fb->bufferReadPos++; rv=GWEN_XmlCtx_EndTag(ctx, 1); if (rv) { return rv; } /* tag finished */ return 0; } } if (uc=='>') { rv=GWEN_XmlCtx_EndTag(ctx, 0); if (rv) { return rv; } /* tag finished */ return 0; } /* read attributes */ for (;;) { GWEN_BUFFER *nbuf; GWEN_BUFFER *vbuf=NULL; nbuf=GWEN_Buffer_new(0, 256, 0, 1); /* skip blanks */ for (;;) { GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { GWEN_Buffer_free(nbuf); return chr; } uc=(unsigned char) chr; if (uc>32) break; } /* read attribute name */ for (;;) { if (uc=='/' || uc=='!' || uc=='?' || uc=='=' || uc=='>') break; GWEN_Buffer_AppendByte(nbuf, uc); GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { GWEN_Buffer_free(nbuf); return chr; } uc=(unsigned char) chr; } if (GWEN_Buffer_GetUsedBytes(nbuf)) { if (uc=='=') { /* read attribute value if there is an equation mark */ int inQuote=0; uint32_t len; vbuf=GWEN_Buffer_new(0, 256, 0, 1); for (;;) { GWEN_FASTBUFFER_READBYTE(fb, chr); if (chr<0) { GWEN_Buffer_free(nbuf); return chr; } uc=(unsigned char) chr; if (uc=='"') { if (inQuote) { inQuote=0; break; } else inQuote=1; } else { if (!inQuote) { if (uc=='>' || uc<33) break; else if (uc=='<') { DBG_ERROR(GWEN_LOGDOMAIN, "Nested element definitions"); GWEN_Buffer_free(vbuf); GWEN_Buffer_free(nbuf); return GWEN_ERROR_BAD_DATA; } else if (GWEN_Buffer_GetUsedBytes(dbuf)) { if (uc=='/' || uc=='!' || uc=='?') { unsigned char tc; GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { GWEN_Buffer_free(vbuf); GWEN_Buffer_free(nbuf); return chr; } tc=(unsigned char) chr; if (tc=='>') { break; } } } } GWEN_Buffer_AppendByte(vbuf, uc); } } if (inQuote) { DBG_ERROR(GWEN_LOGDOMAIN, "No matching number of quote chars"); GWEN_Buffer_free(vbuf); GWEN_Buffer_free(nbuf); return GWEN_ERROR_BAD_DATA; } len=GWEN_Buffer_GetUsedBytes(vbuf); if (len==0) { GWEN_Buffer_free(vbuf); vbuf=NULL; } else { char *s; s=strdup(GWEN_Buffer_GetStart(vbuf)); GWEN_Buffer_Reset(vbuf); rv=GWEN_Text_ConvertCharset(GWEN_XmlCtx_GetEncoding(ctx), "UTF-8", s, len, vbuf); free(s); if (rv) { GWEN_Buffer_free(vbuf); GWEN_Buffer_free(nbuf); return rv; } } } rv=GWEN_XmlCtx_AddAttr(ctx, GWEN_Buffer_GetStart(nbuf), vbuf?GWEN_Buffer_GetStart(vbuf):NULL); if (rv) { GWEN_Buffer_free(vbuf); GWEN_Buffer_free(nbuf); return rv; } } GWEN_Buffer_free(vbuf); GWEN_Buffer_free(nbuf); if (uc=='>' || uc=='?' || uc=='!' || uc=='/') break; } if (uc=='?' || uc=='!' || uc=='/') { unsigned char ucsave=uc; GWEN_FASTBUFFER_PEEKBYTE(fb, chr); if (chr<0) { return chr; } uc=(unsigned char) chr; if (uc=='>') { DBG_VERBOUS(GWEN_LOGDOMAIN, "Ending tag [%s]", GWEN_Buffer_GetStart(dbuf)); fb->bufferReadPos++; rv=GWEN_XmlCtx_EndTag(ctx, 1); if (rv) { return rv; } /* tag finished */ return 0; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Got an unexpected character here (after %02x[%c]): %02x[%c], " "maybe the text contains unescaped XML characters?", ucsave, ucsave, uc, uc); } } else if (uc=='>') { rv=GWEN_XmlCtx_EndTag(ctx, 0); if (rv) { return rv; } /* tag finished */ return 0; } DBG_ERROR(GWEN_LOGDOMAIN, "Internal error: Should never reach this point"); return GWEN_ERROR_INTERNAL; } int GWEN_XML_ReadFromFastBuffer(GWEN_XML_CONTEXT *ctx, GWEN_FAST_BUFFER *fb) { int oks=0; int startingDepth; GWEN_BUFFER *workBuf; startingDepth=GWEN_XmlCtx_GetDepth(ctx); workBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_XmlCtx_ResetFinishedElement(ctx); for (;;) { int rv; GWEN_FASTBUFFER_PEEKBYTE(fb, rv); if (rv<0) { if (rv!=GWEN_ERROR_EOF || !oks) { DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d), after reading %d bytes", rv, (int) GWEN_FastBuffer_GetBytesRead(fb)); GWEN_Buffer_free(workBuf); return rv; } GWEN_Buffer_free(workBuf); return 0; } rv=GWEN_XML__ReadData(ctx, fb, GWEN_XmlCtx_GetFlags(ctx)); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(workBuf); return rv; } oks=1; GWEN_FASTBUFFER_PEEKBYTE(fb, rv); if (rv<0) { if (rv!=GWEN_ERROR_EOF || !oks || (GWEN_XmlCtx_GetDepth(ctx)!=startingDepth)) { DBG_INFO(GWEN_LOGDOMAIN, "here (rv=%d, oks=%d, depth=%d, startingDepth=%d)", rv, oks, GWEN_XmlCtx_GetDepth(ctx), startingDepth); GWEN_Buffer_free(workBuf); return rv; } GWEN_Buffer_free(workBuf); return 0; } else if (rv=='<') { fb->bufferReadPos++; rv=GWEN_XML__ReadTag(ctx, fb, GWEN_XmlCtx_GetFlags(ctx), workBuf); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(workBuf); return rv; } GWEN_Buffer_Reset(workBuf); oks=1; } if (GWEN_XmlCtx_GetFinishedElement(ctx) && GWEN_XmlCtx_GetDepth(ctx)==startingDepth) { DBG_INFO(GWEN_LOGDOMAIN, "Finished element at depth %d", GWEN_XmlCtx_GetDepth(ctx)); break; } } if (GWEN_XmlCtx_GetDepth(ctx)!=startingDepth) { DBG_ERROR(GWEN_LOGDOMAIN, "Not on same level where we started...(%d!=%d)", GWEN_XmlCtx_GetDepth(ctx), startingDepth); } GWEN_Buffer_free(workBuf); return 0; } int GWEN_XML__ReadAllFromIo(GWEN_XML_CONTEXT *ctx, GWEN_SYNCIO *sio) { GWEN_FAST_BUFFER *fb; int oks=0; fb=GWEN_FastBuffer_new(GWEN_XML_BUFFERSIZE, sio); assert(fb); for (;;) { int rv; rv=GWEN_XML_ReadFromFastBuffer(ctx, fb); if (rv<0) { if (rv==GWEN_ERROR_EOF && oks) break; else { DBG_INFO(GWEN_LOGDOMAIN, "here (rv=%d, oks=%d)", rv, oks); GWEN_FastBuffer_free(fb); return rv; } } oks=1; } GWEN_FastBuffer_free(fb); return 0; } int GWEN_XMLContext_ReadFromIo(GWEN_XML_CONTEXT *ctx, GWEN_SYNCIO *sio) { #if 0 GWEN_FAST_BUFFER *fb; int rv; fb=GWEN_FastBuffer_new(GWEN_XML_BUFFERSIZE, sio); assert(fb); rv=GWEN_XML_ReadFromFastBuffer(ctx, fb); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here"); GWEN_FastBuffer_free(fb); return rv; } GWEN_FastBuffer_free(fb); return 0; #else int rv; rv=GWEN_XML__ReadAllFromIo(ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; #endif } int GWEN_XMLContext_ReadFromFile(GWEN_XML_CONTEXT *ctx, const char *fname) { GWEN_SYNCIO *sio; int rv; sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_OpenExisting); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } rv=GWEN_XML__ReadAllFromIo(ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return 0; } int GWEN_XMLContext_ReadFromString(GWEN_XML_CONTEXT *ctx, const char *text) { if (text && *text) { GWEN_SYNCIO *sio; int rv; GWEN_BUFFER *tbuf; int i; i=strlen(text)+1; tbuf=GWEN_Buffer_new((char *)text, i, i, 0); /* static buffer, don't resize */ GWEN_Buffer_SubMode(tbuf, GWEN_BUFFER_MODE_DYNAMIC); GWEN_Buffer_AddMode(tbuf, GWEN_BUFFER_MODE_READONLY); sio=GWEN_SyncIo_Memory_new(tbuf, 0); rv=GWEN_XML__ReadAllFromIo(ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); GWEN_Buffer_free(tbuf); return rv; } GWEN_SyncIo_free(sio); GWEN_Buffer_free(tbuf); } return 0; } int GWEN_XML_ReadFile(GWEN_XMLNODE *n, const char *filepath, uint32_t flags) { GWEN_XML_CONTEXT *ctx; GWEN_SYNCIO *sio; int rv; sio=GWEN_SyncIo_File_new(filepath, GWEN_SyncIo_File_CreationMode_OpenExisting); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } ctx=GWEN_XmlCtxStore_new(n, flags); rv=GWEN_XML__ReadAllFromIo(ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return rv; } GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return 0; } GWEN_XMLNODE *GWEN_XMLNode_fromString(const char *s, int len, uint32_t flags) { #if 0 GWEN_XML_CONTEXT *ctx; GWEN_SYNCIO *sio; GWEN_XMLNODE *n; int rv; if (len==0) len=strlen(s); sio=GWEN_SyncIo_Memory_fromBuffer((const uint8_t *)s, len); n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "doc"); ctx=GWEN_XmlCtxStore_new(n, flags); rv=GWEN_XML__ReadAllFromIo(ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); GWEN_XMLNode_free(n); return NULL; } GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return n; #else GWEN_XML_CONTEXT *ctx; GWEN_SYNCIO *sio; GWEN_XMLNODE *n; int rv; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new((char *)s, len, len, 0); /* static buffer, don't resize */ GWEN_Buffer_SubMode(tbuf, GWEN_BUFFER_MODE_DYNAMIC); GWEN_Buffer_AddMode(tbuf, GWEN_BUFFER_MODE_READONLY); sio=GWEN_SyncIo_Memory_new(tbuf, 0); n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "doc"); ctx=GWEN_XmlCtxStore_new(n, flags); rv=GWEN_XML__ReadAllFromIo(ctx, sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_XmlCtx_free(ctx); GWEN_XMLNode_free(n); GWEN_SyncIo_free(sio); GWEN_Buffer_free(tbuf); return NULL; } GWEN_XmlCtx_free(ctx); GWEN_SyncIo_free(sio); GWEN_Buffer_free(tbuf); return n; #endif } gwenhywfar-5.12.1/src/parser/text.h0000644000175000017500000003137714026625320014135 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_TEXT_H #define GWENHYWFAR_TEXT_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #define GWEN_TEXT_FUZZY_SHIFT 10 #define GWEN_TEXT_FLAGS_DEL_LEADING_BLANKS 0x00000001 #define GWEN_TEXT_FLAGS_DEL_TRAILING_BLANKS 0x00000002 #define GWEN_TEXT_FLAGS_DEL_MULTIPLE_BLANKS 0x00000004 #define GWEN_TEXT_FLAGS_NEED_DELIMITER 0x00000008 #define GWEN_TEXT_FLAGS_NULL_IS_DELIMITER 0x00000010 #define GWEN_TEXT_FLAGS_DEL_QUOTES 0x00000020 #define GWEN_TEXT_FLAGS_CHECK_BACKSLASH 0x00000040 /** * This function cuts out a word from a given string. * @return address of the new word, 0 on error * @param src pointer to the beginning of the source string * @param delims pointer to a string containing all delimiters * @param buffer pointer to the destination buffer * @param maxsize length of the buffer. Actually up to this number of * characters are copied to the buffer. If after this number of chars no * delimiter follows the string will be terminated. You will have to check * whether there is a delimiter directly after the copied string * @param flags defines how the source string is to be processed * @param next pointer to a pointer to receive the address up to which the * source string has been handled. You can use this to continue with the * source string behind the word we've just cut out. This variable is only * modified upon successfull return */ GWENHYWFAR_API char *GWEN_Text_GetWord(const char *src, const char *delims, char *buffer, unsigned int maxsize, uint32_t flags, const char **next); GWENHYWFAR_API int GWEN_Text_GetWordToBuffer(const char *src, const char *delims, GWEN_BUFFER *buf, uint32_t flags, const char **next); /** * This function does escaping like it is used for HTTP URL encoding. * All characters which are not alphanumeric are escaped by %XX where * XX ist the hexadecimal code of the character. */ GWENHYWFAR_API char *GWEN_Text_Escape(const char *src, char *buffer, unsigned int maxsize); GWENHYWFAR_API char *GWEN_Text_Unescape(const char *src, char *buffer, unsigned int maxsize); GWENHYWFAR_API char *GWEN_Text_UnescapeN(const char *src, unsigned int srclen, char *buffer, unsigned int maxsize); GWENHYWFAR_API char *GWEN_Text_EscapeTolerant(const char *src, char *buffer, unsigned int maxsize); GWENHYWFAR_API char *GWEN_Text_UnescapeTolerant(const char *src, char *buffer, unsigned int maxsize); GWENHYWFAR_API char *GWEN_Text_UnescapeTolerantN(const char *src, unsigned int srclen, char *buffer, unsigned int maxsize); GWENHYWFAR_API int GWEN_Text_EscapeToBuffer(const char *src, GWEN_BUFFER *buf); GWENHYWFAR_API int GWEN_Text_UnescapeToBuffer(const char *src, GWEN_BUFFER *buf); /** * Does the same as @ref GWEN_Text_EscapeToBuffer does, but this version * here does not escape some characters generally accepted within strings * (such as space, comma, decimal point etc). */ GWENHYWFAR_API int GWEN_Text_EscapeToBufferTolerant(const char *src, GWEN_BUFFER *buf); GWENHYWFAR_API int GWEN_Text_EscapeToBufferTolerant2(GWEN_BUFFER *src, GWEN_BUFFER *buf); /** * This function does the same as @ref GWEN_Text_UnescapeToBuffer but it * doesn't complain about unescaped characters in the source string. */ GWENHYWFAR_API int GWEN_Text_UnescapeToBufferTolerant(const char *src, GWEN_BUFFER *buf); GWENHYWFAR_API char *GWEN_Text_ToHex(const char *src, unsigned l, char *buffer, unsigned int maxsize); /** * Writes the given binary data as a hex string to the destination buffer. * @param groupsize if !=0 then after this many characters in the destination * buffer the delimiter is inserted * @param delimiter character to write after groupsize characters * @param skipLeadingZeroes if !=0 then leading zeroes are suppressed */ GWENHYWFAR_API int GWEN_Text_ToHexBuffer(const char *src, unsigned l, GWEN_BUFFER *buf, unsigned int groupsize, char delimiter, int skipLeadingZeroes); /** * Converts a string to Hex. After "groupsize" bytes the "delimiter" is * inserted. */ GWENHYWFAR_API char *GWEN_Text_ToHexGrouped(const char *src, unsigned l, char *buffer, unsigned maxsize, unsigned int groupsize, char delimiter, int skipLeadingZeros); GWENHYWFAR_API int GWEN_Text_FromHex(const char *src, char *buffer, unsigned maxsize); /** * Reads hex bytes and stores them in the given buffer. */ GWENHYWFAR_API int GWEN_Text_FromHexBuffer(const char *src, GWEN_BUFFER *buf); /** * Reads bcd bytes and stores them in the given buffer. */ GWENHYWFAR_API int GWEN_Text_FromBcdBuffer(const char *src, GWEN_BUFFER *buf); /** * Writes the given BCD data as a hex string to the destination buffer. * @param groupsize if !=0 then after this many characters in the destination * buffer the delimiter is inserted * @param delimiter character to write after groupsize characters * @param skipLeadingZeroes if !=0 then leading zeroes are suppressed */ GWENHYWFAR_API int GWEN_Text_ToBcdBuffer(const char *src, unsigned l, GWEN_BUFFER *buf, unsigned int groupsize, char delimiter, int skipLeadingZeroes); /** * @return number of bytes in the buffer (-1 on error) * @param fillchar if 0 then no filling takes place, positive values * extend to the right, negative values to the left. */ GWENHYWFAR_API int GWEN_Text_NumToString(int num, char *buffer, unsigned int bufsize, int fillchar); /** * This functions transforms a string into a double float value. * It always uses a decimal point (".") regardless of the current locale settings. * This makes sure that a value can always be parsed regardless of the * country settings of the producer of that string. */ GWENHYWFAR_API int GWEN_Text_DoubleToBuffer(double num, GWEN_BUFFER *buf); /** * This functions transforms a double float value into a string. * It always uses a decimal point (".") regardless of the current locale settings. * This makes sure that a value can always be parsed regardless of the * country settings of the producer of that string. */ GWENHYWFAR_API int GWEN_Text_StringToDouble(const char *s, double *num); /** * Compares two strings. If either of them is given but empty, that string * will be treaten as not given. This way a string NOT given equals a string * which is given but empty. * @param ign set to !=0 to ignore cases */ GWENHYWFAR_API int GWEN_Text_Compare(const char *s1, const char *s2, int ign); /** * This function provides the functionality of strcasestr() which is not available * on some systems. */ GWENHYWFAR_API const char *GWEN_Text_StrCaseStr(const char *haystack, const char *needle); /** * This function provides the functionality of strndup() which is not * available on Windows (uses strndup() on all other systems). */ GWENHYWFAR_API char *GWEN_Text_strndup(const char *s, size_t n); /** * This function compares two string and returns the number of matches or * -1 on error. * @param w string to compare * @param p pattern to compare against * @param sensecase if 0 then cases are ignored */ GWENHYWFAR_API int GWEN_Text_ComparePattern(const char *w, const char *p, int sensecase); /** * This is used for debugging purposes and it shows the given data as a * classical hexdump. */ GWENHYWFAR_API void GWEN_Text_DumpString(const char *s, unsigned int l, unsigned int insert); GWENHYWFAR_API void GWEN_Text_DumpString2Buffer(const char *s, unsigned int l, GWEN_BUFFER *mbuf, unsigned int insert); GWENHYWFAR_API void GWEN_Text_LogString(const char *s, unsigned int l, const char *logDomain, GWEN_LOGGER_LEVEL lv); /** * Condenses a buffer containing chars. * This means removing unnecessary spaces. */ GWENHYWFAR_API void GWEN_Text_CondenseBuffer(GWEN_BUFFER *buf); /** * This function counts the number of characters in the given UTF-8 buffer. * @param s pointer to a buffer which contains UTF-8 characters * @param len number of bytes (if 0 then all bytes up to a zero byte are * counted) */ GWENHYWFAR_API int GWEN_Text_CountUtf8Chars(const char *s, int len); /** * Replaces special characters which are used by XML (like "<", "&" etc) * by known sequences (like "&"). */ GWENHYWFAR_API int GWEN_Text_EscapeXmlToBuffer(const char *src, GWEN_BUFFER *buf); /** * Replaces special character sequences to their coresponding character. */ GWENHYWFAR_API int GWEN_Text_UnescapeXmlToBuffer(const char *src, GWEN_BUFFER *buf); /** * Compares two strings and returns the percentage of their equality. * It is calculated by this formula: * matches*100 / ((length of s1)+(length of s2)) * Each match is weight like this: *
    *
  • *s1==*s2: 2
  • *
  • toupper(*s1)==toupper(*s2): 2 if ign, 1 otherwise
  • *
  • isalnum(*s1)==isalnum(*s2): 1 *
* @return percentage of equality between both strings * @param s1 1st of two strings to compare * @param s2 2nd of two strings to compare * @param ign if !=0 then the cases are ignored */ GWENHYWFAR_API double GWEN_Text_CheckSimilarity(const char *s1, const char *s2, int ign); /** * This function converts a given text from one charset to another one. * Currently, iconv is used for this conversion. * * @param fromCharset charset of the source text * @param toCharset charset of the source text * @param text text to convert * @param len length of the text (excluding trailing 0) * @param tbuf destination buffer for the converted text */ GWENHYWFAR_API int GWEN_Text_ConvertCharset(const char *fromCharset, const char *toCharset, const char *text, int len, GWEN_BUFFER *tbuf); typedef int GWENHYWFAR_CB(*GWEN_TEXT_REPLACE_VARS_CB)(void *cbPtr, const char *name, int index, int maxLen, GWEN_BUFFER *dstBuf); /** * Read the given string and replace every variable in that string ( noted as "$(varname)") with the * value of the mentioned variable. Uses a callback to actually retrieve the data. */ GWENHYWFAR_API int GWEN_Text_ReplaceVars(const char *s, GWEN_BUFFER *dbuf, GWEN_TEXT_REPLACE_VARS_CB fn, void *ptr); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/parser/configmgr_be.h0000666000175000017500000001556213551166433015603 00000000000000/*************************************************************************** begin : Mon Aug 11 2008 copyright : (C) 2008,2017 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_CONFIGMGR_BE_H #define GWENHYWFAR_CONFIGMGR_BE_H #include #include GWENHYWFAR_API GWEN_CONFIGMGR *GWEN_ConfigMgr_new(const char *url); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_GETGROUP_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName, GWEN_DB_NODE **pDb); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_SETGROUP_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName, GWEN_DB_NODE *db); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_HASGROUP_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_LOCKGROUP_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_UNLOCKGROUP_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_GETUNIQUEID_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, char *buffer, uint32_t bufferLen); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_MKUNIQUEIDFROMID_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, uint32_t uid, int doCheck, char *buffer, uint32_t bufferLen); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_DELETEGROUP_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_LISTGROUPS_FN)(GWEN_CONFIGMGR *mgr, GWEN_STRINGLIST *sl); typedef int GWENHYWFAR_CB(*GWEN_CONFIGMGR_LISTSUBGROUPS_FN)(GWEN_CONFIGMGR *mgr, const char *groupName, GWEN_STRINGLIST *sl); GWENHYWFAR_API GWEN_CONFIGMGR_GETGROUP_FN GWEN_ConfigMgr_SetGetGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_GETGROUP_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_SETGROUP_FN GWEN_ConfigMgr_SetSetGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_SETGROUP_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_HASGROUP_FN GWEN_ConfigMgr_SetHasGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_HASGROUP_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_LOCKGROUP_FN GWEN_ConfigMgr_SetLockGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_LOCKGROUP_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_UNLOCKGROUP_FN GWEN_ConfigMgr_SetUnlockGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_UNLOCKGROUP_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_GETUNIQUEID_FN GWEN_ConfigMgr_SetGetUniqueIdFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_GETUNIQUEID_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_MKUNIQUEIDFROMID_FN GWEN_ConfigMgr_SetMkUniqueIdFromIdFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_MKUNIQUEIDFROMID_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_DELETEGROUP_FN GWEN_ConfigMgr_SetDeleteGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_DELETEGROUP_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_LISTGROUPS_FN GWEN_ConfigMgr_SetListGroupsFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_LISTGROUPS_FN f); GWENHYWFAR_API GWEN_CONFIGMGR_LISTSUBGROUPS_FN GWEN_ConfigMgr_SetListSubGroupsFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_LISTSUBGROUPS_FN f); typedef GWEN_CONFIGMGR *(*GWEN_CONFIGMGR_PLUGIN_FACTORYFN)(GWEN_PLUGIN *pl, const char *url); GWENHYWFAR_API GWEN_PLUGIN *GWEN_ConfigMgr_Plugin_new(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName); GWENHYWFAR_API void GWEN_ConfigMgr_Plugin_SetFactoryFn(GWEN_PLUGIN *pl, GWEN_CONFIGMGR_PLUGIN_FACTORYFN f); #endif gwenhywfar-5.12.1/src/parser/dbrw.c0000666000175000017500000007371113552157305014112 00000000000000/*************************************************************************** begin : Tue Sep 09 2003 copyright : (C) 2003-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* This file is included from db.c */ int GWEN_DB_EscapeToBufferTolerant(const char *src, GWEN_BUFFER *buf) { while (*src) { unsigned char x; x=(unsigned char)*src; if (!( (x>='A' && x<='Z') || (x>='a' && x<='z') || (x>='0' && x<='9') || x=='%' || x=='.' || x==',' || x=='.' || x=='_' || x=='-' || x=='*' || x=='?' )) { unsigned char c; GWEN_Buffer_AppendByte(buf, '&'); c=(((unsigned char)(*src))>>4)&0xf; if (c>9) c+=7; c+='0'; GWEN_Buffer_AppendByte(buf, c); c=((unsigned char)(*src))&0xf; if (c>9) c+=7; c+='0'; GWEN_Buffer_AppendByte(buf, c); } else GWEN_Buffer_AppendByte(buf, *src); src++; } /* while */ return 0; } int GWEN_DB_UnescapeToBufferTolerant(const char *src, GWEN_BUFFER *buf) { while (*src) { int charHandled; charHandled=0; if (*src=='&') { if (strlen(src)>2) { unsigned char d1, d2; unsigned char c; if (isxdigit((int)src[1]) && isxdigit((int)src[2])) { /* skip '%' */ src++; /* read first digit */ d1=(unsigned char)(toupper(*src)); /* get second digit */ src++; d2=(unsigned char)(toupper(*src)); /* compute character */ d1-='0'; if (d1>9) d1-=7; c=(d1<<4)&0xf0; d2-='0'; if (d2>9) d2-=7; c+=(d2&0xf); /* store character */ GWEN_Buffer_AppendByte(buf, (char)c); charHandled=1; } } } if (!charHandled) GWEN_Buffer_AppendByte(buf, *src); src++; } /* while */ return 0; } int GWEN_DB_ReadFileAs(GWEN_DB_NODE *db, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags) { GWEN_SYNCIO *sio; GWEN_DBIO *dbio; int rv; dbio=GWEN_DBIO_GetPlugin(type); if (!dbio) { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin \"%s\" is not supported", type); return GWEN_ERROR_NOT_SUPPORTED; } sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_OpenExisting); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } rv=GWEN_DBIO_Import(dbio, sio, db, params, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); } GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } int GWEN_DB_WriteFileAs(GWEN_DB_NODE *db, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags) { int rv; GWEN_DBIO *dbio; dbio=GWEN_DBIO_GetPlugin(type); if (!dbio) { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin \"%s\" is not supported", type); return GWEN_ERROR_NOT_SUPPORTED; } rv=GWEN_DBIO_ExportToFile(dbio, fname, db, params, dbflags); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int GWEN_DB_WriteGroupToIoLayer(GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags, int insert) { GWEN_DB_NODE *n; GWEN_DB_NODE *cn; int i; int err; int lastWasVar; lastWasVar=0; n=GWEN_DB_Node_List_First(node->children); while (n) { if (!(n->nodeFlags & GWEN_DB_NODE_FLAGS_VOLATILE)) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Writing node"); switch (n->typ) { case GWEN_DB_NodeType_Group: if (dbflags & GWEN_DB_FLAGS_WRITE_SUBGROUPS) { GWEN_BUFFER *tbuf; if (dbflags & GWEN_DB_FLAGS_ADD_GROUP_NEWLINES) { if (lastWasVar) { /* only insert newline if the last one before this group was a * variable */ GWEN_FASTBUFFER_WRITELINE(fb, err, ""); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); return err; } } } /* indend */ if (dbflags & GWEN_DB_FLAGS_INDEND) { for (i=0; idata.dataName, tbuf); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", err); GWEN_Buffer_free(tbuf); return err; } GWEN_FASTBUFFER_WRITEFORCED(fb, err, GWEN_Buffer_GetStart(tbuf), GWEN_Buffer_GetUsedBytes(tbuf)); GWEN_Buffer_free(tbuf); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", err); return err; } GWEN_FASTBUFFER_WRITELINE(fb, err, " {"); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); return err; } err=GWEN_DB_WriteGroupToIoLayer(n, fb, dbflags, insert+2); if (err<0) return err; /* indend */ if (dbflags & GWEN_DB_FLAGS_INDEND) { for (i=0; idata.dataName); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); return err; } } /* if detailed groups */ else { GWEN_FASTBUFFER_WRITELINE(fb, err, "}"); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); return err; } } if (dbflags & GWEN_DB_FLAGS_ADD_GROUP_NEWLINES) { if (GWEN_DB_Node_List_Next(n)) { /* only insert newline if something * is following on the same level */ GWEN_FASTBUFFER_WRITELINE(fb, err, ""); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); return err; } } } } lastWasVar=0; break; case GWEN_DB_NodeType_Var: cn=GWEN_DB_Node_List_First(n->children); if (cn) { const char *typname; int namewritten; int values; typname=0; namewritten=0; values=0; while (cn) { char numbuffer[32]; char *binbuffer=NULL; unsigned int bbsize; const char *pvalue=NULL; GWEN_BUFFER *vbuf=NULL; switch (cn->typ) { case GWEN_DB_NodeType_ValueChar: typname="char "; pvalue=cn->data.dataChar; if (dbflags & GWEN_DB_FLAGS_ESCAPE_CHARVALUES) { vbuf=GWEN_Buffer_new(0, strlen(pvalue)+32, 0, 1); if (GWEN_Text_EscapeToBufferTolerant(pvalue, vbuf)) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Buffer_free(vbuf); return 1; } pvalue=GWEN_Buffer_GetStart(vbuf); } break; case GWEN_DB_NodeType_ValueInt: typname="int "; if (GWEN_Text_NumToString(cn->data.dataInt, numbuffer, sizeof(numbuffer)-1, 0)<1) { DBG_ERROR(GWEN_LOGDOMAIN, "Error writing numeric value"); return GWEN_ERROR_GENERIC; } pvalue=numbuffer; break; case GWEN_DB_NodeType_ValueBin: bbsize=cn->dataSize*2+1; binbuffer=(char *)GWEN_Memory_malloc(bbsize); assert(binbuffer); typname="bin "; if (!GWEN_Text_ToHex(cn->data.dataBin, cn->dataSize, binbuffer, bbsize)) { DBG_ERROR(GWEN_LOGDOMAIN, "Error writing binary value"); return GWEN_ERROR_GENERIC; } pvalue=binbuffer; break; case GWEN_DB_NodeType_ValuePtr: DBG_DEBUG(GWEN_LOGDOMAIN, "Not writing ptr type"); break; default: DBG_DEBUG(GWEN_LOGDOMAIN, "Unhandled type [%d]", cn->typ); break; } if (pvalue) { if (!namewritten) { /* write name */ /* indend */ if (dbflags & GWEN_DB_FLAGS_INDEND) { for (i=0; idata.dataName, -1); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } if (dbflags & GWEN_DB_FLAGS_QUOTE_VARNAMES) { GWEN_FASTBUFFER_WRITEBYTE(fb, err, '\"'); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } } GWEN_FASTBUFFER_WRITEFORCED(fb, err, ((dbflags & GWEN_DB_FLAGS_USE_COLON)?": ":"="), -1); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } namewritten=1; } /* if !namewritten */ if (values) { GWEN_FASTBUFFER_WRITEFORCED(fb, err, ", ", -1); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } } values++; if (dbflags & GWEN_DB_FLAGS_QUOTE_VALUES) { GWEN_FASTBUFFER_WRITEBYTE(fb, err, '\"'); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } } GWEN_FASTBUFFER_WRITEFORCED(fb, err, pvalue, -1); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } if (dbflags & GWEN_DB_FLAGS_QUOTE_VALUES) { GWEN_FASTBUFFER_WRITEBYTE(fb, err, '\"'); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); return 1; } } } /* if pvalue */ GWEN_Memory_dealloc(binbuffer); GWEN_Buffer_free(vbuf); cn=GWEN_DB_Node_List_Next(cn); } /* while cn */ if (namewritten) { GWEN_FASTBUFFER_WRITELINE(fb, err, ""); if (err<0) { DBG_INFO(GWEN_LOGDOMAIN, "called from here"); return GWEN_ERROR_GENERIC; } } } /* if children */ lastWasVar=1; break; default: DBG_WARN(GWEN_LOGDOMAIN, "[unhandled node type %d]", n->typ); } /* switch */ } /* if not volatile */ else { DBG_DEBUG(GWEN_LOGDOMAIN, "Node is volatile, not writing it"); } n=GWEN_DB_Node_List_Next(n); } /* while */ return 0; } int GWEN_DB_WriteToFastBuffer(GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags) { int rv; rv=GWEN_DB_WriteGroupToIoLayer(node, fb, dbflags, 0); if (rv<0) { return rv; } GWEN_FASTBUFFER_FLUSH(fb, rv); return rv; } int GWEN_DB_WriteToIo(GWEN_DB_NODE *node, GWEN_SYNCIO *sio, uint32_t dbflags) { int rv; GWEN_FAST_BUFFER *fb; fb=GWEN_FastBuffer_new(512, sio); if (dbflags & GWEN_DB_FLAGS_DOSMODE) GWEN_FastBuffer_AddFlags(fb, GWEN_FAST_BUFFER_FLAGS_DOSMODE); rv=GWEN_DB_WriteGroupToIoLayer(node, fb, dbflags, 0); if (rv<0) { GWEN_FastBuffer_free(fb); return rv; } GWEN_FASTBUFFER_FLUSH(fb, rv); GWEN_FastBuffer_free(fb); return rv; } int GWEN_DB_WriteFile(GWEN_DB_NODE *n, const char *fname, uint32_t dbflags) { int rv; GWEN_FSLOCK *lck=0; GWEN_SYNCIO *sio; /* if locking requested */ if (dbflags & GWEN_DB_FLAGS_LOCKFILE) { GWEN_FSLOCK_RESULT res; lck=GWEN_FSLock_new(fname, GWEN_FSLock_TypeFile); assert(lck); res=GWEN_FSLock_Lock(lck, GWEN_DB_DEFAULT_LOCK_TIMEOUT, 0); if (res!=GWEN_FSLock_ResultOk) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not apply lock to file \"%s\" (%d)", fname, res); GWEN_FSLock_free(lck); return -1; } } /* open file */ sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_CreateAlways); if (dbflags & GWEN_DB_FLAGS_APPEND_FILE) GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_APPEND); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } rv=GWEN_DB_WriteToIo(n, sio, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } rv=GWEN_SyncIo_Disconnect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } GWEN_SyncIo_free(sio); /* remove lock, if any */ if (lck) { GWEN_FSLOCK_RESULT res; res=GWEN_FSLock_Unlock(lck); if (res!=GWEN_FSLock_ResultOk) { DBG_WARN(GWEN_LOGDOMAIN, "Could not remove lock on file \"%s\" (%d)", fname, res); } GWEN_FSLock_free(lck); } return 0; } int GWEN_DB__ReadValues(GWEN_DB_NODE *n, uint32_t dbflags, const char *typeName, const char *varName, uint8_t *p) { GWEN_DB_NODE_TYPE nodeType=GWEN_DB_NodeType_ValueChar; GWEN_DB_NODE *dbVar; GWEN_BUFFER *wbuf; uint8_t *pDebug; pDebug=p; if (typeName==NULL) typeName="char"; if (strcasecmp(typeName, "int")==0) nodeType=GWEN_DB_NodeType_ValueInt; else if (strcasecmp(typeName, "char")==0) nodeType=GWEN_DB_NodeType_ValueChar; else if (strcasecmp(typeName, "bin")==0) nodeType=GWEN_DB_NodeType_ValueBin; else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown type \"%s\"", typeName); return GWEN_ERROR_BAD_DATA; } dbVar=GWEN_DB_GetNode(n, varName, dbflags | GWEN_PATH_FLAGS_VARIABLE); if (dbVar==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Variable [%s] is not available", varName); return GWEN_ERROR_GENERIC; } wbuf=GWEN_Buffer_new(0, 32, 0, 1); for (;;) { int quotes=0; GWEN_DB_NODE *dbVal=NULL; const char *v; while (*p && isspace(*p)) p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Missing value"); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } if (*p=='"') { quotes=1; p++; } while (*p) { if (*p=='%') { uint8_t c; uint8_t cHex; /* get first nibble */ p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Incomplete escape sequence"); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } c=toupper(*p)-'0'; if (c>9) c-=7; cHex=c<<4; p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Incomplete escape sequence"); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } c=toupper(*p)-'0'; if (c>9) c-=7; cHex|=c; GWEN_Buffer_AppendByte(wbuf, cHex); } else if (quotes) { if (*p=='"') { p++; break; } else GWEN_Buffer_AppendByte(wbuf, *p); } else { if (*p==',' || *p==';' || *p=='#') break; else if (*p=='"') { DBG_INFO(GWEN_LOGDOMAIN, "Unexpected quotation mark (Line: [%s], parsed: [%s]", pDebug, GWEN_Buffer_GetStart(wbuf)); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } else GWEN_Buffer_AppendByte(wbuf, *p); } p++; } v=GWEN_Buffer_GetStart(wbuf); if (nodeType==GWEN_DB_NodeType_ValueInt) { int i; if (1!=sscanf(v, "%d", &i)) { DBG_INFO(GWEN_LOGDOMAIN, "Not an integer value [%s]", v); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } dbVal=GWEN_DB_ValueInt_new(i); } else if (nodeType==GWEN_DB_NodeType_ValueChar) dbVal=GWEN_DB_ValueChar_new(v); else if (nodeType==GWEN_DB_NodeType_ValueBin) { GWEN_BUFFER *bbuf; int rv; bbuf=GWEN_Buffer_new(0, (GWEN_Buffer_GetUsedBytes(wbuf)/2)+1, 0, 1); rv=GWEN_Text_FromHexBuffer(v, bbuf); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "Bad bin value [%s]", v); GWEN_Buffer_free(bbuf); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } dbVal=GWEN_DB_ValueBin_new(GWEN_Buffer_GetStart(bbuf), GWEN_Buffer_GetUsedBytes(bbuf)); GWEN_Buffer_free(bbuf); } else { /* should never reach this point */ assert(0); } GWEN_DB_Node_Append(dbVar, dbVal); /* skip blanks if any */ while (*p && isspace(*p)) p++; if (!*p || *p==';' || *p=='#') break; else if (*p!=',') { DBG_INFO(GWEN_LOGDOMAIN, "Unexpected character [%s]", p); GWEN_Buffer_free(wbuf); return GWEN_ERROR_BAD_DATA; } p++; GWEN_Buffer_Reset(wbuf); } GWEN_Buffer_free(wbuf); return 0; } int GWEN_DB_ReadFromFastBuffer(GWEN_DB_NODE *n, GWEN_FAST_BUFFER *fb, uint32_t dbflags) { GWEN_BUFFER *lbuf; GWEN_BUFFER *tbuf; int level=0; int someLinesRead=0; lbuf=GWEN_Buffer_new(0, 128, 0, 1); tbuf=GWEN_Buffer_new(0, 128, 0, 1); for (;;) { int rv; uint8_t *p; rv=GWEN_FastBuffer_ReadLineToBuffer(fb, lbuf); if (rv<0) { if (rv==GWEN_ERROR_EOF) { if (!someLinesRead && !(dbflags & GWEN_DB_FLAGS_ALLOW_EMPTY_STREAM)) { DBG_INFO(GWEN_LOGDOMAIN, "Unexpected EOF (%d)", rv); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return rv; } break; } DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return rv; } if (GWEN_Buffer_GetUsedBytes(lbuf)==0) { if (dbflags & GWEN_DB_FLAGS_UNTIL_EMPTY_LINE) { break; } } else { someLinesRead=1; p=(uint8_t *)GWEN_Buffer_GetStart(lbuf); while (*p && isspace(*p)) p++; if (*p) { uint8_t *p1begin=NULL, *p1end=NULL; uint8_t *p2begin=NULL, *p2end=NULL; /* non-empty line */ if (*p=='}') { /* found end of current group */ if (level<1) { DBG_INFO(GWEN_LOGDOMAIN, "Unbalanced number of curly bracket"); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } n=n->parent; assert(n); /* internal error if parent not found */ assert(n->typ==GWEN_DB_NodeType_Group); /* internal error if parent is not a group */ level--; } else if (*p=='#') { /* comment only line */ } else { p1begin=p; /* read first token */ while (*p && !isspace(*p) && *p!='{' && *p!=((dbflags & GWEN_DB_FLAGS_USE_COLON)?':':'=') && *p!='}' && *p!=',' && *p!=';') p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Missing 2nd token (first: \"%s\")", p1begin); GWEN_Buffer_Dump(lbuf, 2); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } p1end=p; /* get to start of 2nd token */ while (*p && isspace(*p)) p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Missing 2nd token"); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } if (*p=='{') { GWEN_DB_NODE *newGr; /* found start of group */ *p1end=0; rv=GWEN_DB_UnescapeToBufferTolerant((const char *)p1begin, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return rv; } newGr=GWEN_DB_GetGroup(n, dbflags, GWEN_Buffer_GetStart(tbuf)); if (newGr==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Could not create group [%s]", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_GENERIC; } GWEN_Buffer_Reset(tbuf); n=newGr; level++; } else if (*p=='=' || *p==':') { /* found short variable definition */ *p1end=0; p++; rv=GWEN_DB__ReadValues(n, dbflags, NULL, (const char *)p1begin, p); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return rv; } } else if (*p==',' || *p==';') { DBG_INFO(GWEN_LOGDOMAIN, "Unexpected delimiter found"); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } else { /* 2nd token, so this should be a standard variable definition */ p2begin=p; while (*p && !isspace(*p) && *p!='{' && *p!=((dbflags & GWEN_DB_FLAGS_USE_COLON)?':':'=') && *p!='}' && *p!=',' && *p!=';') p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Missing 2nd token [%s], [%s]", p1begin, p2begin); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } p2end=p; if (isspace(*p)) { while (*p && isspace(*p)) p++; if (!*p) { DBG_INFO(GWEN_LOGDOMAIN, "Missing 2nd token"); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } } if (*p!='=' && *p!=':') { DBG_INFO(GWEN_LOGDOMAIN, "Equation mark expected"); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } p++; *p1end=0; *p2end=0; rv=GWEN_DB__ReadValues(n, dbflags, (const char *)p1begin, (const char *)p2begin, p); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return rv; } } } } } GWEN_Buffer_Reset(lbuf); } if (level) { DBG_INFO(GWEN_LOGDOMAIN, "Unbalanced number of curly bracket (too few)"); GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_free(tbuf); GWEN_Buffer_free(lbuf); return 0; } int GWEN_DB_ReadFromIo(GWEN_DB_NODE *n, GWEN_SYNCIO *sio, uint32_t dbflags) { GWEN_FAST_BUFFER *fb; int rv; /* prepare fast buffer */ fb=GWEN_FastBuffer_new(1024, sio); if (dbflags & GWEN_DB_FLAGS_DOSMODE) GWEN_FastBuffer_AddFlags(fb, GWEN_FAST_BUFFER_FLAGS_DOSMODE); /* read from it */ rv=GWEN_DB_ReadFromFastBuffer(n, fb, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_FastBuffer_free(fb); return rv; } GWEN_FastBuffer_free(fb); return 0; } int GWEN_DB_ReadFile(GWEN_DB_NODE *n, const char *fname, uint32_t dbflags) { GWEN_SYNCIO *sio; int rv; sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_OpenExisting); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } /* read from it */ rv=GWEN_DB_ReadFromIo(n, sio, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return 0; } int GWEN_DB_ReadFromString(GWEN_DB_NODE *n, const char *str, int len, uint32_t dbflags) { GWEN_SYNCIO *sio; int rv; if (len==0) len=strlen(str); sio=GWEN_SyncIo_Memory_fromBuffer((const uint8_t *) str, len); rv=GWEN_DB_ReadFromIo(n, sio, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_free(sio); return 0; } int GWEN_DB_WriteToBuffer(GWEN_DB_NODE *n, GWEN_BUFFER *buf, uint32_t dbflags) { GWEN_SYNCIO *sio; int rv; /* create SyncIO, don't take over buf */ sio=GWEN_SyncIo_Memory_new(buf, 0); rv=GWEN_DB_WriteToIo(n, sio, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_free(sio); return 0; } gwenhywfar-5.12.1/src/parser/xml.c0000664000175000017500000012514114453561202013741 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2003-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "xml_p.h" #include "xmlctx_l.h" #include "i18n_l.h" #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_FCNTL_H # include #endif #include #ifdef HAVE_UNISTD_H # include #endif #define GWEN_XML_BUFFERSIZE 512 GWEN_LIST_FUNCTIONS(GWEN_XMLNODE, GWEN_XMLNode) GWEN_LIST2_FUNCTIONS(GWEN_XMLNODE, GWEN_XMLNode) GWEN_LIST_FUNCTIONS(GWEN_XMLNODE_NAMESPACE, GWEN_XMLNode_NameSpace) GWEN_XMLPROPERTY *GWEN_XMLProperty_new(const char *name, const char *value) { GWEN_XMLPROPERTY *p; GWEN_NEW_OBJECT(GWEN_XMLPROPERTY, p); if (name) p->name=GWEN_Memory_strdup(name); if (value) p->value=GWEN_Memory_strdup(value); return p; } void GWEN_XMLProperty_free(GWEN_XMLPROPERTY *p) { if (p) { GWEN_Memory_dealloc(p->name); GWEN_Memory_dealloc(p->value); GWEN_Memory_dealloc(p->nameSpace); GWEN_FREE_OBJECT(p); } } GWEN_XMLPROPERTY *GWEN_XMLProperty_dup(const GWEN_XMLPROPERTY *p) { GWEN_XMLPROPERTY *pp; pp=GWEN_XMLProperty_new(p->name, p->value); if (p->nameSpace) pp->nameSpace=strdup(p->nameSpace); return pp; } void GWEN_XMLProperty_add(GWEN_XMLPROPERTY *p, GWEN_XMLPROPERTY **head) { GWEN_LIST_ADD(GWEN_XMLPROPERTY, p, head); } void GWEN_XMLProperty_insert(GWEN_XMLPROPERTY *p, GWEN_XMLPROPERTY **head) { GWEN_LIST_INSERT(GWEN_XMLPROPERTY, p, head); } void GWEN_XMLProperty_del(GWEN_XMLPROPERTY *p, GWEN_XMLPROPERTY **head) { GWEN_LIST_DEL(GWEN_XMLPROPERTY, p, head); } void GWEN_XMLProperty_freeAll(GWEN_XMLPROPERTY *p) { while (p) { GWEN_XMLPROPERTY *next; next=p->next; GWEN_XMLProperty_free(p); p=next; } /* while */ } GWEN_XMLNODE *GWEN_XMLNode_new(GWEN_XMLNODE_TYPE t, const char *data) { GWEN_XMLNODE *n; GWEN_NEW_OBJECT(GWEN_XMLNODE, n); GWEN_LIST_INIT(GWEN_XMLNODE, n); n->type=t; n->children=GWEN_XMLNode_List_new(); n->headers=GWEN_XMLNode_List_new(); if (data) n->data=GWEN_Memory_strdup(data); n->nameSpaces=GWEN_XMLNode_NameSpace_List_new(); return n; } void GWEN_XMLNode_free(GWEN_XMLNODE *n) { if (n) { GWEN_LIST_FINI(GWEN_XMLNODE, n); GWEN_XMLProperty_freeAll(n->properties); GWEN_Memory_dealloc(n->nameSpace); GWEN_Memory_dealloc(n->data); GWEN_XMLNode_List_free(n->headers); GWEN_XMLNode_List_free(n->children); GWEN_XMLNode_NameSpace_List_free(n->nameSpaces); GWEN_FREE_OBJECT(n); } } void GWEN_XMLNode_freeAll(GWEN_XMLNODE *n) { while (n) { GWEN_XMLNODE *next; next=GWEN_XMLNode_List_Next(n); GWEN_XMLNode_free(n); n=next; } /* while */ } GWEN_XMLNODE *GWEN_XMLNode_dup(const GWEN_XMLNODE *n) { GWEN_XMLNODE *nn, *cn, *ncn; const GWEN_XMLPROPERTY *p; const GWEN_XMLNODE_NAMESPACE *nns; /* duplicate node itself */ nn=GWEN_XMLNode_new(n->type, n->data); if (n->nameSpace) nn->nameSpace=strdup(n->nameSpace); /* duplicate properties */ p=n->properties; while (p) { GWEN_XMLPROPERTY *np; np=GWEN_XMLProperty_dup(p); GWEN_XMLProperty_add(np, &(nn->properties)); p=p->next; } /* while */ /* duplicate children */ cn=GWEN_XMLNode_List_First(n->children); while (cn) { ncn=GWEN_XMLNode_dup(cn); GWEN_XMLNode_AddChild(nn, ncn); cn=GWEN_XMLNode_Next(cn); } /* while */ /* duplicate headers */ cn=GWEN_XMLNode_List_First(n->headers); while (cn) { ncn=GWEN_XMLNode_dup(cn); GWEN_XMLNode_AddHeader(nn, ncn); cn=GWEN_XMLNode_Next(cn); } /* while */ /* duplicate namespaces */ nns=GWEN_XMLNode_NameSpace_List_First(n->nameSpaces); while (nns) { GWEN_XMLNODE_NAMESPACE *nnns; nnns=GWEN_XMLNode_NameSpace_dup(nns); GWEN_XMLNode_NameSpace_List_Add(nnns, nn->nameSpaces); nns=GWEN_XMLNode_NameSpace_List_Next(nns); } return nn; } const char *GWEN_XMLNode_GetProperty(const GWEN_XMLNODE *n, const char *name, const char *defaultValue) { GWEN_XMLPROPERTY *p; assert(n); assert(name); p=n->properties; while (p) { assert(p->name); if (strcasecmp(p->name, name)==0) break; p=p->next; } /* while */ if (p) { if (p->value) return p->value; } return defaultValue; } int GWEN_XMLNode_GetIntProperty(const GWEN_XMLNODE *n, const char *name, int defaultValue) { GWEN_XMLPROPERTY *p; assert(n); assert(name); p=n->properties; while (p) { assert(p->name); if (strcasecmp(p->name, name)==0) break; p=p->next; } /* while */ if (p) { if (p->value) { int i; if (1==sscanf(p->value, "%i", &i)) return i; } } return defaultValue; } void GWEN_XMLNode__SetProperty(GWEN_XMLNODE *n, const char *name, const char *value, int doInsert) { GWEN_XMLPROPERTY *p; p=n->properties; while (p) { assert(p->name); if (strcasecmp(p->name, name)==0) break; p=p->next; } /* while */ if (p) { GWEN_Memory_dealloc(p->value); if (value) p->value=GWEN_Memory_strdup(value); else p->value=0; } else { p=GWEN_XMLProperty_new(name, value); if (doInsert) GWEN_XMLProperty_insert(p, &(n->properties)); else GWEN_XMLProperty_add(p, &(n->properties)); } } void GWEN_XMLNode_SetProperty(GWEN_XMLNODE *n, const char *name, const char *value) { GWEN_XMLNode__SetProperty(n, name, value, 0); } void GWEN_XMLNode_SetIntProperty(GWEN_XMLNODE *n, const char *name, int value) { char numbuf[256]; snprintf(numbuf, sizeof(numbuf)-1, "%i", value); numbuf[sizeof(numbuf)-1]=0; GWEN_XMLNode__SetProperty(n, name, numbuf, 0); } void GWEN_XMLNode_IncUsage(GWEN_XMLNODE *n) { assert(n); n->usage++; } void GWEN_XMLNode_DecUsage(GWEN_XMLNODE *n) { assert(n); if (n->usage==0) { DBG_WARN(GWEN_LOGDOMAIN, "Node usage already is zero"); } else n->usage--; } uint32_t GWEN_XMLNode_GetUsage(const GWEN_XMLNODE *n) { assert(n); return n->usage; } const char *GWEN_XMLNode_GetData(const GWEN_XMLNODE *n) { assert(n); return n->data; } void GWEN_XMLNode_SetData(GWEN_XMLNODE *n, const char *data) { assert(n); GWEN_Memory_dealloc(n->data); if (data) n->data=GWEN_Memory_strdup(data); else n->data=0; } const char *GWEN_XMLNode_GetNamespace(const GWEN_XMLNODE *n) { assert(n); return n->nameSpace; } void GWEN_XMLNode_SetNamespace(GWEN_XMLNODE *n, const char *s) { assert(n); GWEN_Memory_dealloc(n->nameSpace); if (s) n->nameSpace=GWEN_Memory_strdup(s); else n->nameSpace=NULL; } GWEN_XMLNODE *GWEN_XMLNode_GetChild(const GWEN_XMLNODE *n) { assert(n); return GWEN_XMLNode_List_First(n->children); } GWEN_XMLNODE *GWEN_XMLNode_GetParent(const GWEN_XMLNODE *n) { assert(n); return n->parent; } void GWEN_XMLNode_AddChild(GWEN_XMLNODE *n, GWEN_XMLNODE *child) { assert(n); GWEN_XMLNode_List_Add(child, n->children); child->parent=n; } void GWEN_XMLNode_AddChildrenOnly(GWEN_XMLNODE *n, GWEN_XMLNODE *nn, int copythem) { GWEN_XMLNODE *ch; assert(n); assert(nn); ch=GWEN_XMLNode_GetChild(nn); while (ch) { GWEN_XMLNODE *nc; nc=GWEN_XMLNode_Next(ch); if (!copythem) { GWEN_XMLNode_UnlinkChild(nn, ch); GWEN_XMLNode_AddChild(n, ch); } else { GWEN_XMLNode_AddChild(n, GWEN_XMLNode_dup(ch)); } ch=nc; } /* while */ } GWEN_XMLNODE_TYPE GWEN_XMLNode_GetType(const GWEN_XMLNODE *n) { assert(n); return n->type; } GWEN_XMLNODE *GWEN_XMLNode_Next(const GWEN_XMLNODE *n) { assert(n); return GWEN_XMLNode_List_Next(n); } void GWEN_XMLNode_Dump(const GWEN_XMLNODE *n, int ind) { GWEN_XMLPROPERTY *p; GWEN_XMLNODE *c; int i; int simpleTag; assert(n); for (i=0; itype==GWEN_XMLNodeTypeTag) { if (n->data) fprintf(stderr, "<%s", n->data); else fprintf(stderr, "properties; while (p) { if (p->value) fprintf(stderr, " %s=\"%s\"", p->name, p->value); else fprintf(stderr, " %s", p->name); p=p->next; } if (n->data) { if (n->data[0]=='?') { simpleTag=1; fprintf(stderr, "?"); } else if (n->data[0]=='!') { simpleTag=1; } } fprintf(stderr, ">\n"); if (!simpleTag) { c=GWEN_XMLNode_GetChild(n); while (c) { GWEN_XMLNode_Dump(c, ind+2); c=GWEN_XMLNode_Next(c); } for (i=0; idata) fprintf(stderr, "\n", n->data); else fprintf(stderr, "\n"); } } else if (n->type==GWEN_XMLNodeTypeData) { if (n->data) { fprintf(stderr, "%s\n", n->data); } } else if (n->type==GWEN_XMLNodeTypeComment) { fprintf(stderr, "\n"); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown tag type (%d)", n->type); } } GWEN_XMLNODE *GWEN_XMLNode_FindNode(const GWEN_XMLNODE *node, GWEN_XMLNODE_TYPE t, const char *data) { GWEN_XMLNODE *n; assert(node); assert(data); n=GWEN_XMLNode_GetChild(node); while (n) { if (n->type==t) if (n->data) if (strcasecmp(n->data, data)==0) break; n=GWEN_XMLNode_Next(n); } /* while */ if (!n) { DBG_DEBUG(GWEN_LOGDOMAIN, "Node %d:\"%s\" not found", t, data); return 0; } return n; } void GWEN_XMLNode_UnlinkChild(GWEN_XMLNODE *n, GWEN_XMLNODE *child) { assert(n); assert(child); GWEN_XMLNode_List_Del(child); child->parent=0; } void GWEN_XMLNode_RemoveChildren(GWEN_XMLNODE *n) { assert(n); GWEN_XMLNode_List_Clear(n->children); } void GWEN_XMLNode_CopyProperties(GWEN_XMLNODE *tn, const GWEN_XMLNODE *sn, int overwrite) { const GWEN_XMLPROPERTY *sp; GWEN_XMLPROPERTY *tp; assert(tn); assert(sn); sp=sn->properties; while (sp) { GWEN_XMLPROPERTY *np; assert(sp->name); tp=tn->properties; /* lookup property in target */ while (tp) { assert(tp->name); if (strcasecmp(tp->name, sp->name)==0) { /* property already exists */ if (overwrite) { /* overwrite old property */ GWEN_Memory_dealloc(tp->value); tp->value=0; if (sp->value) tp->value=GWEN_Memory_strdup(sp->value); } break; } tp=tp->next; } /* while */ if (!tp) { /* property not found, simply copy and add it */ np=GWEN_XMLProperty_dup(sp); GWEN_XMLProperty_add(np, &(tn->properties)); } sp=sp->next; } /* while */ } int GWEN_XMLNode_ExpandProperties(const GWEN_XMLNODE *n, GWEN_DB_NODE *dbVars) { GWEN_XMLPROPERTY *sp; assert(n); sp=n->properties; if (sp) { GWEN_BUFFER *tmpBuf; tmpBuf=GWEN_Buffer_new(0, 256, 0, 1); while(sp) { if (sp->value) { int rv; rv=GWEN_DB_ReplaceVars(dbVars, sp->value, tmpBuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error expanding value for property \"%s\": [%s] (%d)", (sp->name)?(sp->name):"", (sp->value)?(sp->value):"", rv); return rv; } GWEN_Memory_dealloc(sp->value); sp->value=GWEN_Memory_strdup(GWEN_Buffer_GetStart(tmpBuf)); GWEN_Buffer_Reset(tmpBuf); } /* if sp->value */ sp=sp->next; } /* while */ GWEN_Buffer_free(tmpBuf); } return 0; } GWEN_XMLNODE *GWEN_XMLNode_GetFirstOfType(const GWEN_XMLNODE *n, GWEN_XMLNODE_TYPE t) { GWEN_XMLNODE *nn; assert(n); nn=GWEN_XMLNode_GetChild(n); while (nn) { if (nn->type==t) return nn; nn=GWEN_XMLNode_Next(nn); } /* while */ return 0; } GWEN_XMLNODE *GWEN_XMLNode_GetNextOfType(const GWEN_XMLNODE *n, GWEN_XMLNODE_TYPE t) { assert(n); while (n) { if (n->type==t) return (GWEN_XMLNODE *)n; n=GWEN_XMLNode_Next(n); } /* while */ return 0; } GWEN_XMLNODE *GWEN_XMLNode_GetFirstTag(const GWEN_XMLNODE *n) { return GWEN_XMLNode_GetFirstOfType(n, GWEN_XMLNodeTypeTag); } GWEN_XMLNODE *GWEN_XMLNode_GetNextTag(const GWEN_XMLNODE *n) { GWEN_XMLNODE *next; next=GWEN_XMLNode_Next(n); if (!next) return 0; return GWEN_XMLNode_GetNextOfType(next, GWEN_XMLNodeTypeTag); } GWEN_XMLNODE *GWEN_XMLNode_GetFirstData(const GWEN_XMLNODE *n) { return GWEN_XMLNode_GetFirstOfType(n, GWEN_XMLNodeTypeData); } GWEN_XMLNODE *GWEN_XMLNode_GetNextData(const GWEN_XMLNODE *n) { GWEN_XMLNODE *next; next=GWEN_XMLNode_Next(n); if (!next) return 0; return GWEN_XMLNode_GetNextOfType(next, GWEN_XMLNodeTypeData); } GWEN_XMLNODE *GWEN_XMLNode_FindTag(const GWEN_XMLNODE *n, const char *tname, const char *pname, const char *pvalue) { while (n) { if (-1!=GWEN_Text_ComparePattern(n->data, tname, 0)) { if (pname) { const char *p; p=GWEN_XMLNode_GetProperty(n, pname, 0); if (p) { if (!pvalue) return (GWEN_XMLNODE *)n; if (-1!=GWEN_Text_ComparePattern(pvalue, p, 0)) return (GWEN_XMLNODE *)n; } else { /* return this node if pvalue is 0 an the property does not exist */ if (!pvalue) return (GWEN_XMLNODE *)n; } } /* if pname */ else return (GWEN_XMLNODE *)n; } n=GWEN_XMLNode_GetNextTag(n); } /* while */ return 0; } GWEN_XMLNODE *GWEN_XMLNode_FindFirstTag(const GWEN_XMLNODE *n, const char *tname, const char *pname, const char *pvalue) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetFirstTag(n); if (!nn) return 0; return GWEN_XMLNode_FindTag(nn, tname, pname, pvalue); } GWEN_XMLNODE *GWEN_XMLNode_FindNextTag(const GWEN_XMLNODE *n, const char *tname, const char *pname, const char *pvalue) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetNextTag(n); if (!nn) return 0; return GWEN_XMLNode_FindTag(nn, tname, pname, pvalue); } const char *GWEN_XMLNode_GetCharValue(const GWEN_XMLNODE *n, const char *name, const char *defValue) { GWEN_XMLNODE *nn; if (name && *name) { nn=GWEN_XMLNode_FindFirstTag(n, name, 0, 0); while (nn) { GWEN_XMLNODE *dn; dn=GWEN_XMLNode_GetFirstData(nn); if (dn) { if (dn->data) return dn->data; } nn=GWEN_XMLNode_FindNextTag(nn, name, 0, 0); } } else { GWEN_XMLNODE *dn; dn=GWEN_XMLNode_GetFirstData(n); if (dn) { if (dn->data) return dn->data; } } return defValue; } const char *GWEN_XMLNode_GetLocalizedCharValue(const GWEN_XMLNODE *n, const char *name, const char *defValue) { GWEN_XMLNODE *nn=0; GWEN_STRINGLIST *langl; langl=GWEN_I18N_GetCurrentLocaleList(); if (langl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(langl); while (se) { const char *l; l=GWEN_StringListEntry_Data(se); DBG_DEBUG(GWEN_LOGDOMAIN, "Trying locale \"%s\"", l); assert(l); nn=GWEN_XMLNode_FindFirstTag(n, name, "lang", l); while (nn) { GWEN_XMLNODE *dn; dn=GWEN_XMLNode_GetFirstData(nn); if (dn) { if (dn->data && *(dn->data)) return dn->data; } nn=GWEN_XMLNode_FindNextTag(nn, name, "lang", l); } /* while nn */ se=GWEN_StringListEntry_Next(se); } /* while */ } /* if language list available */ /* otherwise try without locale */ nn=GWEN_XMLNode_FindFirstTag(n, name, 0, 0); while (nn) { GWEN_XMLNODE *dn; dn=GWEN_XMLNode_GetFirstData(nn); if (dn) { if (dn->data) return dn->data; } nn=GWEN_XMLNode_FindNextTag(nn, name, 0, 0); } return defValue; } void GWEN_XMLNode_SetCharValue(GWEN_XMLNODE *n, const char *name, const char *value) { if (name && *name) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, name); if (value) { GWEN_XMLNODE *nnn; nnn=GWEN_XMLNode_new(GWEN_XMLNodeTypeData, value); GWEN_XMLNode_AddChild(nn, nnn); } GWEN_XMLNode_AddChild(n, nn); } else { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_new(GWEN_XMLNodeTypeData, value); GWEN_XMLNode_AddChild(n, nn); } } int GWEN_XMLNode_GetIntValue(const GWEN_XMLNODE *n, const char *name, int defValue) { const char *p; int res; p=GWEN_XMLNode_GetCharValue(n, name, 0); if (!p) return defValue; if (1!=sscanf(p, "%i", &res)) return defValue; return res; } void GWEN_XMLNode_SetIntValue(GWEN_XMLNODE *n, const char *name, int value) { char numbuf[32]; snprintf(numbuf, sizeof(numbuf)-1, "%d", value); numbuf[sizeof(numbuf)-1]=0; GWEN_XMLNode_SetCharValue(n, name, numbuf); } int GWEN_XMLNode_SetCharValueByPath(GWEN_XMLNODE *n, uint32_t flags, const char *name, const char *value) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetNodeByXPath(n, name, 0); if (nn) { GWEN_XMLNODE *nnn; /* clear current entries */ if (flags & GWEN_XML_PATH_FLAGS_OVERWRITE_VALUES) GWEN_XMLNode_List_Clear(nn->children); /* create value node */ nnn=GWEN_XMLNode_new(GWEN_XMLNodeTypeData, value); GWEN_XMLNode_AddChild(nn, nnn); return 0; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Unable to create node [%s]", name); return GWEN_ERROR_INVALID; } } const char *GWEN_XMLNode_GetCharValueByPath(GWEN_XMLNODE *n, const char *name, const char *defValue) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetNodeByXPath(n, name, 0); if (nn) { GWEN_XMLNODE *dn; dn=GWEN_XMLNode_GetFirstData(nn); if (dn) { if (dn->data) return dn->data; } } return defValue; } int GWEN_XMLNode_SetIntValueByPath(GWEN_XMLNODE *n, uint32_t flags, const char *name, int value) { char numbuf[32]; int rv; /* create int value */ snprintf(numbuf, sizeof(numbuf)-1, "%d", value); numbuf[sizeof(numbuf)-1]=0; rv=GWEN_XMLNode_SetCharValueByPath(n, flags, name, numbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } int GWEN_XMLNode_GetIntValueByPath(GWEN_XMLNODE *n, const char *name, int defValue) { const char *p; int res; p=GWEN_XMLNode_GetCharValueByPath(n, name, NULL); if (!p) return defValue; if (1!=sscanf(p, "%i", &res)) return defValue; return res; } GWEN_XMLPROPERTY *GWEN_XMLNode_GetFirstProperty(const GWEN_XMLNODE *n) { assert(n); return n->properties; } GWEN_XMLPROPERTY *GWEN_XMLNode_GetNextProperty(const GWEN_XMLNODE *n, const GWEN_XMLPROPERTY *pr) { assert(n); assert(pr); return pr->next; } const char *GWEN_XMLProperty_GetName(const GWEN_XMLPROPERTY *pr) { assert(pr); return pr->name; } const char *GWEN_XMLProperty_GetValue(const GWEN_XMLPROPERTY *pr) { assert(pr); return pr->value; } int GWEN_XMLNode_IsChildOf(const GWEN_XMLNODE *parent, const GWEN_XMLNODE *child) { GWEN_XMLNODE *n; if (!child || !parent || child==parent) return 0; n=child->parent; while (n) { if (n==parent) return 1; n=n->parent; } return 0; } int GWEN_XMLNode_GetXPath(const GWEN_XMLNODE *n1, const GWEN_XMLNODE *n2, GWEN_BUFFER *nbuf) { GWEN_BUFFER *lbuf; const GWEN_XMLNODE *ln1; const GWEN_XMLNODE *ln2; if (!n1 && !n2) { DBG_ERROR(GWEN_LOGDOMAIN, "Both nodes are NULL"); return -1; } if (!n1) { n1=n2; while (n1->parent) n1=n1->parent; } if (!n2) { n2=n1; while (n2->parent) n2=n2->parent; } if (n2==n1) { GWEN_Buffer_AppendString(nbuf, "here()"); return 0; } lbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_ReserveBytes(lbuf, 128); ln1=n1->parent; if (ln1) { GWEN_Buffer_AppendString(lbuf, "../"); while (ln1) { if (ln1==n2) { /* found n2 */ GWEN_Buffer_AppendBuffer(nbuf, lbuf); GWEN_Buffer_free(lbuf); return 0; } if (GWEN_XMLNode_IsChildOf(ln1, n2)) break; ln1=ln1->parent; GWEN_Buffer_AppendString(lbuf, "../"); } if (!ln1) { DBG_ERROR(GWEN_LOGDOMAIN, "Nodes do not share root node"); GWEN_Buffer_free(lbuf); return -1; } /* append path to n1 */ GWEN_Buffer_AppendBuffer(nbuf, lbuf); } DBG_DEBUG(GWEN_LOGDOMAIN, "Path so far: %s", GWEN_Buffer_GetStart(lbuf)); /* get path to n2 */ GWEN_Buffer_Reset(lbuf); ln2=n2; while (ln2) { GWEN_XMLNODE *tn; int idx; char idxbuf[32]; if (ln2->parent==ln1) break; /* count occurences of this tag in this level */ idx=1; tn=ln2->parent; if (tn) { tn=GWEN_XMLNode_FindFirstTag(tn, ln2->data, 0, 0); while (tn) { if (tn==ln2) break; idx++; tn=GWEN_XMLNode_FindNextTag(tn, ln2->data, 0, 0); } } snprintf(idxbuf, sizeof(idxbuf), "[%d]", idx); idxbuf[sizeof(idxbuf)-1]=0; GWEN_Buffer_InsertString(lbuf, idxbuf); GWEN_Buffer_InsertString(lbuf, GWEN_XMLNode_GetData(ln2)); GWEN_Buffer_InsertByte(lbuf, '/'); ln2=ln2->parent; } /*DBG_ERROR(GWEN_LOGDOMAIN, "Path so far: %s", GWEN_Buffer_GetStart(lbuf)); */ assert(ln2); /* append path to n2 */ GWEN_Buffer_AppendBuffer(nbuf, lbuf); GWEN_Buffer_free(lbuf); return 0; } void *GWEN_XMLNode_HandlePath(const char *entry, void *data, int idx, uint32_t flags) { GWEN_XMLNODE *n; GWEN_XMLNODE *nn; int i; n=(GWEN_XMLNODE *)data; if (flags & GWEN_PATH_FLAGS_VARIABLE) { DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_PATH_FLAGS_VARIABLE not allowed for XPATH"); return 0; } if (flags & GWEN_PATH_FLAGS_ROOT) { while (n->parent) n=n->parent; if (*entry=='/') entry++; } if (strcasecmp(entry, "..")==0) { return n->parent; } else if (strcasecmp(entry, ".")==0 || strcasecmp(entry, "here()")==0) { return n; } /* check whether we are allowed to simply create the node */ if ( ((flags & GWEN_PATH_FLAGS_LAST) && (((flags & GWEN_PATH_FLAGS_VARIABLE) && (flags & GWEN_PATH_FLAGS_CREATE_VAR)) || (!(flags & GWEN_PATH_FLAGS_VARIABLE) && (flags & GWEN_PATH_FLAGS_CREATE_GROUP))) ) || ( !(flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_PATHCREATE)) ) { /* simply create the new variable/group */ if (flags & GWEN_PATH_FLAGS_VARIABLE) { /* not allowed for now */ return 0; } else { if (idx!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Can not create tag with index!=1 (%s)", entry); return 0; } DBG_VERBOUS(GWEN_LOGDOMAIN, "Unconditionally creating tag \"%s\"", entry); nn=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, entry); GWEN_XMLNode_AddChild(n, nn); return nn; } } /* find the node */ i=idx; nn=GWEN_XMLNode_FindFirstTag(n, entry, 0, 0); while (nn && i--) { nn=GWEN_XMLNode_FindNextTag(nn, entry, 0, 0); } if (!nn) { /* node not found, check, if we are allowed to create it */ if ( (!(flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_PATHMUSTEXIST)) || (flags & GWEN_PATH_FLAGS_NAMEMUSTEXIST) ) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Tag \"%s\" does not exist", entry); return 0; } /* create the new variable/group */ if (idx!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Can not create tag with index!=1 (%s)", entry); return 0; } DBG_VERBOUS(GWEN_LOGDOMAIN, "Tag \"%s\" not found, creating", entry); nn=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, entry); GWEN_XMLNode_AddChild(n, nn); } /* if node not found */ else { /* node does exist, check whether this is ok */ if ( ((flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_NAMEMUSTNOTEXIST)) || (!(flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_PATHMUSTNOTEXIST)) ) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Entry \"%s\" already exists", entry); return 0; } } return nn; } GWEN_XMLNODE *GWEN_XMLNode_GetNodeByXPath(GWEN_XMLNODE *n, const char *path, uint32_t flags) { return (GWEN_XMLNODE *)GWEN_Path_HandleWithIdx(path, (void *)n, flags, GWEN_XMLNode_HandlePath); } GWEN_XMLNODE *GWEN_XMLNode_GetHeader(const GWEN_XMLNODE *n) { assert(n); return GWEN_XMLNode_List_First(n->headers); } void GWEN_XMLNode_AddHeader(GWEN_XMLNODE *n, GWEN_XMLNODE *nh) { assert(n); assert(nh); GWEN_XMLNode_List_Add(nh, n->headers); } void GWEN_XMLNode_DelHeader(GWEN_XMLNODE *n, GWEN_XMLNODE *nh) { assert(n); assert(nh); GWEN_XMLNode_List_Del(nh); } void GWEN_XMLNode_ClearHeaders(GWEN_XMLNODE *n) { assert(n); GWEN_XMLNode_List_Clear(n->headers); } GWEN_XMLNODE_NAMESPACE_LIST *GWEN_XMLNode_GetNameSpaces(const GWEN_XMLNODE *n) { assert(n); return n->nameSpaces; } GWEN_XMLNODE_NAMESPACE *GWEN_XMLNode_FindNameSpaceByName(const GWEN_XMLNODE *n, const char *s) { GWEN_XMLNODE_NAMESPACE *ns; assert(n); ns=GWEN_XMLNode_NameSpace_List_First(n->nameSpaces); while (ns) { const char *d; d=GWEN_XMLNode_NameSpace_GetName(ns); if (d && strcasecmp(d, s)==0) return ns; ns=GWEN_XMLNode_NameSpace_List_Next(ns); } return NULL; } GWEN_XMLNODE_NAMESPACE *GWEN_XMLNode_FindNameSpaceByUrl(const GWEN_XMLNODE *n, const char *s) { GWEN_XMLNODE_NAMESPACE *ns; assert(n); ns=GWEN_XMLNode_NameSpace_List_First(n->nameSpaces); while (ns) { const char *d; d=GWEN_XMLNode_NameSpace_GetUrl(ns); if (d && strcasecmp(d, s)==0) return ns; ns=GWEN_XMLNode_NameSpace_List_Next(ns); } return NULL; } void GWEN_XMLNode_AddNameSpace(GWEN_XMLNODE *n, const GWEN_XMLNODE_NAMESPACE *ns) { assert(n); assert(ns); GWEN_XMLNode_NameSpace_List_Add(GWEN_XMLNode_NameSpace_dup(ns), n->nameSpaces); } int GWEN_XML_AddNameSpace(GWEN_STRINGLIST2 *sl, const char *prefix, const char *name) { GWEN_BUFFER *nbuf; int rv; nbuf=GWEN_Buffer_new(0, 32, 0, 1); if (prefix) GWEN_Buffer_AppendString(nbuf, prefix); GWEN_Buffer_AppendByte(nbuf, ':'); GWEN_Buffer_AppendString(nbuf, name); rv=GWEN_StringList2_AppendString(sl, GWEN_Buffer_GetStart(nbuf), 0, GWEN_StringList2_IntertMode_NoDouble); GWEN_Buffer_free(nbuf); return rv; } const char *GWEN_XML_FindNameSpaceByPrefix(GWEN_STRINGLIST2 *sl, const char *s) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2_First(sl); if (it) { const char *t; t=GWEN_StringList2Iterator_Data(it); assert(t); while (t) { const char *p; p=strchr(t, ':'); assert(p); if ((s==0 && p==t) || (s && strncasecmp(t, s, p-t)==0)) return t; t=GWEN_StringList2Iterator_Next(it); } /* while */ GWEN_StringList2Iterator_free(it); } return 0; } const char *GWEN_XML_FindNameSpaceByName(GWEN_STRINGLIST2 *sl, const char *s) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2_First(sl); if (it) { const char *t; t=GWEN_StringList2Iterator_Data(it); assert(t); while (t) { const char *p; p=strchr(t, ':'); assert(p); p++; if (strcasecmp(p, s)==0) { GWEN_StringList2Iterator_free(it); return t; } t=GWEN_StringList2Iterator_Next(it); } /* while */ GWEN_StringList2Iterator_free(it); } return 0; } const char *GWEN_XML_FindNameSpace(GWEN_STRINGLIST2 *sl, const char *prefix, const char *name) { GWEN_BUFFER *nbuf; GWEN_STRINGLIST2_ITERATOR *it; nbuf=GWEN_Buffer_new(0, 32, 0, 1); if (prefix) GWEN_Buffer_AppendString(nbuf, prefix); GWEN_Buffer_AppendByte(nbuf, ':'); GWEN_Buffer_AppendString(nbuf, name); it=GWEN_StringList2_First(sl); if (it) { const char *t; t=GWEN_StringList2Iterator_Data(it); assert(t); while (t) { const char *p; p=strchr(t, ':'); assert(p); p++; if (strcasecmp(p, GWEN_Buffer_GetStart(nbuf))==0) { GWEN_StringList2Iterator_free(it); GWEN_Buffer_free(nbuf); return t; } t=GWEN_StringList2Iterator_Next(it); } /* while */ GWEN_StringList2Iterator_free(it); } GWEN_Buffer_free(nbuf); return 0; } int GWEN_XMLNode__CheckNameSpaceDecls1(GWEN_XMLNODE *n, GWEN_STRINGLIST2 *sl, const char *currentNameSpace) { GWEN_XMLPROPERTY *pr; GWEN_XMLNODE *nn; char *localNameSpace; localNameSpace=0; /* remove all unnecessary namespace declarations from this node */ pr=n->properties; while (pr) { GWEN_XMLPROPERTY *prNext; prNext=pr->next; if (strcasecmp(pr->name, "xmlns")==0) { /* default namespace changed ? */ if (localNameSpace) { if (strcasecmp(pr->value, localNameSpace)==0) { /* already mentioned name space, remove duplicate property */ GWEN_XMLProperty_del(pr, &n->properties); GWEN_XMLProperty_free(pr); } else { /* current namespace changed */ GWEN_Memory_dealloc(localNameSpace); localNameSpace=GWEN_Memory_strdup(pr->value); } } else if (currentNameSpace) { if (strcasecmp(pr->value, currentNameSpace)==0) { /* already active name space, remove property */ GWEN_XMLProperty_del(pr, &n->properties); GWEN_XMLProperty_free(pr); } else { /* current namespace changed */ GWEN_Memory_dealloc(localNameSpace); localNameSpace=GWEN_Memory_strdup(pr->value); } } else { /* set current namespace */ GWEN_Memory_dealloc(localNameSpace); localNameSpace=GWEN_Memory_strdup(pr->value); } } else if (strncasecmp(pr->name, "xmlns:", 6)==0) { const char *prefix; const char *x; prefix=strchr(pr->name, ':'); prefix++; /* check for redefinition */ x=GWEN_XML_FindNameSpaceByName(sl, prefix); if (x) { const char *p; /* prefix already in use, check whether it is the same namespace */ p=strchr(x, ':'); assert(p); p++; if (strcasecmp(p, pr->value)!=0) { GWEN_BUFFER *xpath; /* same prefix, different namespace */ xpath=GWEN_Buffer_new(0, 256, 0, 1); GWEN_XMLNode_GetXPath(0, n, xpath); DBG_ERROR(GWEN_LOGDOMAIN, "Redefinition of namespace prefix \"%s\" in \"%s\"", prefix, GWEN_Buffer_GetStart(xpath)); GWEN_Buffer_free(xpath); return -1; } /* if different namespace for same prefix */ else { /* already in list, remove property here */ GWEN_XMLProperty_del(pr, &n->properties); GWEN_XMLProperty_free(pr); } } else { GWEN_XML_AddNameSpace(sl, prefix, pr->value); } } pr=prNext; } /* while */ /* do the same on all sub nodes */ nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { int rv; rv=GWEN_XMLNode__CheckNameSpaceDecls1(nn, sl, localNameSpace?localNameSpace: currentNameSpace); if (rv) { GWEN_Memory_dealloc(localNameSpace); return rv; } nn=GWEN_XMLNode_GetNextTag(nn); } GWEN_Memory_dealloc(localNameSpace); return 0; } int GWEN_XMLNode__CheckAndSetNameSpace(GWEN_XMLNODE *n, const char *prefix, const char *nspace) { GWEN_XMLPROPERTY *pr; const char *p; int inUse; inUse=0; /* check current tag for prefix */ if (prefix) { p=strchr(n->data, ':'); if (p) { if (strncasecmp(n->data, prefix, p-n->data)==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Prefix \"%s\" used in tag \"%s\"", prefix, n->data); inUse=1; } } if (!inUse) { /* check all attributes for prefixes */ pr=n->properties; while (pr) { p=strchr(pr->name, ':'); if (p) { if (strncasecmp(pr->name, prefix, p-pr->name)==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Prefix \"%s\" used in attribute \"%s\" of tag \"%s\"", prefix, pr->name, n->data); inUse=1; break; } else { DBG_DEBUG(GWEN_LOGDOMAIN, "Prefix \"%s\" not used in attribute \"%s\" of tag \"%s\"", prefix, pr->name, n->data); } } pr=pr->next; } /* while */ } } /* if prefix */ else { /* no prefix, check whether the current element hasn't any */ p=strchr(n->data, ':'); if (!p) { /* current tag has no prefix, check whether we have a namespace * declaration here */ if (GWEN_XMLNode_GetProperty(n, "xmlns", 0)==0) { /* no, so the current namespace from above is used */ DBG_DEBUG(GWEN_LOGDOMAIN, "No prefix, current namespace is used"); inUse=1; } } } /* if no prefix */ if (inUse) { GWEN_BUFFER *nbuf; nbuf=GWEN_Buffer_new(0, 32, 0, 1); GWEN_Buffer_AppendString(nbuf, "xmlns"); if (prefix) { GWEN_Buffer_AppendByte(nbuf, ':'); GWEN_Buffer_AppendString(nbuf, prefix); } GWEN_XMLNode__SetProperty(n, GWEN_Buffer_GetStart(nbuf), nspace, 1); GWEN_Buffer_free(nbuf); return 1; } return 0; } int GWEN_XMLNode__SetNameSpaces(GWEN_XMLNODE *n, const char *prefix, const char *nspace) { GWEN_XMLNODE *nn; int rv; rv=GWEN_XMLNode__CheckAndSetNameSpace(n, prefix, nspace); if (rv) return rv; nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=GWEN_XMLNode__CheckAndSetNameSpace(nn, prefix, nspace); if (rv==-1) return rv; else if (rv==0) { /* check children */ rv=GWEN_XMLNode__SetNameSpaces(nn, prefix, nspace); if (rv) return rv; } nn=GWEN_XMLNode_GetNextTag(nn); } return 0; } int GWEN_XMLNode__CheckNameSpaceDecls3(GWEN_XMLNODE *n) { GWEN_XMLPROPERTY *pr; GWEN_XMLNODE *nn; int rv; /* move all namespace declarations from this node to the nodes * of first use */ pr=n->properties; while (pr) { GWEN_XMLPROPERTY *prNext; prNext=pr->next; if (strcasecmp(pr->name, "xmlns")==0 || strncasecmp(pr->name, "xmlns:", 6)==0) { const char *prefix; prefix=strchr(pr->name, ':'); if (prefix) prefix++; GWEN_XMLProperty_del(pr, &n->properties); rv=GWEN_XMLNode__SetNameSpaces(n, prefix, pr->value); DBG_DEBUG(GWEN_LOGDOMAIN, "Removing property \"%s\"", pr->name); GWEN_XMLProperty_free(pr); if (rv==-1) return rv; } pr=prNext; } /* while */ /* do the same on all sub nodes */ nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=GWEN_XMLNode__CheckNameSpaceDecls3(nn); if (rv) { return rv; } nn=GWEN_XMLNode_GetNextTag(nn); } return 0; } int GWEN_XMLNode_NormalizeNameSpaces(GWEN_XMLNODE *n) { const char *ns; int rv; GWEN_STRINGLIST2 *sl; ns=GWEN_XMLNode_GetProperty(n, "xmlns", 0); sl=GWEN_StringList2_new(); rv=GWEN_XMLNode__CheckNameSpaceDecls1(n, sl, ns); GWEN_StringList2_free(sl); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here"); return rv; } //rv=GWEN_XMLNode__CheckNameSpaceDecls2(n, ns); rv=GWEN_XMLNode__CheckNameSpaceDecls3(n); if (rv==-1) return rv; return 0; } int GWEN_XMLNode_StripNamespaces(GWEN_XMLNODE *n) { if (n && n->type==GWEN_XMLNodeTypeTag && n->data) { GWEN_XMLNODE *nn; GWEN_XMLPROPERTY *pp; if (n->nameSpace==0) { char *p; p=strchr(n->data, ':'); if (p) { int len=p-n->data; char *s; n->nameSpace=(char *)GWEN_Memory_malloc(len); assert(n->nameSpace); memmove(n->nameSpace, n->data, len); n->nameSpace[len-1]=0; s=GWEN_Memory_strdup(p+1); free(n->data); n->data=s; } } pp=n->properties; while (pp) { if (pp->nameSpace==0) { char *p; p=strchr(pp->name, ':'); if (p) { int len=p-pp->name; char *s; pp->nameSpace=(char *)GWEN_Memory_malloc(len); assert(pp->nameSpace); memmove(pp->nameSpace, pp->name, len); pp->nameSpace[len-1]=0; s=GWEN_Memory_strdup(p+1); free(pp->name); pp->name=s; } } pp=pp->next; } nn=GWEN_XMLNode_List_First(n->children); while (nn) { int rv; rv=GWEN_XMLNode_StripNamespaces(nn); if (rv<0) { DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } nn=GWEN_XMLNode_List_Next(nn); } } return 0; } GWEN_XMLNODE_PATH *GWEN_XMLNode_Path_new(void) { GWEN_XMLNODE_PATH *p; GWEN_NEW_OBJECT(GWEN_XMLNODE_PATH, p); return p; } GWEN_XMLNODE_PATH *GWEN_XMLNode_Path_dup(const GWEN_XMLNODE_PATH *np) { GWEN_XMLNODE_PATH *p; unsigned int i; GWEN_NEW_OBJECT(GWEN_XMLNODE_PATH, p); p->pos=np->pos; for (i=0; ipos; i++) { p->nodes[i]=np->nodes[i]; } return p; } void GWEN_XMLNode_Path_free(GWEN_XMLNODE_PATH *np) { GWEN_FREE_OBJECT(np); } int GWEN_XMLNode_Path_Dive(GWEN_XMLNODE_PATH *np, GWEN_XMLNODE *n) { unsigned int i; if (np->pos>=GWEN_XML_MAX_DEPTH) { DBG_ERROR(GWEN_LOGDOMAIN, "Path too deep"); return 1; } /* check for double entries */ for (i=0; ipos; i++) { assert(np->nodes[i]!=n); } np->nodes[np->pos++]=n; DBG_DEBUG(GWEN_LOGDOMAIN, "Dived to %d", np->pos); return 0; } GWEN_XMLNODE *GWEN_XMLNode_Path_Surface(GWEN_XMLNODE_PATH *np) { if (np->pos==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Root reached"); return 0; } DBG_DEBUG(GWEN_LOGDOMAIN, "Surfaced to %d", np->pos-1); return np->nodes[--np->pos]; } void GWEN_XMLNode_Path_Dump(GWEN_XMLNODE_PATH *np) { unsigned int i; if (np->pos==0) { DBG_NOTICE(GWEN_LOGDOMAIN, "Empty path"); } for (i=0; ipos; i++) { DBG_NOTICE(GWEN_LOGDOMAIN, "Path entry %d:", i); GWEN_XMLNode_Dump(np->nodes[i], 1); } } GWEN_XMLNODE_NAMESPACE *GWEN_XMLNode_NameSpace_new(const char *name, const char *url) { GWEN_XMLNODE_NAMESPACE *ns; GWEN_NEW_OBJECT(GWEN_XMLNODE_NAMESPACE, ns); GWEN_LIST_INIT(GWEN_XMLNODE_NAMESPACE, ns); if (name) ns->name=GWEN_Memory_strdup(name); if (url) ns->url=GWEN_Memory_strdup(url); return ns; } void GWEN_XMLNode_NameSpace_free(GWEN_XMLNODE_NAMESPACE *ns) { if (ns) { GWEN_LIST_FINI(GWEN_XMLNODE_NAMESPACE, ns); free(ns->url); free(ns->name); GWEN_FREE_OBJECT(ns); } } GWEN_XMLNODE_NAMESPACE *GWEN_XMLNode_NameSpace_dup(const GWEN_XMLNODE_NAMESPACE *ns) { GWEN_XMLNODE_NAMESPACE *nns; assert(ns); nns=GWEN_XMLNode_NameSpace_new(ns->name, ns->url); return nns; } const char *GWEN_XMLNode_NameSpace_GetName(const GWEN_XMLNODE_NAMESPACE *ns) { assert(ns); return ns->name; } const char *GWEN_XMLNode_NameSpace_GetUrl(const GWEN_XMLNODE_NAMESPACE *ns) { assert(ns); return ns->url; } #include "xmlrw.c" #include "xmlglobalize.c" gwenhywfar-5.12.1/src/parser/json_read.h0000664000175000017500000000327714460564441015125 00000000000000/*************************************************************************** copyright : (C) 2023 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_JSON_READ_H #define GWENHYWFAR_JSON_READ_H #include GWENHYWFAR_API GWEN_JSON_ELEM *GWEN_JsonElement_fromString(const char *s); #endif gwenhywfar-5.12.1/src/parser/dbio_p.h0000644000175000017500000000437113142134464014401 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Wed Mar 31 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /** @file gwenhywfar/dbio.h */ #ifndef GWENHYWFAR_DBIO_P_H #define GWENHYWFAR_DBIO_P_H #include "dbio_l.h" #include typedef struct GWEN_DBIO_PLUGIN GWEN_DBIO_PLUGIN; struct GWEN_DBIO_PLUGIN { GWEN_DBIO_PLUGIN_FACTORYFN factoryFn; }; void GWENHYWFAR_CB GWEN_DBIO_Plugin_FreeData(void *bp, void *p); struct GWEN_DBIO { GWEN_LIST_ELEMENT(GWEN_DBIO) GWEN_INHERIT_ELEMENT(GWEN_DBIO) /* No trailing semicolon here because this is a macro call */ GWEN_DBIO_IMPORTFN importFn; GWEN_DBIO_EXPORTFN exportFn; GWEN_DBIO_CHECKFILEFN checkFileFn; char *name; char *descr; uint32_t usage; }; #endif /* GWENHYWFAR_DBIO_P_H */ gwenhywfar-5.12.1/src/parser/base64.h0000644000175000017500000000543213315401461014224 00000000000000/*************************************************************************** begin : Thu May 06 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_BASE64_H #define GWENHYWFAR_BASE64_H #include #include #ifdef __cplusplus extern "C" { #endif /** * Encodes the given bytes and stores the result in a GWEN_BUFFER. * @return 0 if ok, !=0 on error * @param src src buffer * @param size number of bytes in the source buffer * @param dst destination buffer * @param maxLineLength after this number of bytes a line break is inserted * (if 0 then no line break is inserted) */ GWENHYWFAR_API int GWEN_Base64_Encode(const unsigned char *src, unsigned int size, GWEN_BUFFER *dst, unsigned int maxLineLength); /** * Decodes base64 encoded data and stores the result in a GWEN_BUFFER. * @return 0 if ok, !=0 on error * @param src src buffer * @param size number of bytes to store in the GWEN_BUFFER (this is NOT * the number of bytes stored in the source buffer, that buffer must * hold more bytes because base64 encoding inflates the data to 4/3). * @param dst destination buffer */ GWENHYWFAR_API int GWEN_Base64_Decode(const unsigned char *src, unsigned int size, GWEN_BUFFER *dst); #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_BASE64_H */ gwenhywfar-5.12.1/src/parser/urlfns.h0000644000175000017500000000246613142134464014461 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Fri May 07 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_URLFNS_H #define GWEN_URLFNS_H #include #include #ifdef __cplusplus extern "C" { #endif /** * Parses the given string and returns an URL object (if the string is ok). */ GWENHYWFAR_API GWEN_URL *GWEN_Url_fromString(const char *str); GWENHYWFAR_API int GWEN_Url_toString(const GWEN_URL *url, GWEN_BUFFER *buf); GWENHYWFAR_API GWEN_URL *GWEN_Url_fromCommandString(const char *str); GWENHYWFAR_API int GWEN_Url_toCommandString(const GWEN_URL *url, GWEN_BUFFER *buf); /** * Creates a short string for user interface output. This means no password or * user id is shown, and no URL vars either. */ GWENHYWFAR_API void GWEN_Url_toUiShortString(const GWEN_URL *url, GWEN_BUFFER *buf); #ifdef __cplusplus } /* __cplusplus */ #endif #endif /* HTTPURLFNS_H */ gwenhywfar-5.12.1/src/parser/url.c0000666000175000017500000001557013552157347013763 00000000000000/* This file is auto-generated from "url.xml" by the typemaker tool of Gwenhywfar. Do not edit this file -- all changes will be lost! */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "url_p.h" #include #include #include #include #include #include #include #include GWEN_LIST_FUNCTIONS(GWEN_URL, GWEN_Url) GWEN_LIST2_FUNCTIONS(GWEN_URL, GWEN_Url) static GWEN_URL *GWEN_Url_List2__freeAll_cb(GWEN_URL *st, GWEN_UNUSED void *user_data); GWEN_URL *GWEN_Url_new(void) { GWEN_URL *st; GWEN_NEW_OBJECT(GWEN_URL, st) st->_usage=1; GWEN_LIST_INIT(GWEN_URL, st) st->vars=GWEN_DB_Group_new("vars"); return st; } void GWEN_Url_free(GWEN_URL *st) { if (st) { assert(st->_usage); if (--(st->_usage)==0) { if (st->protocol) free(st->protocol); if (st->server) free(st->server); if (st->path) free(st->path); if (st->userName) free(st->userName); if (st->password) free(st->password); if (st->vars) GWEN_DB_Group_free(st->vars); if (st->url) free(st->url); GWEN_LIST_FINI(GWEN_URL, st) GWEN_FREE_OBJECT(st); } } } GWEN_URL *GWEN_Url_dup(const GWEN_URL *d) { GWEN_URL *st; assert(d); st=GWEN_Url_new(); if (d->protocol) st->protocol=strdup(d->protocol); if (d->server) st->server=strdup(d->server); st->port=d->port; if (d->path) st->path=strdup(d->path); if (d->userName) st->userName=strdup(d->userName); if (d->password) st->password=strdup(d->password); if (d->vars) { GWEN_DB_Group_free(st->vars); st->vars=GWEN_DB_Group_dup(d->vars); } if (d->url) st->url=strdup(d->url); return st; } int GWEN_Url_toDb(const GWEN_URL *st, GWEN_DB_NODE *db) { assert(st); assert(db); if (st->protocol) if (GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "protocol", st->protocol)) return -1; if (st->server) if (GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "server", st->server)) return -1; if (GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "port", st->port)) return -1; if (st->path) if (GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "path", st->path)) return -1; if (st->userName) if (GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "userName", st->userName)) return -1; if (st->password) if (GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "password", st->password)) return -1; if (st->vars) if (GWEN_DB_AddGroupChildren(st->vars, GWEN_DB_GetGroup(db, GWEN_DB_FLAGS_DEFAULT, "vars"))) return -1; if (st->url) if (GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "url", st->url)) return -1; return 0; } int GWEN_Url_ReadDb(GWEN_URL *st, GWEN_DB_NODE *db) { assert(st); assert(db); GWEN_Url_SetProtocol(st, GWEN_DB_GetCharValue(db, "protocol", 0, 0)); GWEN_Url_SetServer(st, GWEN_DB_GetCharValue(db, "server", 0, 0)); GWEN_Url_SetPort(st, GWEN_DB_GetIntValue(db, "port", 0, 0)); GWEN_Url_SetPath(st, GWEN_DB_GetCharValue(db, "path", 0, 0)); GWEN_Url_SetUserName(st, GWEN_DB_GetCharValue(db, "userName", 0, 0)); GWEN_Url_SetPassword(st, GWEN_DB_GetCharValue(db, "password", 0, 0)); if (1) { /* for local vars */ GWEN_DB_NODE *dbT; dbT=GWEN_DB_GetGroup(db, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "vars"); if (dbT) { if (st->vars) GWEN_DB_Group_free(st->vars); st->vars=GWEN_DB_Group_dup(dbT); } } GWEN_Url_SetUrl(st, GWEN_DB_GetCharValue(db, "url", 0, 0)); return 0; } GWEN_URL *GWEN_Url_fromDb(GWEN_DB_NODE *db) { GWEN_URL *st; assert(db); st=GWEN_Url_new(); GWEN_Url_ReadDb(st, db); st->_modified=0; return st; } const char *GWEN_Url_GetProtocol(const GWEN_URL *st) { assert(st); return st->protocol; } void GWEN_Url_SetProtocol(GWEN_URL *st, const char *d) { assert(st); if (st->protocol) free(st->protocol); if (d && *d) st->protocol=strdup(d); else st->protocol=0; st->_modified=1; } const char *GWEN_Url_GetServer(const GWEN_URL *st) { assert(st); return st->server; } void GWEN_Url_SetServer(GWEN_URL *st, const char *d) { assert(st); if (st->server) free(st->server); if (d && *d) st->server=strdup(d); else st->server=0; st->_modified=1; } int GWEN_Url_GetPort(const GWEN_URL *st) { assert(st); return st->port; } void GWEN_Url_SetPort(GWEN_URL *st, int d) { assert(st); st->port=d; st->_modified=1; } const char *GWEN_Url_GetPath(const GWEN_URL *st) { assert(st); return st->path; } void GWEN_Url_SetPath(GWEN_URL *st, const char *d) { assert(st); if (st->path) free(st->path); if (d && *d) st->path=strdup(d); else st->path=0; st->_modified=1; } const char *GWEN_Url_GetUserName(const GWEN_URL *st) { assert(st); return st->userName; } void GWEN_Url_SetUserName(GWEN_URL *st, const char *d) { assert(st); if (st->userName) free(st->userName); if (d && *d) st->userName=strdup(d); else st->userName=0; st->_modified=1; } const char *GWEN_Url_GetPassword(const GWEN_URL *st) { assert(st); return st->password; } void GWEN_Url_SetPassword(GWEN_URL *st, const char *d) { assert(st); if (st->password) free(st->password); if (d && *d) st->password=strdup(d); else st->password=0; st->_modified=1; } GWEN_DB_NODE *GWEN_Url_GetVars(const GWEN_URL *st) { assert(st); return st->vars; } void GWEN_Url_SetVars(GWEN_URL *st, GWEN_DB_NODE *d) { assert(st); if (st->vars) GWEN_DB_Group_free(st->vars); if (d) st->vars=GWEN_DB_Group_dup(d); else st->vars=0; st->_modified=1; } const char *GWEN_Url_GetUrl(const GWEN_URL *st) { assert(st); return st->url; } void GWEN_Url_SetUrl(GWEN_URL *st, const char *d) { assert(st); if (st->url) free(st->url); if (d && *d) st->url=strdup(d); else st->url=0; st->_modified=1; } int GWEN_Url_IsModified(const GWEN_URL *st) { assert(st); return st->_modified; } void GWEN_Url_SetModified(GWEN_URL *st, int i) { assert(st); st->_modified=i; } void GWEN_Url_Attach(GWEN_URL *st) { assert(st); st->_usage++; } GWEN_URL *GWEN_Url_List2__freeAll_cb(GWEN_URL *st, GWEN_UNUSED void *user_data) { GWEN_Url_free(st); return 0; } void GWEN_Url_List2_freeAll(GWEN_URL_LIST2 *stl) { if (stl) { GWEN_Url_List2_ForEach(stl, GWEN_Url_List2__freeAll_cb, 0); GWEN_Url_List2_free(stl); } } GWEN_URL_LIST *GWEN_Url_List_dup(const GWEN_URL_LIST *stl) { if (stl) { GWEN_URL_LIST *nl; GWEN_URL *e; nl=GWEN_Url_List_new(); e=GWEN_Url_List_First(stl); while (e) { GWEN_URL *ne; ne=GWEN_Url_dup(e); assert(ne); GWEN_Url_List_Add(ne, nl); e=GWEN_Url_List_Next(e); } /* while (e) */ return nl; } else return 0; } gwenhywfar-5.12.1/src/parser/db_p.h0000644000175000017500000001156513527501306014054 00000000000000/*************************************************************************** begin : Tue Sep 09 2003 copyright : (C) 2003-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_DB_P_H #define GWENHYWFAR_DB_P_H #include #include #include GWEN_LIST_FUNCTION_DEFS(GWEN_DB_NODE, GWEN_DB_Node) typedef union GWEN_DB_NODE_VALUE_UNION GWEN_DB_NODE_VALUE_UNION; union GWEN_DB_NODE_VALUE_UNION { char *dataName; char *dataChar; void *dataBin; int dataInt; void *dataPtr; }; struct GWEN_DB_NODE { GWEN_LIST_ELEMENT(GWEN_DB_NODE) GWEN_DB_NODE *parent; GWEN_DB_NODE_LIST *children; GWEN_DB_NODE_TYPE typ; uint32_t nodeFlags; GWEN_DB_NODE_VALUE_UNION data; uint32_t dataSize; }; static GWEN_DB_NODE *GWEN_DB_Node_new(GWEN_DB_NODE_TYPE t); static void GWEN_DB_Node_free(GWEN_DB_NODE *n); static GWEN_DB_NODE *GWEN_DB_ValueBin_new(const void *data, unsigned int datasize); static GWEN_DB_NODE *GWEN_DB_ValueInt_new(int data); static GWEN_DB_NODE *GWEN_DB_ValueChar_new(const char *data); static GWEN_DB_NODE *GWEN_DB_ValueChar_newFromInt(int v); static GWEN_DB_NODE *GWEN_DB_ValuePtr_new(void *data); static GWEN_DB_NODE *GWEN_DB_Var_new(const char *name); static GWEN_DB_NODE *GWEN_DB_Node_dup(const GWEN_DB_NODE *n); static void GWEN_DB_Node_Append(GWEN_DB_NODE *parent, GWEN_DB_NODE *n); static void GWEN_DB_Node_Insert(GWEN_DB_NODE *parent, GWEN_DB_NODE *n); static void GWEN_DB_Node_Unlink(GWEN_DB_NODE *n); /** * Used with GWEN_Path */ static void *GWEN_DB_HandlePath(const char *entry, void *data, int idx, uint32_t flags); static GWEN_DB_NODE *GWEN_DB_FindGroup(GWEN_DB_NODE *n, const char *name, int idx); static GWEN_DB_NODE *GWEN_DB_FindVar(GWEN_DB_NODE *n, const char *name, int idx); static GWEN_DB_NODE *GWEN_DB_GetNode(GWEN_DB_NODE *n, const char *path, uint32_t flags); static GWEN_DB_NODE *GWEN_DB_GetValue(GWEN_DB_NODE *n, const char *path, int idx); static void GWEN_DB_ClearNode(GWEN_DB_NODE *n); static void *GWEN_DB_count_cb(GWEN_DB_NODE *node, void *user_data); static void GWEN_DB_Node_Append_UnDirty(GWEN_DB_NODE *parent, GWEN_DB_NODE *n); static void GWEN_DB_Node_InsertUnDirty(GWEN_DB_NODE *parent, GWEN_DB_NODE *n); static void GWEN_DB_Node_Unlink_UnDirty(GWEN_DB_NODE *n); static int GWEN_DB__ReadValues(GWEN_DB_NODE *n, uint32_t dbflags, const char *typeName, const char *varName, uint8_t *p); static int GWEN_DB_WriteGroupToIoLayer(GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags, int insert); static int GWEN_DB_EscapeToBufferTolerant(const char *src, GWEN_BUFFER *buf); static int GWEN_DB_UnescapeToBufferTolerant(const char *src, GWEN_BUFFER *buf); #endif gwenhywfar-5.12.1/src/parser/tag16-t.h0000664000175000017500000000126214477355125014341 00000000000000/*************************************************************************** begin : Sun Jun 13 2004 copyright : (C) 2023 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWENHYWFAR_TAG16_T_H #define GWENHYWFAR_TAG16_T_H #include #include /** * Internal tests for GWEN_TAG16. */ GWENHYWFAR_API int GWEN_Tag16_AddTests(GWEN_TEST_MODULE *mod); /*@}*/ #endif gwenhywfar-5.12.1/src/parser/json_dump.c0000664000175000017500000000606614460564441015151 00000000000000/*************************************************************************** copyright : (C) 2023 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "./json_p.h" #include "./json_dump.h" #include #include #include #include void GWEN_JsonElement_DumpToBuffer(const GWEN_JSON_ELEM *jeRoot, int indent, GWEN_BUFFER *buf) { const GWEN_JSON_ELEM *je; const char *s; GWEN_Buffer_FillWithBytes(buf, ' ', indent); s=GWEN_JsonElement_GetData(jeRoot); switch(GWEN_JsonElement_GetType(jeRoot)) { case GWEN_JSON_ELEMTYPE_KEY: GWEN_Buffer_AppendArgs(buf, "type=KEY, ..... data=%s", s?s:""); break; case GWEN_JSON_ELEMTYPE_NULL: GWEN_Buffer_AppendString(buf, "type=NULL"); break; case GWEN_JSON_ELEMTYPE_BOOL: GWEN_Buffer_AppendArgs(buf, "type=BOOL, .... data=%s", s?s:""); break; case GWEN_JSON_ELEMTYPE_NUM: GWEN_Buffer_AppendArgs(buf, "type=NUM, ..... data=%s", s?s:""); break; case GWEN_JSON_ELEMTYPE_STRING: GWEN_Buffer_AppendArgs(buf, "type=STRING, .. data=%s", s?s:""); break; case GWEN_JSON_ELEMTYPE_ARRAY: GWEN_Buffer_AppendString(buf, "type=ARRAY"); break; case GWEN_JSON_ELEMTYPE_OBJECT: GWEN_Buffer_AppendString(buf, "type=OBJECT"); break; default: GWEN_Buffer_AppendArgs(buf, "type=<%d>, data=%s", GWEN_JsonElement_GetType(jeRoot), s?s:""); break; } GWEN_Buffer_AppendString(buf, "\n"); je=GWEN_JsonElement_Tree2_GetFirstChild(jeRoot); while(je) { GWEN_JsonElement_DumpToBuffer(je, indent+2, buf); je=GWEN_JsonElement_Tree2_GetNext(je); } } gwenhywfar-5.12.1/src/parser/xml_l.h0000666000175000017500000000541113552157216014265 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_XML_L_H #define GWENHYWFAR_XML_L_H #include #include /** The type of a property of a tag (in XML notation this would be called the attribute of an element). */ typedef struct GWEN__XMLPROPERTY GWEN_XMLPROPERTY; GWEN_XMLPROPERTY *GWEN_XMLNode_GetFirstProperty(const GWEN_XMLNODE *n); GWEN_XMLPROPERTY *GWEN_XMLNode_GetNextProperty(const GWEN_XMLNODE *n, const GWEN_XMLPROPERTY *pr); const char *GWEN_XMLProperty_GetName(const GWEN_XMLPROPERTY *pr); const char *GWEN_XMLProperty_GetValue(const GWEN_XMLPROPERTY *pr); int GWEN_XML_AddNameSpace(GWEN_STRINGLIST2 *sl, const char *prefix, const char *name); const char *GWEN_XML_FindNameSpaceByPrefix(GWEN_STRINGLIST2 *sl, const char *s); const char *GWEN_XML_FindNameSpaceByName(GWEN_STRINGLIST2 *sl, const char *s); const char *GWEN_XML_FindNameSpace(GWEN_STRINGLIST2 *sl, const char *prefix, const char *name); #endif gwenhywfar-5.12.1/src/parser/xml2db.c0000666000175000017500000000523313702435660014336 00000000000000/*************************************************************************** begin : Sun Dec 16 2018 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xml2db.h" #include #include #include #include #include #include int GWEN_Xml2Db(GWEN_XMLNODE *xmlNodeDocument, GWEN_XMLNODE *xmlNodeSchema, GWEN_DB_NODE *dbDestination) { GWEN_XMLCOMMANDER *cmd; int rv; cmd=GWEN_XmlCommanderGwenXml_toDb_new(xmlNodeDocument, dbDestination); rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNodeSchema); GWEN_XmlCommander_free(cmd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int GWEN_XmlFromDb(GWEN_XMLNODE *xmlNodeDestination, GWEN_XMLNODE *xmlNodeSchema, GWEN_DB_NODE *dbSource) { GWEN_XMLCOMMANDER *cmd; int rv; cmd=GWEN_XmlCommanderGwenXml_fromDb_new(xmlNodeDestination, dbSource); rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNodeSchema); GWEN_XmlCommander_free(cmd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } gwenhywfar-5.12.1/src/parser/db.h0000666000175000017500000012054613642701411013536 00000000000000/*************************************************************************** begin : Tue Sep 09 2003 copyright : (C) 2003-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /** @file db.h */ #ifndef GWENHYWFAR_DB_H #define GWENHYWFAR_DB_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** @defgroup MOD_DB Database * @ingroup MOD_PARSER * * @brief This group contains the definition of a GWEN_DB database. * * A GWEN_DB database consists of a tree of @ref GWEN_DB_NODE entries. * Such a @ref GWEN_DB_NODE node can either be a group node, or a * variable node, or a value node. Usually an application programmer * will only get in touch with group nodes. The application programmer * can iterate through the group nodes with GWEN_DB_GetGroup(), * GWEN_DB_Groups_foreach(), and can retrieve variable values with * GWEN_DB_GetIntValue(), GWEN_DB_GetCharValue() and so on. * *

* The following graph shows the internal structure of a GWEN_DB:
* @image html db2.png "Internal structure of a GWEN_DB" *
* As you can see the GWEN_DB consists of multiple units called NODE. Every * node has a pointer to: *

    *
  • its parent
  • *
  • its first child (only the first)
  • *
  • its successor (but not its predecessor!) *
* Such a node can be either of the following: *
    *
  • a group containing other groups and variables
  • *
  • a variable containing values (and values only)
  • *
  • a value containing its value data
  • *
*

* * Each group has a name. Depending on the GWEN_DB_FLAGS given when * reading a GWEN_DB from a file or creating it, it may very well be * possible to have multiple groups with the same name as children of * the same root node. Again: Child group nodes with the same name may * very well exist. This also applies to variable nodes. * * For the interested reader, we again explain the difference of the * three kinds of nodes. Depending on either of these cases, you can * *
    *
  1. Iterate through groups or get a variable with * e.g. GWEN_DB_GetNextGroup(), GWEN_DB_GetNextVar() *
  2. Get the type of a variable with e.g. GWEN_DB_GetVariableType() * -- the value of a variable is retrieved by the shortcut functions * explained below. *
  3. Get the type of a value with GWEN_DB_GetValueType(). Again the * value itself is retrieved with the shortcut functions below. *
* * To retrieve or set the value of such a variable, the following * "shortcut" functions for all three supported typed exist: * GWEN_DB_GetIntValue(), GWEN_DB_GetCharValue(), * GWEN_DB_GetBinValue(). These functions only accept a group and a "path" * to the desired variable. * */ /*@{*/ /** maximum size of a text line when reading/writing from/to streams */ #define GWEN_DB_LINE_MAXSIZE 1024 /** @name DB Flags * *

* Please note that the setter functions also take the flags from * the module @ref MOD_PATH (e.g. @ref GWEN_PATH_FLAGS_PATHMUSTEXIST) * into account. So you most likely need to specify * them, too. *

*

* However, for your conveniance there is a default flag value which suffices * in most cases (@ref GWEN_DB_FLAGS_DEFAULT). *

*/ /*@{*/ /** when reading a DB allow for empty streams (e.g. empty file) */ #define GWEN_DB_FLAGS_ALLOW_EMPTY_STREAM 0x00008000 /** Overwrite existing values when assigning a new value to a variable */ #define GWEN_DB_FLAGS_OVERWRITE_VARS 0x00010000 /** Overwrite existing groups when calling @ref GWEN_DB_GetGroup() */ #define GWEN_DB_FLAGS_OVERWRITE_GROUPS 0x00020000 /** quote variable names when writing them to a stream */ #define GWEN_DB_FLAGS_QUOTE_VARNAMES 0x00040000 /** quote values when writing them to a stream */ #define GWEN_DB_FLAGS_QUOTE_VALUES 0x00080000 /** allows writing of subgroups when writing to a stream */ #define GWEN_DB_FLAGS_WRITE_SUBGROUPS 0x00100000 /** adds some comments when writing to a stream */ #define GWEN_DB_FLAGS_DETAILED_GROUPS 0x00200000 /** indents text according to the current path depth when writing to a * stream to improve the readability of the created file */ #define GWEN_DB_FLAGS_INDEND 0x00400000 /** writes a newline to the stream after writing a group to improve * the readability of the created file */ #define GWEN_DB_FLAGS_ADD_GROUP_NEWLINES 0x00800000 /** uses a colon (":") instead of an equation mark when reading/writing * variable definitions */ #define GWEN_DB_FLAGS_USE_COLON 0x01000000 /** stops reading from a stream at empty lines */ #define GWEN_DB_FLAGS_UNTIL_EMPTY_LINE 0x02000000 /** normally the type of a variable is written to the stream, too. * This flag changes this behaviour */ #define GWEN_DB_FLAGS_OMIT_TYPES 0x04000000 /** appends data to an existing file instead of overwriting it */ #define GWEN_DB_FLAGS_APPEND_FILE 0x08000000 /** Char values are escaped when writing them to a file. */ #define GWEN_DB_FLAGS_ESCAPE_CHARVALUES 0x10000000 /** Char values are unescaped when reading them from a file (uses the same * bit @ref GWEN_DB_FLAGS_ESCAPE_CHARVALUES uses) */ #define GWEN_DB_FLAGS_UNESCAPE_CHARVALUES 0x10000000 /** locks a file before reading from or writing to it * This is used by @ref GWEN_DB_ReadFile and @ref GWEN_DB_WriteFile */ #define GWEN_DB_FLAGS_LOCKFILE 0x20000000 /** * When setting a value or getting a group insert newly created * values/groups rather than appending them.*/ #define GWEN_DB_FLAGS_INSERT 0x40000000 /** * When writing a DB use DOS line termination (e.g. CR/LF) instead if unix mode (LF only) */ #define GWEN_DB_FLAGS_DOSMODE 0x80000000 /** These are the default flags which you use in most cases */ #define GWEN_DB_FLAGS_DEFAULT \ (\ GWEN_DB_FLAGS_QUOTE_VALUES | \ GWEN_DB_FLAGS_WRITE_SUBGROUPS | \ GWEN_DB_FLAGS_DETAILED_GROUPS | \ GWEN_DB_FLAGS_INDEND | \ GWEN_DB_FLAGS_ADD_GROUP_NEWLINES | \ GWEN_DB_FLAGS_ESCAPE_CHARVALUES | \ GWEN_DB_FLAGS_UNESCAPE_CHARVALUES\ ) /** same like @ref GWEN_DB_FLAGS_DEFAULT except that the produced file * (when writing to a stream) is more compact (but less readable)*/ #define GWEN_DB_FLAGS_COMPACT \ (\ GWEN_DB_FLAGS_QUOTE_VALUES | \ GWEN_DB_FLAGS_WRITE_SUBGROUPS | \ GWEN_DB_FLAGS_ESCAPE_CHARVALUES | \ GWEN_DB_FLAGS_UNESCAPE_CHARVALUES\ ) /** These flags can be used to read a DB from a HTTP header. It uses a * colon instead of the equation mark with variable definitions and stops * when encountering an empty line.*/ #define GWEN_DB_FLAGS_HTTP \ (\ GWEN_DB_FLAGS_USE_COLON |\ GWEN_DB_FLAGS_UNTIL_EMPTY_LINE |\ GWEN_DB_FLAGS_OMIT_TYPES | \ GWEN_DB_FLAGS_DOSMODE \ ) /*@}*/ /** @name Node Flags */ /*@{*/ /** is set then this node has been altered */ #define GWEN_DB_NODE_FLAGS_DIRTY 0x00000001 /** variable is volatile (will not be written) */ #define GWEN_DB_NODE_FLAGS_VOLATILE 0x00000002 /** this is only valid for groups. It determines whether subgroups will * inherit the hash mechanism set in the root node. */ #define GWEN_DB_NODE_FLAGS_INHERIT_HASH_MECHANISM 0x00000004 /** node has to be disposed of safely (i.e. it will be overridden before freeing it) */ #define GWEN_DB_NODE_FLAGS_SAFE 0x00000008 /*@}*/ #define GWEN_DB_DEFAULT_LOCK_TIMEOUT 1000 /** * This is the type used to store a DB. Its contents are explicitly NOT * part of the API. * * A description of what can be done with this type can be found in * @ref db.h */ typedef struct GWEN_DB_NODE GWEN_DB_NODE; /** * This specifies the type of a value stored in the DB. */ typedef enum { /** type unknown */ GWEN_DB_NodeType_Unknown=-1, /** group */ GWEN_DB_NodeType_Group=0, /** variable */ GWEN_DB_NodeType_Var, /** simple, null terminated C-string */ GWEN_DB_NodeType_ValueChar, /** integer */ GWEN_DB_NodeType_ValueInt, /** binary, user defined data */ GWEN_DB_NodeType_ValueBin, /** pointer , will not be stored or read to/from files */ GWEN_DB_NodeType_ValuePtr, /** last value type */ GWEN_DB_NodeType_ValueLast } GWEN_DB_NODE_TYPE; /** @name Constructing, Destructing, Copying * */ /*@{*/ /** * Creates a new (empty) group with the given name. I.e. this is the * constructor. When finished using this group, you should free it * using @ref GWEN_DB_Group_free() in order to avoid memory leaks. * @param name name of the group to create */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_Group_new(const char *name); /** * Frees a DB group. I.e. this is the destructor. This is needed to * avoid memory leaks. * @param n db node */ GWENHYWFAR_API void GWEN_DB_Group_free(GWEN_DB_NODE *n); /** * Creates a deep copy of the given node. This copy will then be owned * by the caller and MUST be freed after using it by calling @ref * GWEN_DB_Group_free(). * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_Group_dup(const GWEN_DB_NODE *n); /*@}*/ /** @name Iterating Through Groups * */ /*@{*/ /** * Returns the first group node below the given one. * * If there is no group node then NULL is returned. This can either * mean that this node does not have any children or the only * children are variables instead of groups. * * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetFirstGroup(GWEN_DB_NODE *n); /** * Returns the next group node following the given one, which has the * same parent node. * * This function works absolutely independently of the group nodes' * names -- the returned node may or may not have the same name as the * specified node. The only guarantee is that the returned node will * be a group node. * * If there is no group node then NULL is returned. This can either * mean that the parent node does not have any further * children, or that the other children are variables instead * of groups. * * @note This is one of the few functions where the returned node is @e not * the child of the specified node, but instead it is the next node * with the same parent node. In other words, this function is an * exception. In most other functions the returned node is a child of * the specified node. * * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetNextGroup(GWEN_DB_NODE *n); /** * Returns the first group node below the given one by name. * * If there is no matching group node then NULL is returned. This can either * mean that this node does not have any children or the only * children are variables instead of groups or their is no group of the * given name. * * @param n db node * @param name name to look for (joker and wildcards allowed) */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_FindFirstGroup(GWEN_DB_NODE *n, const char *name); /** * Returns the next group node following the given one, which has the * same parent node, by name. * * If there is no matching group node then NULL is returned. This can either * mean that the parent node does not have any further * children, or that the other children are variables instead * of groups or that there is no group with the given name. * * @note This is one of the few functions where the returned node is @e not * the child of the specified node, but instead it is the next node * with the same parent node. In other words, this function is an * exception. In most other functions the returned node is a child of * the specified node. * * @param n db node * @param name name to look for (joker and wildcards allowed) */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_FindNextGroup(GWEN_DB_NODE *n, const char *name); /** Callback function type for GWEN_DB_Groups_Foreach(), * GWEN_DB_Variables_Foreach(), and GWEN_DB_Values_Foreach(). * * @param node The current node element * * @param user_data The arbitrary data passed to the foreach function. * * @return NULL if the iteration should continue, or non-NULL if the * iteration should stop and that value be returned. */ typedef void *(*GWEN_DB_NODES_CB)(GWEN_DB_NODE *node, void *user_data); /** Iterates through all group nodes that are @e direct children * of the given node, calling the callback function 'func' on each * group node. Traversal will stop when 'func' returns a non-NULL * value, and the routine will return with that value. Otherwise the * routine will return NULL. * * If no nodes that are groups are found as children, then * this function will simply do nothing. * * @param node The group node whose children shall be iterated through. * @param func The function to be called with each group node. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. * @author Christian Stimming */ GWENHYWFAR_API void *GWEN_DB_Groups_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data); /** Returns the number of group nodes that are @e direct children of * the given node. In other words, this is the number of group nodes * that will be reached in the GWEN_DB_Groups_foreach() function. */ GWENHYWFAR_API unsigned int GWEN_DB_Groups_Count(const GWEN_DB_NODE *node); /** * Returns the parent group of the given node. */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetParentGroup(GWEN_DB_NODE *n); /*@}*/ /** @name Variable Getter and Setter * * These getter functions check for the existence of the given variable and * return the value specified by an index. * Under the following circumstances the also given default value will be * returned: *
    *
  • the variable does not exist
  • *
  • the variable exists but has no values (should not occur)
  • *
  • the variable exists but the given value index is out of range (e.g. * specifying index 1 with a variable that has only one value)
  • *
  • a string value is expected but the variable is not of that type. * However, if you want an integer value but the variable only has a char * value then the getter functions try to convert the char to an integer. * Other conversions do not take place.
  • *
* * The setter functions either replace an existing variable, create a missing * variable, add a value or return an error if the variable does not exist * (see description of the flags). * All setter functions make deep copies of the given values, so you may * free the params after calling the setter function. * * All getter functions return a const pointer to the variable's retrieved * value. * All setter functions return Zero if ok and Nonzero on error. * * This module knows about the following types (see @ref GWEN_DB_VALUETYPE): *
    *
  • char (simple null terminated C strings)
  • *
  • int (integer values)
  • *
  • bin (binary, user specified data)
  • *
* * @note The value returned by a getter function is only valid as long as the * corresponding variable (node) exists.
* So if you retrieve the value of a variable and delete the variable (or even * the whole DB) afterwards the pointer becomes invalid and using it will most * likely crash your program.
* If you want to use such a value even after the corresponding variable * has been deleted you need to make a copy. * */ /*@{*/ /** * Returns the variable's retrieved value. * @param n db node * @param path path and name of the variable * @param idx index number of the value to return * @param defVal default value to return in case there is no real value */ GWENHYWFAR_API const char *GWEN_DB_GetCharValue(GWEN_DB_NODE *n, const char *path, int idx, const char *defVal); /** * @return 0 on success, nonzero on error * @param n db node * @param flags see @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others which * can all be OR-combined to form the flags to use. * @param path path and name of the variable * @param val The string value that is copied into the DB */ GWENHYWFAR_API int GWEN_DB_SetCharValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, const char *val); /** * @return 0 on success, nonzero on error * @param n db node * @param flags see @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others which * can all be OR-combined to form the flags to use. * @param path path and name of the variable * @param val The integer value to be stored as string value in the DB */ GWENHYWFAR_API int GWEN_DB_SetCharValueFromInt(GWEN_DB_NODE *n, uint32_t flags, const char *path, int val); /** * Adds the given char value to the given variable if it not already exists * (depending on the arguments senseCase and check). * @return 0 on success, nonzero on error * @param n db node * @param path path and name of the variable * @param val The string value that is copied into the DB * @param senseCase if 0 then the case of the value is ignored while checking * @param check if 1 then the variable will be checked for this value */ GWENHYWFAR_API int GWEN_DB_AddCharValue(GWEN_DB_NODE *n, const char *path, const char *val, int senseCase, int check); /** * Removes the given char value from the given variable if it exists * (depending on the arguments senseCase and check). * @return 0 on success, nonzero on error * @param n db node * @param path path and name of the variable * @param val The string value to be removed * @param senseCase if 0 then the case of the value is ignored while checking */ GWENHYWFAR_API int GWEN_DB_RemoveCharValue(GWEN_DB_NODE *n, const char *path, const char *val, int senseCase); /** * Returns the variable's retrieved value. * @param n db node * @param path path and name of the variable * @param idx index number of the value to return * @param defVal default value to return in case there is no real value */ GWENHYWFAR_API int GWEN_DB_GetIntValue(GWEN_DB_NODE *n, const char *path, int idx, int defVal); /** * @return 0 on success, nonzero on error * @param n db node * @param flags see @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others which * can all be OR-combined to form the flags to use. * @param path path and name of the variable * @param val new value */ GWENHYWFAR_API int GWEN_DB_SetIntValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, int val); /** * Returns the variable's retrieved value. The size of the binary * data is written into the int pointer argument returnValueSize. * @param n db node * @param path path and name of the variable * @param idx index number of the value to return * @param defVal default value to return in case there is no real value * @param defValSize size of the default value * @param returnValueSize pointer to a variable to receive the length * of the data returned */ GWENHYWFAR_API const void *GWEN_DB_GetBinValue(GWEN_DB_NODE *n, const char *path, int idx, const void *defVal, unsigned int defValSize, unsigned int *returnValueSize); /** * @param n db node * @param path path and name of the variable * @param flags see @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others which * can all be OR-combined to form the flags to use. * @param val The binary data that is copied into the DB. * @param valSize The number of bytes in the binary data value. * * @return 0 on success, nonzero on error */ GWENHYWFAR_API int GWEN_DB_SetBinValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, const void *val, unsigned int valSize); /** * Returns the variable's retrieved value. * @param n db node * @param path path and name of the variable * @param idx index number of the value to return * @param defVal default value to return in case there is no real value */ GWENHYWFAR_API void *GWEN_DB_GetPtrValue(GWEN_DB_NODE *n, const char *path, int idx, void *defVal); /** * @param n db node * @param path path and name of the variable * @param flags see @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others which * can all be OR-combined to form the flags to use. * @param val The pointer that is stored within the DB. * * @return 0 on success, nonzero on error */ GWENHYWFAR_API int GWEN_DB_SetPtrValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, void *val); /** * @return 0 if okay, error code on error (GWEN_ERROR_NO_DATA if the variable doesn't exist or has no value) * @param n db node * @param path path and name of the variable * @param index number of value to read (if there are multiple values in the variable, 0 being the first) * @param dstBuf buffer to write the value into * * @return 0 on success, nonzero on error */ GWENHYWFAR_API int GWEN_DB_WriteVarValueToBuffer(GWEN_DB_NODE *n, const char *path, int index, GWEN_BUFFER *dstBuf); /*@}*/ /** @name Group Handling * */ /*@{*/ /** * This function either creates a new group, returns an existing one or * returns an error if there is no group but the caller wanted one (depending * on the flags given). * @param n db node * @param flags see @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others which * can all be OR-combined to form the flags to use. * @param path path and name of the group to be created/located */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetGroup(GWEN_DB_NODE *n, uint32_t flags, const char *path); /** * Returns the name of the given group. */ GWENHYWFAR_API const char *GWEN_DB_GroupName(GWEN_DB_NODE *n); /** * Renames the given group. * @param n db node * @param newname new name for the group */ GWENHYWFAR_API void GWEN_DB_GroupRename(GWEN_DB_NODE *n, const char *newname); /** * Adds the given group node as a new child of the given parent group node. * * The group name has no influence on what will happen in this * function. In other words, if the parent group already has a child * group with the same name as 'node', then after this function two * child group nodes with the same name will exist. * * @note This function takes over the ownership of the new group, so * you MUST NOT free it afterwards. * * @param parent Some group node that will be the parent of the added node * @param node Group node to add */ GWENHYWFAR_API int GWEN_DB_AddGroup(GWEN_DB_NODE *parent, GWEN_DB_NODE *node); /** * Adds the given group node as the new first child of the given parent group * node. * * The group name has no influence on what will happen in this * function. In other words, if the parent group already has a child * group with the same name as 'node', then after this function two * child group nodes with the same name will exist. * * @note This function takes over the ownership of the new group, so * you MUST NOT free it afterwards. * * @param parent Some group node that will be the parent of the added node * @param node Group node to add */ GWENHYWFAR_API int GWEN_DB_InsertGroup(GWEN_DB_NODE *parent, GWEN_DB_NODE *node); /** * This function adds all children of the second node as new children to * the first given one. * * @note This function does NOT take over ownership of the new * group. The caller is still the owner of the given group. * @param n db node * @param nn node whose children are to be added (makes deep copies) */ GWENHYWFAR_API int GWEN_DB_AddGroupChildren(GWEN_DB_NODE *n, GWEN_DB_NODE *nn); /** * Unlinks a group (and thereby all its children) from its parent and * brothers. * * This function DOES NOT free the group, it just unlinks it. You can then use * it with e.g. @ref GWEN_DB_AddGroup or other functions to relink it at any * other position of even in other DBs. * @param n db node */ GWENHYWFAR_API void GWEN_DB_UnlinkGroup(GWEN_DB_NODE *n); /** * Locates and removes the group of the given name. * @return 0 on success, nonzero on error * @param n db node * @param path path to the group to delete */ GWENHYWFAR_API int GWEN_DB_DeleteGroup(GWEN_DB_NODE *n, const char *path); /** * Frees all children of the given node thereby clearing it. * @return 0 on success, nonzero on error * @param n db node * @param path path to the group under the given node to clear * (if 0 then clear the given node) */ GWENHYWFAR_API int GWEN_DB_ClearGroup(GWEN_DB_NODE *n, const char *path); /** Predicate: Returns nonzero (TRUE) or zero (FALSE) if the given * NODE is a Group or not. Usually these group nodes are the only * nodes that the application gets in touch with. * * @param n db node */ GWENHYWFAR_API int GWEN_DB_IsGroup(const GWEN_DB_NODE *n); /** * Returns the node flags for the given db node. * Please note that all modifications applied to a node will set the * dirty flag in the node itself and all its parents. * This allows to use this funcion here to check whether a DB has been * modified. * @return current node flags for this node (see * @ref GWEN_DB_NODE_FLAGS_DIRTY) * * @param n db node */ GWENHYWFAR_API uint32_t GWEN_DB_GetNodeFlags(const GWEN_DB_NODE *n); /** * Modifies the node flags for the given db node * @param n db node * @param flags flags to set (see @ref GWEN_DB_NODE_FLAGS_DIRTY) */ GWENHYWFAR_API void GWEN_DB_SetNodeFlags(GWEN_DB_NODE *n, uint32_t flags); /** * Modifies the flags of the given node and all its parents according * to the parameters given. * @param n db node * @param newflags new flags to set (see @ref GWEN_DB_NODE_FLAGS_DIRTY) * @param mask only those flags which are set in this mask are modified * according to newflags */ GWENHYWFAR_API void GWEN_DB_ModifyBranchFlagsUp(GWEN_DB_NODE *n, uint32_t newflags, uint32_t mask); /** * Modifies the flags of the given node and all its children according * to the parameters given. * @param n db node * @param newflags new flags to set (see @ref GWEN_DB_NODE_FLAGS_DIRTY) * @param mask only those flags which are set in this mask are modified * according to newflags */ GWENHYWFAR_API void GWEN_DB_ModifyBranchFlagsDown(GWEN_DB_NODE *n, uint32_t newflags, uint32_t mask); /*@}*/ /** @name Reading and Writing From/To IO Layers * * These functions read or write a DB from/to GWEN_IO_LAYER. * This allows to use any source or target supported by GWEN_IO_LAYER * for data storage (these are currently sockets, files and memory buffers). * The flags determine how to read/write the data (e.g. if sub-groups are * to be written etc). */ /*@{*/ GWENHYWFAR_API int GWEN_DB_ReadFromFastBuffer(GWEN_DB_NODE *n, GWEN_FAST_BUFFER *fb, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_ReadFromIo(GWEN_DB_NODE *n, GWEN_SYNCIO *sio, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_ReadFile(GWEN_DB_NODE *n, const char *fname, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_ReadFromString(GWEN_DB_NODE *n, const char *str, int len, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_WriteToFastBuffer(GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_WriteToIo(GWEN_DB_NODE *node, GWEN_SYNCIO *sio, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_WriteFile(GWEN_DB_NODE *n, const char *fname, uint32_t dbflags); GWENHYWFAR_API int GWEN_DB_WriteToBuffer(GWEN_DB_NODE *n, GWEN_BUFFER *buf, uint32_t dbflags); /** * Imports a file into a DB using a GWEN_DBIO importer. * @param n node to read into (becomes the root of the imported data) * @param fname name of the file to import * @param type GWEN_DBIO type * @param params parameters for the GWEN_DBIO importer (content depends on * the importer, may even be NULL for some types) * @param dbflags flags to use while importing (see * @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others) */ GWENHYWFAR_API int GWEN_DB_ReadFileAs(GWEN_DB_NODE *n, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags); /** * Exports a DB to a file using a GWEN_DBIO exporter. * @param n node to write * @param fname name of the file to export to * @param type GWEN_DBIO type * @param params parameters for the GWEN_DBIO exporter (content depends on * the exporter, may even be NULL for some types) * @param dbflags flags to use while exporting (see * @ref GWEN_DB_FLAGS_OVERWRITE_VARS and others) */ GWENHYWFAR_API int GWEN_DB_WriteFileAs(GWEN_DB_NODE *n, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags); /*@}*/ /** @name Iterating Through Variables and variable handling * */ /*@{*/ /** * Returns the first variable below the given group. * If there is no variable then NULL is returned. * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetFirstVar(GWEN_DB_NODE *n); /** * Returns the next variable node following the given one, which has * the same parent node. * * This function works absolutely independently of the variable nodes' * names -- the returned node may or may not have the same name as the * specified node. The only guarantee is that the returned node will * be a variable node. * * If there is no variable node then NULL is returned. This can either * mean that the parent node does not have any further children, or * that the other children are groups instead of variables. * * @note This is the only function where the returned node is @e not * the child of the specified node, but instead it is the next node * with the same parent node. In other words, this function is an * exception. In all other functions the returned node is a child of * the specified node. * * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetNextVar(GWEN_DB_NODE *n); /** * Returns the name of the variable specified by the given node. * @param n db node specifying a variable (not a group !) */ GWENHYWFAR_API const char *GWEN_DB_VariableName(GWEN_DB_NODE *n); GWENHYWFAR_API void GWEN_DB_VariableRename(GWEN_DB_NODE *n, const char *newname); /** Iterates through all variable nodes that are @e direct children * of the given node, calling the callback function 'func' on each * variable node. Traversal will stop when 'func' returns a non-NULL * value, and the routine will return with that value. Otherwise the * routine will return NULL. * * If no nodes that are variables are found as children, then * this function will simply do nothing. * * @param node The group node whose children shall be iterated through. * @param func The function to be called with each group node. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. * @author Christian Stimming */ GWENHYWFAR_API void *GWEN_DB_Variables_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data); /** Returns the number of variable nodes that are @e direct children * of the given node. In other words, this is the number of variable * nodes that will be reached in the GWEN_DB_Variables_Foreach() * function. */ GWENHYWFAR_API unsigned int GWEN_DB_Variables_Count(const GWEN_DB_NODE *node); /** * Returns the type of the first value of the given variable * @param n root node of the DB * @param p path of the variable to inspect */ GWENHYWFAR_API GWEN_DB_NODE_TYPE GWEN_DB_GetVariableType(GWEN_DB_NODE *n, const char *p); /** * Deletes the given variable by removing it and its values from the DB. * @param n root of the DB * @param path path to the variable to remove * @return Zero on success, nonzero on error */ GWENHYWFAR_API int GWEN_DB_DeleteVar(GWEN_DB_NODE *n, const char *path); /** * Checks whether the given variable exists. * @return Zero if variable not found, nonzero otherwise * @param n root of the DB * @param path path to the variable to check for */ GWENHYWFAR_API int GWEN_DB_VariableExists(GWEN_DB_NODE *n, const char *path); /** * Checks whether the given variable and value exists. * @return Zero if variable not found, nonzero otherwise * @param n root of the DB * @param path path to the variable to check for * @param idx index number of the variable's value to check for */ GWENHYWFAR_API int GWEN_DB_ValueExists(GWEN_DB_NODE *n, const char *path, unsigned int idx); /** Predicate: Returns nonzero (TRUE) or zero (FALSE) if the given * NODE is a Variable or not. Usually the Application does not get in * touch with such Nodes but only with nodes that are Groups. * * @param n db node */ GWENHYWFAR_API int GWEN_DB_IsVariable(const GWEN_DB_NODE *n); /** * Returns the first variable node below the given one by name. * * If there is no matching variable node then NULL is returned. This can * either mean that this node does not have any children or the only * children are groups/values instead of variables or their is no variable of * the given name. * * @param n db node * @param name name to look for (joker and wildcards allowed) */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_FindFirstVar(GWEN_DB_NODE *n, const char *name); /** * Returns the next variable node following the given one, which has the * same parent node, by name. * * If there is no matching variable node then NULL is returned. This can * either mean that this node does not have any children or the only * children are groups/values instead of variables or their is no variable of * the given name. * * @note This is one of the few functions where the returned node is @e not * the child of the specified node, but instead it is the next node * with the same parent node. In other words, this function is an * exception. In most other functions the returned node is a child of * the specified node. * * @param n db node * @param name name to look for (joker and wildcards allowed) */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_FindNextVar(GWEN_DB_NODE *n, const char *name); /*@}*/ /** @name Iterating Through Values and value handling * */ /*@{*/ /** * Returns the first value below the given variable. * If there is no value then NULL is returned. * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetFirstValue(GWEN_DB_NODE *n); /** * Returns the next value node following the given one, which has the * same parent node. * * If there is no value node then NULL is returned. This can either * mean that the parent node does not have any further children, or * that the other children aren't values. * * @note This is the only function where the returned node is @e not * the child of the specified node, but instead it is the next node * with the same parent node. In other words, this function is an * exception. In all other functions the returned node is a child of * the specified node. * * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE *GWEN_DB_GetNextValue(GWEN_DB_NODE *n); /** Iterates through all value nodes that are @e direct children * of the given node, calling the callback function 'func' on each * value node. Traversal will stop when 'func' returns a non-NULL * value, and the routine will return with that value. Otherwise the * routine will return NULL. * * If no nodes that are values are found as children, then * this function will simply do nothing. * * @param node The variable node whose children shall be iterated through. * @param func The function to be called with each group node. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. * @author Christian Stimming */ GWENHYWFAR_API void *GWEN_DB_Values_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data); /** Returns the number of value nodes that are @e direct children of * the given node. In other words, this is the number of value nodes * that will be reached in the GWEN_DB_Values_foreach() function. */ GWENHYWFAR_API unsigned int GWEN_DB_Values_Count(const GWEN_DB_NODE *node); /** * Returns the type of the given value. * @param n db node */ GWENHYWFAR_API GWEN_DB_NODE_TYPE GWEN_DB_GetValueType(GWEN_DB_NODE *n); GWENHYWFAR_API GWEN_DB_NODE_TYPE GWEN_DB_GetValueTypeByPath(GWEN_DB_NODE *n, const char *p, unsigned int i); /** * Returns the value data of the given value node. * If the given node is not a char-value node then 0 is returned. */ GWENHYWFAR_API const char *GWEN_DB_GetCharValueFromNode(const GWEN_DB_NODE *n); /** * Replaces the current value data of the given node by the new string. * @return 0 if ok, error code otherwise */ GWENHYWFAR_API int GWEN_DB_SetCharValueInNode(GWEN_DB_NODE *n, const char *s); GWENHYWFAR_API int GWEN_DB_GetIntValueFromNode(const GWEN_DB_NODE *n); GWENHYWFAR_API const void *GWEN_DB_GetBinValueFromNode(const GWEN_DB_NODE *n, unsigned int *size); /** Predicate: Returns nonzero (TRUE) or zero (FALSE) if the given * NODE is a Value or not. Usually the Application does not get in * touch with such Nodes but only with nodes that are Groups. * * @param n db node */ GWENHYWFAR_API int GWEN_DB_IsValue(const GWEN_DB_NODE *n); /*@}*/ /** @name Debugging * * These functions are for debugging purposes only. You should NOT consider * them part of the API. */ /*@{*/ /** * Dumps the content of the given DB to the given file (e.g. stderr). * @param n node to dump * @param insert number of blanks to insert at every line */ GWENHYWFAR_API void GWEN_DB_Dump(GWEN_DB_NODE *n, int insert); /*@}*/ /** @name Higher Level Utility Functions * * These functions make use of GWEN_DB groups. */ /*@{*/ /** * Read the given string and replace every variable in that string ( noted as "$(varname)") with the * value of the mentioned variable. */ GWENHYWFAR_API int GWEN_DB_ReplaceVars(GWEN_DB_NODE *db, const char *s, GWEN_BUFFER *dbuf); /*@}*/ /*@}*/ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/parser/dbio.c0000644000175000017500000003127713142134476014065 00000000000000/*************************************************************************** begin : Wed Mar 31 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "dbio_p.h" #include #include #include #include #include #include #include #include #include #include #include /* TODO: #include */ #include #include #include #include #include #include #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_FCNTL_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef OS_WIN32 # define DIRSEP "\\" # include #else # define DIRSEP "/" #endif GWEN_LIST_FUNCTIONS(GWEN_DBIO, GWEN_DBIO) GWEN_INHERIT_FUNCTIONS(GWEN_DBIO) GWEN_INHERIT(GWEN_PLUGIN, GWEN_DBIO_PLUGIN) int GWEN_DBIO_ModuleInit(void) { GWEN_PLUGIN_MANAGER *pm; int err; GWEN_STRINGLIST *sl; pm=GWEN_PluginManager_new("dbio", GWEN_PM_LIBNAME); err=GWEN_PluginManager_Register(pm); if (err) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not register DBIO plugin manager"); return err; } /* create plugin paths */ sl=GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR); if (sl) { GWEN_STRINGLISTENTRY *se; GWEN_BUFFER *pbuf; pbuf=GWEN_Buffer_new(0, 256, 0, 1); se=GWEN_StringList_FirstEntry(sl); while (se) { GWEN_Buffer_AppendString(pbuf, GWEN_StringListEntry_Data(se)); GWEN_Buffer_AppendString(pbuf, DIRSEP GWEN_DBIO_FOLDER); DBG_INFO(GWEN_LOGDOMAIN, "Adding plugin path [%s]", GWEN_Buffer_GetStart(pbuf)); GWEN_PluginManager_AddPath(pm, GWEN_PM_LIBNAME, GWEN_Buffer_GetStart(pbuf)); GWEN_Buffer_Reset(pbuf); se=GWEN_StringListEntry_Next(se); } GWEN_Buffer_free(pbuf); GWEN_StringList_free(sl); } return 0; } int GWEN_DBIO_ModuleFini(void) { GWEN_PLUGIN_MANAGER *pm; pm=GWEN_PluginManager_FindPluginManager("dbio"); if (pm) { int rv; rv=GWEN_PluginManager_Unregister(pm); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not unregister DBIO plugin manager (%d)", rv); return rv; } else GWEN_PluginManager_free(pm); } return 0; } GWEN_PLUGIN *GWEN_DBIO_Plugin_new(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName) { GWEN_PLUGIN *pl; GWEN_DBIO_PLUGIN *pldbio; pl=GWEN_Plugin_new(pm, name, fileName); GWEN_NEW_OBJECT(GWEN_DBIO_PLUGIN, pldbio); GWEN_INHERIT_SETDATA(GWEN_PLUGIN, GWEN_DBIO_PLUGIN, pl, pldbio, GWEN_DBIO_Plugin_FreeData); return pl; } void GWENHYWFAR_CB GWEN_DBIO_Plugin_FreeData(GWEN_UNUSED void *bp, void *p) { GWEN_DBIO_PLUGIN *pldbio; pldbio=(GWEN_DBIO_PLUGIN *)p; GWEN_FREE_OBJECT(pldbio); } GWEN_DBIO *GWEN_DBIO_Plugin_Factory(GWEN_PLUGIN *pl) { GWEN_DBIO_PLUGIN *pldbio; assert(pl); pldbio=GWEN_INHERIT_GETDATA(GWEN_PLUGIN, GWEN_DBIO_PLUGIN, pl); assert(pldbio); assert(pldbio->factoryFn); return pldbio->factoryFn(pl); } void GWEN_DBIO_Plugin_SetFactoryFn(GWEN_PLUGIN *pl, GWEN_DBIO_PLUGIN_FACTORYFN f) { GWEN_DBIO_PLUGIN *pldbio; assert(pl); pldbio=GWEN_INHERIT_GETDATA(GWEN_PLUGIN, GWEN_DBIO_PLUGIN, pl); assert(pldbio); pldbio->factoryFn=f; } GWEN_DBIO *GWEN_DBIO_new(const char *name, const char *descr) { GWEN_DBIO *dbio; assert(name); GWEN_NEW_OBJECT(GWEN_DBIO, dbio); GWEN_LIST_INIT(GWEN_DBIO, dbio); GWEN_INHERIT_INIT(GWEN_DBIO, dbio); dbio->name=strdup(name); if (descr) dbio->descr=strdup(descr); dbio->usage=1; return dbio; } void GWEN_DBIO_free(GWEN_DBIO *dbio) { if (dbio) { assert(dbio->usage); if (--(dbio->usage)==0) { GWEN_INHERIT_FINI(GWEN_DBIO, dbio); GWEN_LIST_FINI(GWEN_DBIO, dbio); free(dbio->name); free(dbio->descr); GWEN_FREE_OBJECT(dbio); } } } void GWEN_DBIO_Attach(GWEN_DBIO *dbio) { assert(dbio); dbio->usage++; } int GWEN_DBIO_Import(GWEN_DBIO *dbio, GWEN_SYNCIO *sio, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags) { assert(dbio); assert(sio); assert(db); if (GWEN_SyncIo_GetStatus(sio) != GWEN_SyncIo_Status_Connected) { DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_SYNCIO %s not connected; did you forget to call GWEN_SyncIo_Connect()?", GWEN_SyncIo_GetTypeName(sio)); return -1; } if (dbio->importFn) return dbio->importFn(dbio, sio, db, params, flags); else { DBG_INFO(GWEN_LOGDOMAIN, "No import function set"); return -1; } } int GWEN_DBIO_Export(GWEN_DBIO *dbio, GWEN_SYNCIO *sio, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags) { assert(dbio); assert(sio); assert(db); if (dbio->exportFn) return dbio->exportFn(dbio, sio, db, params, flags); else { DBG_INFO(GWEN_LOGDOMAIN, "No export function set"); return -1; } } GWEN_DBIO_CHECKFILE_RESULT GWEN_DBIO_CheckFile(GWEN_DBIO *dbio, const char *fname) { assert(dbio); assert(fname); if (dbio->checkFileFn) return dbio->checkFileFn(dbio, fname); else { DBG_INFO(GWEN_LOGDOMAIN, "No checkFile function set"); return GWEN_DBIO_CheckFileResultUnknown; } } const char *GWEN_DBIO_GetName(const GWEN_DBIO *dbio) { assert(dbio); return dbio->name; } const char *GWEN_DBIO_GetDescription(const GWEN_DBIO *dbio) { assert(dbio); return dbio->descr; } void GWEN_DBIO_SetImportFn(GWEN_DBIO *dbio, GWEN_DBIO_IMPORTFN f) { assert(dbio); dbio->importFn=f; } void GWEN_DBIO_SetExportFn(GWEN_DBIO *dbio, GWEN_DBIO_EXPORTFN f) { assert(dbio); dbio->exportFn=f; } void GWEN_DBIO_SetCheckFileFn(GWEN_DBIO *dbio, GWEN_DBIO_CHECKFILEFN f) { assert(dbio); dbio->checkFileFn=f; } GWEN_DBIO *GWEN_DBIO_GetPlugin(const char *modname) { GWEN_PLUGIN_MANAGER *pm; GWEN_PLUGIN *pl; GWEN_DBIO *dbio; pm=GWEN_PluginManager_FindPluginManager("dbio"); if (!pm) { DBG_ERROR(GWEN_LOGDOMAIN, "No plugin manager for \"dbio\" found"); return 0; } pl=GWEN_PluginManager_GetPlugin(pm, modname); if (!pl) { DBG_INFO(GWEN_LOGDOMAIN, "DBIO-Plugin \"%s\" not found", modname); return 0; } dbio=GWEN_DBIO_Plugin_Factory(pl); if (!dbio) { DBG_INFO(GWEN_LOGDOMAIN, "Plugin did not create a GWEN_DBIO"); } return dbio; } int GWEN_DBIO_ExportToFile(GWEN_DBIO *dbio, const char *fname, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t dbflags) { int rv; GWEN_FSLOCK *lck=0; GWEN_SYNCIO *sio; /* if locking requested */ if (dbflags & GWEN_DB_FLAGS_LOCKFILE) { GWEN_FSLOCK_RESULT res; lck=GWEN_FSLock_new(fname, GWEN_FSLock_TypeFile); assert(lck); res=GWEN_FSLock_Lock(lck, GWEN_DB_DEFAULT_LOCK_TIMEOUT, 0); if (res!=GWEN_FSLock_ResultOk) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not apply lock to file \"%s\" (%d)", fname, res); GWEN_FSLock_free(lck); return -1; } } /* open file */ sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_CreateAlways); if (dbflags & GWEN_DB_FLAGS_APPEND_FILE) GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_APPEND); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } rv=GWEN_DBIO_Export(dbio, sio, db, params, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } rv=GWEN_SyncIo_Disconnect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } GWEN_SyncIo_free(sio); /* remove lock, if any */ if (lck) { GWEN_FSLOCK_RESULT res; res=GWEN_FSLock_Unlock(lck); if (res!=GWEN_FSLock_ResultOk) { DBG_WARN(GWEN_LOGDOMAIN, "Could not remove lock on file \"%s\" (%d)", fname, res); } GWEN_FSLock_free(lck); } return 0; } int GWEN_DBIO_ExportToBuffer(GWEN_DBIO *dbio, GWEN_BUFFER *buf, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags) { GWEN_SYNCIO *sio; int rv; /* create SyncIO, don't take over buf */ sio=GWEN_SyncIo_Memory_new(buf, 0); rv=GWEN_DBIO_Export(dbio, sio, db, params, flags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_free(sio); return 0; } int GWEN_DBIO_ImportFromFile(GWEN_DBIO *dbio, const char *fname, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t dbflags) { GWEN_SYNCIO *sio; int rv; GWEN_FSLOCK *lck=0; /* if locking requested */ if (dbflags & GWEN_DB_FLAGS_LOCKFILE) { GWEN_FSLOCK_RESULT res; lck=GWEN_FSLock_new(fname, GWEN_FSLock_TypeFile); assert(lck); res=GWEN_FSLock_Lock(lck, GWEN_DB_DEFAULT_LOCK_TIMEOUT, 0); if (res!=GWEN_FSLock_ResultOk) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not apply lock to file \"%s\" (%d)", fname, res); GWEN_FSLock_free(lck); return GWEN_ERROR_IO; } } sio=GWEN_SyncIo_File_new(fname, GWEN_SyncIo_File_CreationMode_OpenExisting); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } /* read from file */ rv=GWEN_DBIO_Import(dbio, sio, db, params, dbflags); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); if (lck) { GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } return rv; } /* close io layer */ GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); /* remove lock, if any */ if (lck) { GWEN_FSLOCK_RESULT res; res=GWEN_FSLock_Unlock(lck); if (res!=GWEN_FSLock_ResultOk) { DBG_WARN(GWEN_LOGDOMAIN, "Could not remove lock on file \"%s\" (%d)", fname, res); } GWEN_FSLock_free(lck); } return 0; } gwenhywfar-5.12.1/src/parser/Makefile.am0000664000175000017500000000242714510000221015011 00000000000000AM_CPPFLAGS= -I$(gwenhywfar_symlinkdir) \ -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/os \ -I$(top_srcdir)/src/parser @all_includes@ AM_CFLAGS=@visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR typefiles=url.xml EXTRA_DIST=$(typefiles) \ dbrw.c \ xmlrw.c \ xmlglobalize.c \ tag16-t.c \ tag16-t.h \ README.xml2db noinst_LTLIBRARIES=libparser.la noinst_HEADERS=\ db_p.h \ dbio_l.h \ dbio_p.h \ configmgr_l.h \ configmgr_p.h \ msgengine_p.h \ tag16_p.h \ tlv_p.h \ url_l.h \ url_p.h \ xml_p.h \ xml_l.h \ xmlctx_l.h \ xmlctx_p.h \ xsdnode_l.h \ xsdnode_p.h \ json_p.h iheaderdir=$(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS=\ base64.h \ configmgr.h \ configmgr_be.h \ db.h \ dbio.h \ dbio_be.h \ msgengine.h \ path.h \ tag16.h \ text.h \ tlv.h \ url.h urlfns.h \ xml.h \ xmlctx.h \ xsdnode.h \ xml2db.h \ json.h \ json_read.h \ json_dump.h libparser_la_SOURCES=\ base64.c \ configmgr.c \ db.c \ dbio.c \ msgengine.c \ path.c \ tag16.c \ text.c \ tlv.c \ url.c urlfns.c \ xml.c \ xmlctx.c \ xsdnode.c \ xml2db.c \ json.c \ json_read.c \ json_dump.c sources: for f in $(libparser_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/src/parser/configmgr.c0000666000175000017500000003023213431572066015117 00000000000000/*************************************************************************** begin : Mon Aug 11 2008 copyright : (C) 2008,2017 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "configmgr_p.h" #include #include #include #include #include #include #include #include #include GWEN_INHERIT_FUNCTIONS(GWEN_CONFIGMGR) GWEN_INHERIT(GWEN_PLUGIN, GWEN_CONFIGMGR_PLUGIN) int GWEN_ConfigMgr_ModuleInit(void) { GWEN_PLUGIN_MANAGER *pm; int err; GWEN_STRINGLIST *sl; pm=GWEN_PluginManager_new(GWEN_CONFIGMGR_PLUGIN_NAME, GWEN_PM_LIBNAME); err=GWEN_PluginManager_Register(pm); if (err) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not register ConfigMgr plugin manager"); return err; } /* create plugin paths */ sl=GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR); if (sl) { GWEN_STRINGLISTENTRY *se; GWEN_BUFFER *pbuf; pbuf=GWEN_Buffer_new(0, 256, 0, 1); se=GWEN_StringList_FirstEntry(sl); while (se) { GWEN_Buffer_AppendString(pbuf, GWEN_StringListEntry_Data(se)); GWEN_Buffer_AppendString(pbuf, GWEN_DIR_SEPARATOR_S GWEN_CONFIGMGR_FOLDER); DBG_INFO(GWEN_LOGDOMAIN, "Adding plugin path [%s]", GWEN_Buffer_GetStart(pbuf)); GWEN_PluginManager_AddPath(pm, GWEN_PM_LIBNAME, GWEN_Buffer_GetStart(pbuf)); GWEN_Buffer_Reset(pbuf); se=GWEN_StringListEntry_Next(se); } GWEN_Buffer_free(pbuf); GWEN_StringList_free(sl); } return 0; } int GWEN_ConfigMgr_ModuleFini(void) { GWEN_PLUGIN_MANAGER *pm; pm=GWEN_PluginManager_FindPluginManager(GWEN_CONFIGMGR_PLUGIN_NAME); if (pm) { int rv; rv=GWEN_PluginManager_Unregister(pm); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not unregister ConfigMgr plugin manager (%d)", rv); return rv; } else GWEN_PluginManager_free(pm); } return 0; } GWEN_CONFIGMGR *GWEN_ConfigMgr_new(const char *url) { GWEN_CONFIGMGR *mgr; GWEN_NEW_OBJECT(GWEN_CONFIGMGR, mgr); GWEN_INHERIT_INIT(GWEN_CONFIGMGR, mgr); if (url) mgr->url=strdup(url); return mgr; } void GWEN_ConfigMgr_free(GWEN_CONFIGMGR *mgr) { if (mgr) { GWEN_INHERIT_FINI(GWEN_CONFIGMGR, mgr); free(mgr->url); GWEN_FREE_OBJECT(mgr); } } GWEN_CONFIGMGR_GETGROUP_FN GWEN_ConfigMgr_SetGetGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_GETGROUP_FN f) { GWEN_CONFIGMGR_GETGROUP_FN of; assert(mgr); of=mgr->getGroupFn; mgr->getGroupFn=f; return of; } GWEN_CONFIGMGR_SETGROUP_FN GWEN_ConfigMgr_SetSetGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_SETGROUP_FN f) { GWEN_CONFIGMGR_SETGROUP_FN of; assert(mgr); of=mgr->setGroupFn; mgr->setGroupFn=f; return of; } GWEN_CONFIGMGR_HASGROUP_FN GWEN_ConfigMgr_SetHasGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_HASGROUP_FN f) { GWEN_CONFIGMGR_HASGROUP_FN of; assert(mgr); of=mgr->hasGroupFn; mgr->hasGroupFn=f; return of; } GWEN_CONFIGMGR_LOCKGROUP_FN GWEN_ConfigMgr_SetLockGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_LOCKGROUP_FN f) { GWEN_CONFIGMGR_LOCKGROUP_FN of; assert(mgr); of=mgr->lockGroupFn; mgr->lockGroupFn=f; return of; } GWEN_CONFIGMGR_UNLOCKGROUP_FN GWEN_ConfigMgr_SetUnlockGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_UNLOCKGROUP_FN f) { GWEN_CONFIGMGR_UNLOCKGROUP_FN of; assert(mgr); of=mgr->unlockGroupFn; mgr->unlockGroupFn=f; return of; } GWEN_CONFIGMGR_GETUNIQUEID_FN GWEN_ConfigMgr_SetGetUniqueIdFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_GETUNIQUEID_FN f) { GWEN_CONFIGMGR_GETUNIQUEID_FN of; assert(mgr); of=mgr->getUniqueIdFn; mgr->getUniqueIdFn=f; return of; } GWEN_CONFIGMGR_MKUNIQUEIDFROMID_FN GWEN_ConfigMgr_SetMkUniqueIdFromIdFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_MKUNIQUEIDFROMID_FN f) { GWEN_CONFIGMGR_MKUNIQUEIDFROMID_FN of; assert(mgr); of=mgr->mkUniqueIdFromIdFn; mgr->mkUniqueIdFromIdFn=f; return of; } GWEN_CONFIGMGR_DELETEGROUP_FN GWEN_ConfigMgr_SetDeleteGroupFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_DELETEGROUP_FN f) { GWEN_CONFIGMGR_DELETEGROUP_FN of; assert(mgr); of=mgr->deleteGroupFn; mgr->deleteGroupFn=f; return of; } GWEN_CONFIGMGR_LISTGROUPS_FN GWEN_ConfigMgr_SetListGroupsFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_LISTGROUPS_FN f) { GWEN_CONFIGMGR_LISTGROUPS_FN of; assert(mgr); of=mgr->listGroupsFn; mgr->listGroupsFn=f; return of; } GWEN_CONFIGMGR_LISTSUBGROUPS_FN GWEN_ConfigMgr_SetListSubGroupsFn(GWEN_CONFIGMGR *mgr, GWEN_CONFIGMGR_LISTSUBGROUPS_FN f) { GWEN_CONFIGMGR_LISTSUBGROUPS_FN of; assert(mgr); of=mgr->listSubGroupsFn; mgr->listSubGroupsFn=f; return of; } int GWEN_ConfigMgr_GetGroup(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName, GWEN_DB_NODE **pDb) { assert(mgr); if (mgr->getGroupFn) return mgr->getGroupFn(mgr, groupName, subGroupName, pDb); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_SetGroup(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName, GWEN_DB_NODE *db) { assert(mgr); if (mgr->setGroupFn) return mgr->setGroupFn(mgr, groupName, subGroupName, db); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_HasGroup(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName) { assert(mgr); if (mgr->hasGroupFn) return mgr->hasGroupFn(mgr, groupName, subGroupName); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_LockGroup(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName) { assert(mgr); if (mgr->lockGroupFn) return mgr->lockGroupFn(mgr, groupName, subGroupName); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_UnlockGroup(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName) { assert(mgr); if (mgr->unlockGroupFn) return mgr->unlockGroupFn(mgr, groupName, subGroupName); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_GetUniqueId(GWEN_CONFIGMGR *mgr, const char *groupName, char *buffer, uint32_t bufferLen) { assert(mgr); if (mgr->getUniqueIdFn) return mgr->getUniqueIdFn(mgr, groupName, buffer, bufferLen); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_MkUniqueIdFromId(GWEN_CONFIGMGR *mgr, const char *groupName, uint32_t uid, int doCheck, char *buffer, uint32_t bufferLen) { assert(mgr); if (mgr->mkUniqueIdFromIdFn) return mgr->mkUniqueIdFromIdFn(mgr, groupName, uid, doCheck, buffer, bufferLen); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_DeleteGroup(GWEN_CONFIGMGR *mgr, const char *groupName, const char *subGroupName) { assert(mgr); if (mgr->deleteGroupFn) return mgr->deleteGroupFn(mgr, groupName, subGroupName); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_ListGroups(GWEN_CONFIGMGR *mgr, GWEN_STRINGLIST *sl) { assert(mgr); if (mgr->listGroupsFn) return mgr->listGroupsFn(mgr, sl); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_ConfigMgr_ListSubGroups(GWEN_CONFIGMGR *mgr, const char *groupName, GWEN_STRINGLIST *sl) { assert(mgr); if (mgr->listSubGroupsFn) return mgr->listSubGroupsFn(mgr, groupName, sl); else return GWEN_ERROR_NOT_IMPLEMENTED; } GWEN_PLUGIN *GWEN_ConfigMgr_Plugin_new(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName) { GWEN_PLUGIN *pl; GWEN_CONFIGMGR_PLUGIN *xpl; pl=GWEN_Plugin_new(pm, name, fileName); GWEN_NEW_OBJECT(GWEN_CONFIGMGR_PLUGIN, xpl); GWEN_INHERIT_SETDATA(GWEN_PLUGIN, GWEN_CONFIGMGR_PLUGIN, pl, xpl, GWEN_ConfigMgr_Plugin_FreeData); return pl; } void GWENHYWFAR_CB GWEN_ConfigMgr_Plugin_FreeData(GWEN_UNUSED void *bp, void *p) { GWEN_CONFIGMGR_PLUGIN *xpl; xpl=(GWEN_CONFIGMGR_PLUGIN *)p; GWEN_FREE_OBJECT(xpl); } void GWEN_ConfigMgr_Plugin_SetFactoryFn(GWEN_PLUGIN *pl, GWEN_CONFIGMGR_PLUGIN_FACTORYFN f) { GWEN_CONFIGMGR_PLUGIN *xpl; assert(pl); xpl=GWEN_INHERIT_GETDATA(GWEN_PLUGIN, GWEN_CONFIGMGR_PLUGIN, pl); assert(xpl); xpl->factoryFn=f; } GWEN_CONFIGMGR *GWEN_ConfigMgr_Plugin_Factory(GWEN_PLUGIN *pl, const char *url) { GWEN_CONFIGMGR_PLUGIN *xpl; assert(pl); xpl=GWEN_INHERIT_GETDATA(GWEN_PLUGIN, GWEN_CONFIGMGR_PLUGIN, pl); assert(xpl); assert(xpl->factoryFn); return xpl->factoryFn(pl, url); } GWEN_CONFIGMGR *GWEN_ConfigMgr_Factory(const char *url) { GWEN_PLUGIN_MANAGER *pm; GWEN_PLUGIN *pl; GWEN_CONFIGMGR *mgr=NULL; GWEN_URL *purl; const char *modname; pm=GWEN_PluginManager_FindPluginManager(GWEN_CONFIGMGR_PLUGIN_NAME); if (!pm) { DBG_ERROR(GWEN_LOGDOMAIN, "No plugin manager for \"ConfigMgr\" found"); return 0; } purl=GWEN_Url_fromString(url); if (purl==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Invalid url [%s]", url); return NULL; } modname=GWEN_Url_GetProtocol(purl); if (modname==NULL) modname="file"; pl=GWEN_PluginManager_GetPlugin(pm, modname); if (!pl) { DBG_INFO(GWEN_LOGDOMAIN, "ConfigMgr-Plugin \"%s\" not found", modname); GWEN_Url_free(purl); return 0; } GWEN_Url_free(purl); mgr=GWEN_ConfigMgr_Plugin_Factory(pl, url); if (mgr==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Plugin did not create a GWEN_CONFIGMGR"); } return mgr; } gwenhywfar-5.12.1/src/parser/tag16.c0000644000175000017500000002241414766656336014104 00000000000000/*************************************************************************** begin : Sun Jun 13 2004 copyright : (C) 2024 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "tag16_p.h" #include #include #include #include #include #include #include #include GWEN_LIST_FUNCTIONS(GWEN_TAG16, GWEN_Tag16) /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static void _writeTagToBuffer(unsigned int tagType, const uint8_t *p, int size, GWEN_BUFFER *buf); /* ------------------------------------------------------------------------------------------------ * code * ------------------------------------------------------------------------------------------------ */ GWEN_TAG16 *GWEN_Tag16_new(void) { GWEN_TAG16 *tag; GWEN_NEW_OBJECT(GWEN_TAG16, tag); GWEN_LIST_INIT(GWEN_TAG16, tag); return tag; } GWEN_TAG16 *GWEN_Tag16_newNoCopy(unsigned int tagType, unsigned int tagLength, const uint8_t *tagData) { GWEN_TAG16 *tag; tag=GWEN_Tag16_new(); tag->tagType=tagType; tag->tagLength=tagLength; if (tagLength) { tag->tagData=tagData; tag->dataOwned=0; } tag->tagSize=tagLength+3; return tag; } GWEN_TAG16 *GWEN_Tag16_newCopy(unsigned int tagType, unsigned int tagLength, const uint8_t *tagData) { GWEN_TAG16 *tag; tag=GWEN_Tag16_new(); tag->tagType=tagType; tag->tagLength=tagLength; if (tagLength) { uint8_t *p; p=malloc(tagLength); memmove(p, tagData, tagLength); tag->tagData=(const uint8_t*)p; tag->dataOwned=1; } tag->tagSize=tagLength+3; return tag; } void GWEN_Tag16_free(GWEN_TAG16 *tag) { if (tag) { if (tag->dataOwned) free((uint8_t*)(tag->tagData)); GWEN_LIST_FINI(GWEN_TAG16, tag); GWEN_FREE_OBJECT(tag); } } unsigned int GWEN_Tag16_GetTagType(const GWEN_TAG16 *tag) { return tag?(tag->tagType):0; } unsigned int GWEN_Tag16_GetTagLength(const GWEN_TAG16 *tag) { return tag?(tag->tagLength):0; } unsigned int GWEN_Tag16_GetTagSize(const GWEN_TAG16 *tag) { return tag?(tag->tagSize):0; } const void *GWEN_Tag16_GetTagData(const GWEN_TAG16 *tag) { return tag?(tag->tagData):NULL; } GWEN_TAG16 *GWEN_Tag16_fromBuffer(GWEN_BUFFER *mbuf, GWEN_UNUSED int isBerTlv) { GWEN_TAG16 *tag; tag=GWEN_Tag16_fromBuffer2((const uint8_t*) GWEN_Buffer_GetPosPointer(mbuf), GWEN_Buffer_GetUsedBytes(mbuf), 1); if (tag) GWEN_Buffer_IncrementPos(mbuf, tag->tagSize); return tag; } GWEN_TAG16 *GWEN_Tag16_fromBuffer2(const uint8_t *bufferPtr, uint32_t bufferLen, int doCopy) { unsigned int tagType; unsigned int tagLength; if (bufferLen<3) { DBG_ERROR(GWEN_LOGDOMAIN, "Buffer too small to contain a TAG16 object (%d < 3)", bufferLen); return NULL; } tagType=*(bufferPtr++); bufferLen--; tagLength=(uint16_t)(bufferPtr[0])+(bufferPtr[1]<<8); bufferPtr+=2; bufferLen-=2; if (bufferLentagLength>=sizeof(uint8_t)) return *(uint8_t*)(tag->tagData); return defaultValue; } uint16_t GWEN_Tag16_GetTagDataAsUint16(const GWEN_TAG16 *tag, uint16_t defaultValue) { if (tag && tag->tagLength>=sizeof(uint16_t)) return le16toh(*(uint16_t*)(tag->tagData)); return defaultValue; } uint32_t GWEN_Tag16_GetTagDataAsUint32(const GWEN_TAG16 *tag, uint32_t defaultValue) { if (tag && tag->tagLength>=sizeof(uint32_t)) return le32toh(*(uint32_t*)(tag->tagData)); return defaultValue; } uint64_t GWEN_Tag16_GetTagDataAsUint64(const GWEN_TAG16 *tag, uint64_t defaultValue) { if (tag && tag->tagLength>=sizeof(uint64_t)) return le64toh(*(uint64_t*)(tag->tagData)); return defaultValue; } char *GWEN_Tag16_GetTagDataAsNewString(const GWEN_TAG16 *tag, const char *defaultValue) { if (tag && tag->tagLength) return GWEN_Text_strndup((const char*)(tag->tagData), tag->tagLength); return defaultValue?strdup(defaultValue):NULL; } const GWEN_TAG16 *GWEN_Tag16_List_FindFirstByTagType(const GWEN_TAG16_LIST *tagList, unsigned int tagType) { const GWEN_TAG16 *tag; tag=GWEN_Tag16_List_First(tagList); while(tag) { if (tag->tagType==tagType) return tag; tag=GWEN_Tag16_List_Next(tag); } return NULL; } const GWEN_TAG16 *GWEN_Tag16_List_FindNextByTagType(const GWEN_TAG16 *tag, unsigned int tagType) { if (tag) { tag=GWEN_Tag16_List_Next(tag); while(tag) { if (tag->tagType==tagType) return tag; tag=GWEN_Tag16_List_Next(tag); } } return NULL; } GWEN_TAG16_LIST *GWEN_Tag16_List_fromBuffer(const uint8_t *p, uint32_t l, int doCopy) { GWEN_TAG16_LIST *tagList; tagList=GWEN_Tag16_List_new(); while(l) { GWEN_TAG16 *tag; tag=GWEN_Tag16_fromBuffer2(p, l, doCopy); if (tag==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "here"); GWEN_Tag16_List_free(tagList); return NULL; } GWEN_Tag16_List_Add(tag, tagList); if (ltagSize) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid remaining data (%d < %d)", l, tag->tagSize); GWEN_Tag16_List_free(tagList); return NULL; } p+=tag->tagSize; l-=tag->tagSize; } if (GWEN_Tag16_List_GetCount(tagList)<1) { DBG_ERROR(GWEN_LOGDOMAIN, "No entries in tag list"); GWEN_Tag16_List_free(tagList); return NULL; } return tagList; } void GWEN_Tag16_WriteTagToBuffer(unsigned int tagType, const uint8_t *s, int size, GWEN_BUFFER *buf) { _writeTagToBuffer(tagType, s, size, buf); } void _writeTagToBuffer(unsigned int tagType, const uint8_t *p, int size, GWEN_BUFFER *buf) { if (GWEN_Buffer_AllocRoom(buf, size+3)==0) { uint8_t *posPtr; posPtr=(uint8_t*) GWEN_Buffer_GetPosPointer(buf); *(posPtr++)=tagType & 0xff; *(posPtr++)=size & 0xff; *(posPtr++)=(size>>8) & 0xff; if (size) memmove(posPtr, p, size); GWEN_Buffer_IncrementPos(buf, size+3); GWEN_Buffer_AdjustUsedBytes(buf); } else { DBG_INFO(GWEN_LOGDOMAIN, "here"); } } int GWEN_Tag16_StartTagInBuffer(unsigned int tagType, GWEN_BUFFER *buf) { if (buf) { int pos; int rv; pos=GWEN_Buffer_GetPos(buf); rv=GWEN_Buffer_AllocRoom(buf, 3); if (rv==0) { uint8_t *posPtr; posPtr=(uint8_t*) GWEN_Buffer_GetPosPointer(buf); *(posPtr++)=tagType & 0xff; *(posPtr++)=0; *(posPtr++)=0; GWEN_Buffer_IncrementPos(buf, 3); GWEN_Buffer_AdjustUsedBytes(buf); } else { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return pos; } else { DBG_INFO(GWEN_LOGDOMAIN, "NULLPOINTER"); return GWEN_ERROR_INVALID; } } int GWEN_Tag16_EndTagInBuffer(int startPos, GWEN_BUFFER *buf) { int currentPos; int payloadSize; currentPos=GWEN_Buffer_GetPos(buf); payloadSize=currentPos-startPos-3; if (payloadSize<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Bad size(%d) or startpos(%d)", payloadSize, startPos); return GWEN_ERROR_GENERIC; } else { uint8_t *posPtr; posPtr=(uint8_t*) GWEN_Buffer_GetStart(buf)+startPos+1; *(posPtr++)=payloadSize & 0xff; *(posPtr++)=(payloadSize>>8) & 0xff; return 0; } } #include "tag16-t.c" gwenhywfar-5.12.1/src/base/0000755000175000017500000000000015032533712012464 500000000000000gwenhywfar-5.12.1/src/base/plugindescr_p.h0000664000175000017500000000420014460564441015420 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PLUGINDESCR_P_H #define GWENHYWFAR_PLUGINDESCR_P_H #include #include #include struct GWEN_PLUGIN_DESCRIPTION { GWEN_LIST_ELEMENT(GWEN_PLUGIN_DESCRIPTION) char *fileName; char *langDomain; char *path; char *name; char *type; char *shortDescr; char *author; char *version; char *longDescr; int isActive; GWEN_XMLNODE *xmlNode; uint32_t refCount; }; #endif /* GWENHYWFAR_PLUGINDESCR_P_H */ gwenhywfar-5.12.1/src/base/fastbuffer.c0000644000175000017500000000724213142134475014707 00000000000000/*************************************************************************** begin : Tue Apr 27 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "fastbuffer.h" #include "i18n_l.h" #include #include #include GWEN_FAST_BUFFER *GWEN_FastBuffer_new(uint32_t bsize, GWEN_SYNCIO *io) { GWEN_FAST_BUFFER *fb; assert(bsize); fb=(GWEN_FAST_BUFFER *) GWEN_Memory_malloc(sizeof(GWEN_FAST_BUFFER)+bsize); assert(fb); memset(fb, 0, sizeof(GWEN_FAST_BUFFER)+bsize); fb->bufferSize=bsize; fb->io=io; return fb; } void GWEN_FastBuffer_free(GWEN_FAST_BUFFER *fb) { if (fb) { GWEN_Memory_dealloc(fb); } } int GWEN_FastBuffer_ReadLine(GWEN_FAST_BUFFER *fb, uint8_t *p, int len) { int bytes; int copied=0; if (fb->bufferReadPos>=fb->bufferWritePos) { int rv; rv=GWEN_SyncIo_Read(fb->io, fb->buffer, fb->bufferSize); if (rv<0) { DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } bytes=fb->bufferWritePos-fb->bufferReadPos; if (bytes>len) bytes=len; while (bytes) { uint8_t c; c=fb->buffer[fb->bufferReadPos++]; fb->bytesRead++; if (c==10) { *(p++)=c; copied++; break; } else if (c!=13) { *(p++)=c; copied++; } bytes--; } /* while */ return copied; } int GWEN_FastBuffer_ReadLineToBuffer(GWEN_FAST_BUFFER *fb, GWEN_BUFFER *buf) { int lineComplete=0; int hadSome=0; while (!lineComplete) { int bytes; int copied=0; uint8_t *p; if (fb->bufferReadPos>=fb->bufferWritePos) { int rv; rv=GWEN_SyncIo_Read(fb->io, fb->buffer, fb->bufferSize); if (rv<0) { if (rv==GWEN_ERROR_EOF && hadSome) { /* done */ return 0; } DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else if (rv==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "EOF met"); if (!hadSome) return GWEN_ERROR_EOF; lineComplete=1; /* TODO: maybe we should have a flag that indicates that we met EOF here... */ } else { fb->bufferWritePos=rv; fb->bufferReadPos=0; } } bytes=fb->bufferWritePos-fb->bufferReadPos; p=fb->buffer+fb->bufferReadPos; while (bytes) { uint8_t c; hadSome=1; c=fb->buffer[fb->bufferReadPos++]; fb->bytesRead++; bytes--; if (c==10) { lineComplete=1; /* don't include this character */ break; } else if (c==13) { break; } else { copied++; } } /* while */ if (copied) GWEN_Buffer_AppendBytes(buf, (const char *)p, copied); } return 0; } uint32_t GWEN_FastBuffer_GetFlags(const GWEN_FAST_BUFFER *fb) { assert(fb); return fb->flags; } void GWEN_FastBuffer_SetFlags(GWEN_FAST_BUFFER *fb, uint32_t fl) { assert(fb); fb->flags=fl; } void GWEN_FastBuffer_AddFlags(GWEN_FAST_BUFFER *fb, uint32_t fl) { assert(fb); fb->flags|=fl; } void GWEN_FastBuffer_SubFlags(GWEN_FAST_BUFFER *fb, uint32_t fl) { assert(fb); fb->flags&=~fl; } uint32_t GWEN_FastBuffer_GetBytesWritten(const GWEN_FAST_BUFFER *fb) { assert(fb); return fb->bytesWritten; } uint32_t GWEN_FastBuffer_GetBytesRead(const GWEN_FAST_BUFFER *fb) { assert(fb); return fb->bytesRead; } gwenhywfar-5.12.1/src/base/pathmanager.h0000644000175000017500000003470513142134475015060 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PATHMANAGER_H #define GWENHYWFAR_PATHMANAGER_H #include #include #include typedef enum { /** relative to the current working directory at calling time */ GWEN_PathManager_RelModeCwd=0, /** * This mode is interpreted differently in Windows and non-Windows systems * due to the different handling of paths. *
    *
  • * Windows: Releative to the folder in which the currently running * executable is located. *
  • *
  • * Non-Windows: Relative to the installation prefix of the currently * running executable *
  • *
*/ GWEN_PathManager_RelModeExe, /** relative to the user's home directory */ GWEN_PathManager_RelModeHome } GWEN_PATHMANAGER_RELMODE; #ifdef __cplusplus extern "C" { #endif /** @name Path Management * * Gwenhywfar keeps track of registered directory paths for itself * and for other libraries. * * The paths are registered and stored in one global object (of * GWEN_DB_NODE type), so write-access to this GWEN_PathManager * functions is unfortunately not thread-safe. * * This technique is used internally to * determine some important paths. */ /*@{*/ /** * Register a path to be managed by the global GWEN_PathManager * module. This must be done before calling one of the other * functions of this group. The actual path is not yet set. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @return Zero on success, or GWEN_ERROR_INVALID if the @c * pathName already exists. */ GWENHYWFAR_API int GWEN_PathManager_DefinePath(const char *destLib, const char *pathName); /** * Unregister a path that was registered by * GWEN_PathManager_DefinePath(). * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @return Zero on success, or GWEN_ERROR_NOT_FOUND if the @c * pathName was not found. */ GWENHYWFAR_API int GWEN_PathManager_UndefinePath(const char *destLib, const char *pathName); /** * Add a directory path entry to a registered path entry in the * global GWEN_PathManager. * * @param callingLib The name of the library that adds this path entry. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param pathValue The actual directory path that should be added to * this registered path. * * @param rm path relative to what? (see @ref GWEN_PathManager_RelModeCwd) * * @return Zero on success, or GWEN_ERROR_NOT_FOUND if the @c * pathName was not found. */ GWENHYWFAR_API int GWEN_PathManager_AddPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue); /** * Same as @ref GWEN_PathManager_AddPath but the path to add is given * relative to some directory. The "relmode" argument chooses the base * directory to which the given sub-directory path is appended and the * result is added to this PathManager: * * - RelModeCwd appends the path to the current working directory at * the time of calling. So future changes to the CWD do not affect * this setting. * * - RelModeExe appends the path to the prefix of the installation * location of the calling executable. This function looks up the * current working directory, removes the last component (i.e. the * "/bin/") to get the prefix, then adds the given relative path to * it. * * - RelModeHome appends the path to the return value of * GWEN_Directory_GetHomeDirectory(). * * All three variantes will then add the resulting path * to the PathManager. * * @param callingLib The name of the library that adds this path entry. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param pathValue The actual directory path relative to the prefix * of the current working directory that should be added to this * registered path. * * @param rm The Flag to choose the starting directory to which the * path is appended. * * @return Zero on success, or GWEN_ERROR_NOT_FOUND if the @c * pathName was not found. */ GWENHYWFAR_API int GWEN_PathManager_AddRelPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue, GWEN_PATHMANAGER_RELMODE rm); /** * Add a directory path entry to a registered path entry in the * global GWEN_PathManager by looking up the directory path in the * Windows registry. * * On non-windows platforms, the function does nothing and returns * zero, so you can safely call this in your multi-platform code. * * Note: Gwenhywfar-2.6.0 and older used to lookup the paths under * HKEY_CURRENT_USER, but with gwen-2.6.1 this was changed to * HKEY_LOCAL_MACHINE because we're talking about installation paths * as opposed to per-user configuration settings. * * @param callingLib The name of the library that adds this path entry. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param keypath The key's path in the windows registry under * HKEY_LOCAL_MACHINE, e.g. "Software\MyProgram\Paths". * * @param varname The variable name of the string variable with the * actual directory path. * * @return Zero on success, or nonzero if the @c pathName or the * registry key was not found. */ GWENHYWFAR_API int GWEN_PathManager_AddPathFromWinReg(const char *callingLib, const char *destLib, const char *pathName, const char *keypath, const char *varname); /** * Insert a directory path entry to a registered path entry in the * global GWEN_PathManager. While @ref GWEN_PathManager_AddPath adds a path * to the end of the list for this particular @c pathName this function * here inserts it at the beginning of the list. This can be used e.g. to * ensure that plugins/files from a given path take precedence over already * added paths. * * @param callingLib The name of the library that adds this path entry. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param pathValue The actual directory path that should be added to * this registered path. */ GWENHYWFAR_API int GWEN_PathManager_InsertPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue); /** * Same as @ref GWEN_PathManager_InsertPath but the path to insert is given * relative to some directory. The "relmode" argument chooses the base * directory to which the given sub-directory path is appended and the * result is added to this PathManager: * * - RelModeCwd appends the path to the current working directory at * the time of calling. So future changes to the CWD do not affect * this setting. * * - RelModeExe appends the path to the prefix of the installation * location of the calling executable. This function looks up the * current working directory, removes the last component (i.e. the * "/bin/") to get the prefix, then adds the given relative path to * it. * * - RelModeHome appends the path to the return value of * GWEN_Directory_GetHomeDirectory(). * * All three variantes will then add the resulting path * to the PathManager. * * @param callingLib The name of the library that adds this path entry. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param pathValue The actual directory path relative to the prefix * of the current working directory that should be added to this * registered path. * * @param rm The Flag to choose the starting directory to which the * path is appended. * * @return Zero on success, or GWEN_ERROR_NOT_FOUND if the @c * pathName was not found. */ GWENHYWFAR_API int GWEN_PathManager_InsertRelPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue, GWEN_PATHMANAGER_RELMODE rm); /** * Removes a directory path entry from a registered path entry in * the global GWEN_PathManager. * * @param callingLib The name of the library that added this path entry. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param pathValue The actual directory path that should be added to * this registered path. * * @return Zero on success, or nonzero if the @c pathName was not * found. */ GWENHYWFAR_API int GWEN_PathManager_RemovePath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue); /** * Removes all directory path entries that were registered by the * @c callingLib from the global GWEN_PathManager. * * @param callingLib The name of the library that added path entries. * * @return Zero on success. */ GWENHYWFAR_API int GWEN_PathManager_RemovePaths(const char *callingLib); /** * This function checks whether the path list for @c pathName has changed * since the last call to this function (i.e. whether paths have been * added, inserted or removed). * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @return Zero on success, or GWEN_ERROR_NOT_FOUND if the @c * pathName was not found. */ GWENHYWFAR_API int GWEN_PathManager_PathChanged(const char *destLib, const char *pathName); /** * Returns a string list of all path entries that exist under the * registered @c pathName. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @return A newly allocated @ref GWEN_STRINGLIST with all added * path entries, or NULL if no path entry or no registered @c * pathName exists. Delete this list with @ref GWEN_StringList_free() * when no longer needed. */ GWENHYWFAR_API GWEN_STRINGLIST *GWEN_PathManager_GetPaths(const char *destLib, const char *pathName); /** * This functions tries to find a given file using all * path entries under the registered @c pathName. * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param fileName Name of the file (may contain partial paths, like in * "dialogs/testdialog.xml" * * @param fbuf buffer to receive the full path to access the file * * @return 0 on success (in that case @c fbuf will be filled), an * error code otherwise. */ GWENHYWFAR_API int GWEN_PathManager_FindFile(const char *destLib, const char *pathName, const char *fileName, GWEN_BUFFER *fbuf); /** * This function calls @ref GWEN_Directory_GetMatchingFilesRecursively() on every * path entry under the registered @c pathName. * * @return 0 if ok, error code on error * * @param destLib The name of the library that this path is supposed to * belong to. * * @param pathName A string identifier for this registered path. * * @param subFolderName if given then this folder name is appended to every path under * the registered @c pathName before caling @ref GWEN_Directory_GetMatchingFilesRecursively() * on it. You can use this parameter to search only in specific sub folders of the paths. * * @param sl string list to receive the paths of all matching files */ GWENHYWFAR_API int GWEN_PathManager_GetMatchingFilesRecursively(const char *destLib, const char *pathName, const char *subFolderName, GWEN_STRINGLIST *sl, const char *mask); /*@}*/ #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_PATHMANAGER_H */ gwenhywfar-5.12.1/src/base/args.h0000644000175000017500000001001313142134462013503 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Apr 24 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_ARGS_H #define GWENHYWFAR_ARGS_H #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_ARGS GWEN_ARGS; #ifdef __cplusplus } #endif #include #include #include #ifdef __cplusplus extern "C" { #endif #define GWEN_ARGS_FLAGS_HAS_ARGUMENT 0x00000001 #define GWEN_ARGS_FLAGS_LAST 0x00000002 #define GWEN_ARGS_FLAGS_HELP 0x00000004 #define GWEN_ARGS_MODE_ALLOW_FREEPARAM 0x00000001 #define GWEN_ARGS_MODE_STOP_AT_FREEPARAM 0x00000002 #define GWEN_ARGS_RESULT_ERROR (-1) #define GWEN_ARGS_RESULT_HELP (-2) typedef enum { GWEN_ArgsType_Char=0, GWEN_ArgsType_Int } GWEN_ARGS_TYPE; typedef enum { GWEN_ArgsOutType_Txt=0, GWEN_ArgsOutType_Html } GWEN_ARGS_OUTTYPE; /** * This is one of the very few structs inside Gwenhywfar whose * contents are available for direct access to the the program. * Developer's note: Please note that any change within this struct will * make it necessary to increment the SO_VERSION of the library ! */ struct GWEN_ARGS { uint32_t flags; GWEN_ARGS_TYPE type; const char *name; unsigned int minNum; unsigned int maxNum; const char *shortOption; const char *longOption; const char *shortDescription; const char *longDescription; }; /** * This function parses the given argument list. * Known options are stored within the given DB under their respective name. * Free parameters (which are arguments without leading "-"'s) are stored in * the variable "params" of the given db. */ GWENHYWFAR_API int GWEN_Args_Check(int argc, char **argv, int startAt, uint32_t mode, const GWEN_ARGS *args, GWEN_DB_NODE *db); /** Print a "usage" message into the given GWEN_BUFFER @c * ubuf. The message lists all available options. The * GWEN_ARGS_OUTTYPE argument is supposed to offer either text or * html as output format, but currently only text is * implemented. */ GWENHYWFAR_API int GWEN_Args_Usage(const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot); /** Currently unimplemented; does nothing and returns zero. */ GWENHYWFAR_API int GWEN_Args_ShortUsage(const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot); #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_ARGS_H */ gwenhywfar-5.12.1/src/base/gwensignal_p.h0000644000175000017500000000731513552051673015246 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: stringlist_p.h 786 2005-07-09 13:38:17Z aquamaniac $ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_SIGNAL_P_H #define GWENHYWFAR_SIGNAL_P_H #include "gwensignal.h" GWEN_LIST2_FUNCTION_DEFS(GWEN_SIGNAL, GWEN_Signal) GWEN_LIST2_FUNCTION_DEFS(GWEN_SLOT, GWEN_Slot) void GWEN_Signal_List2_freeAll(GWEN_SIGNAL_LIST2 *slist); void GWEN_Slot_List2_freeAll(GWEN_SLOT_LIST2 *slist); struct GWEN_SIGNAL { GWEN_SIGNALOBJECT *signalObject; char *name; uint32_t derivedParentType; uint32_t typeOfArg1; uint32_t typeOfArg2; GWEN_SLOT_LIST2 *connectedSlots; uint32_t _refCount; }; GWEN_SIGNAL *GWEN_Signal__List2_freeAll_cb(GWEN_SIGNAL *sig, void *user_data); GWEN_SIGNAL *GWEN_Signal__List2_hasSignal_cb(GWEN_SIGNAL *sig, void *user_data); int GWEN_Signal_List2_HasSignal(GWEN_SIGNAL_LIST2 *slist, GWEN_SIGNAL *sig); void GWEN_Signal_Attach(GWEN_SIGNAL *sig); struct GWEN_SLOT { GWEN_SIGNALOBJECT *signalObject; char *name; uint32_t derivedParentType; GWEN_SLOT_FUNCTION func; void *userData; uint32_t typeOfArg1; uint32_t typeOfArg2; GWEN_SIGNAL_LIST2 *connectedSignals; uint32_t _refCount; }; GWEN_SLOT *GWEN_Slot__List2_freeAll_cb(GWEN_SLOT *slot, void *user_data); GWEN_SLOT *GWEN_Slot__List2_hasSlot_cb(GWEN_SLOT *slot, void *user_data); int GWEN_Slot_List2_HasSlot(GWEN_SLOT_LIST2 *slist, GWEN_SLOT *slot); void GWEN_Slot_Attach(GWEN_SLOT *slot); struct GWEN_SIGNALOBJECT { GWEN_SLOT_LIST2 *slotList; GWEN_SIGNAL_LIST2 *signalList; }; uint32_t GWEN_SignalObject_MkTypeId(const char *typeName); GWEN_SIGNAL *GWEN_SignalObject__findSignal(const GWEN_SIGNALOBJECT *so, const char *name, uint32_t typeId1, uint32_t typeId2); GWEN_SLOT *GWEN_SignalObject__findSlot(const GWEN_SIGNALOBJECT *so, const char *name, uint32_t typeId1, uint32_t typeId2); int GWEN_SignalObject_AddSignal(GWEN_SIGNALOBJECT *so, GWEN_SIGNAL *sig); int GWEN_SignalObject_AddSlot(GWEN_SIGNALOBJECT *so, GWEN_SLOT *slot); #endif gwenhywfar-5.12.1/src/base/list1.tmpl0000644000175000017500000001141113142134463014334 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef @TYPENAME@_LIST1_H #define @TYPENAME@_LIST1_H #ifdef __cplusplus extern "C" { #endif /** @internal */ typedef struct @TYPENAME@_LIST_ELEMENT { uint32_t id; @TYPENAME@ *nextObject; } @TYPENAME@_LIST__ELEMENT; /** * This represents a list of @TYPENAME@ (see @ref @FN_PREFIX@_List_new). * This list may contain any number of elements. However, every element can * only exist within a single list. * If you need a better list please check @ref GWEN_LIST. */ typedef struct @TYPENAME@_LIST @TYPENAME@_LIST; /** * This function is called from within @ref @FN_PREFIX@_List_SetSortFn(). */ typedef int GWENHYWFAR_CB (*@TYPENAME@_LIST_SORT_FN)(const @TYPENAME@ *a, const @TYPENAME@ *b, int ascending); /** @internal */ struct @TYPENAME@_LIST { @TYPENAME@ *first; uint32_t count; uint32_t id; } @TYPENAME@_LIST; /** * Moves the content of one list to another list thus leaving the * old list empty. */ void @FN_PREFIX@_List_AddList(@TYPENAME@_LIST *dst, @TYPENAME@_LIST *l); /** * Adds the given element to the given list making it the new tail. */ void @FN_PREFIX@_List_Add(@TYPENAME@ *element, @TYPENAME@_LIST *list); /** * Inserts the given element into the given list thus making it the new * head of the list. */ void @FN_PREFIX@_List_Insert(@TYPENAME@ *element, @TYPENAME@_LIST *list); /** * Unlinks the given element from whatever list it may currently be * enlisted. If the element is @b not member of any list the program is * aborted. * Please note: The element is just unlinked, not deleted. */ void @FN_PREFIX@_List_Del(@TYPENAME@ *element); /** * Returns the first element of the list. */ @TYPENAME@* @FN_PREFIX@_List_First(const @TYPENAME@_LIST *l); /** * Returns the last element of the list. */ @TYPENAME@* @FN_PREFIX@_List_Last(const @TYPENAME@_LIST *l); /** * Clears the given list (thus leaving it empty). All elements of this list * are deleted via @ref @FN_PREFIX@_free(); */ void @FN_PREFIX@_List_Clear(@TYPENAME@_LIST *l); /** * Creates a new list of @ref @TYPENAME@. */ @TYPENAME@_LIST* @FN_PREFIX@_List_new(); /** * Destroys the list and frees all its elements. */ void @FN_PREFIX@_List_free(@TYPENAME@_LIST *l); /** * Returns the successor of the given element. */ @TYPENAME@* @FN_PREFIX@_List_Next(const @TYPENAME@ *element); /** * Returns the predecessor of the given element. */ @TYPENAME@* @FN_PREFIX@_List_Previous(const @TYPENAME@ *element); /** * Returns the number of elements currently in the given list. */ uint32_t @FN_PREFIX@_List_GetCount(const @TYPENAME@_LIST *l); /** * Set the sort function for the next calls to @ref @FN_PREFIX@_List_Sort(). */ @TYPENAME@_LIST_SORT_FN @FN_PREFIX@_List_SetSortFn(@TYPENAME@_LIST *l, @TYPENAME@_LIST_SORT_FN fn); /** * Sort the list. Within the course of this function the sort function set via * @ref @FN_PREFIX@_List_SetSortFn is called with the arguments * "const @TYPENAME@ *a, const @TYPENAME@ *b, int ascending". */ void @FN_PREFIX@_List_Sort(@TYPENAME@_LIST *l, int ascending); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/buffer-t.h0000666000175000017500000000347613642701350014305 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_BUFFER_T_H #define GWENHYWFAR_BUFFER_T_H #include #include /** * Internal tests for GWEN_BUFFER. */ GWENHYWFAR_API int GWEN_Buffer_AddTests(GWEN_TEST_MODULE *mod); /*@}*/ #endif gwenhywfar-5.12.1/src/base/memcache.h0000644000175000017500000001107413142134475014325 00000000000000/*************************************************************************** begin : Mon Jul 14 2008 copyright : (C) 2008 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_MEMCACHE_H #define GWENHYWFAR_MEMCACHE_H #include #include #include typedef struct GWEN_MEMCACHE_ENTRY GWEN_MEMCACHE_ENTRY; typedef struct GWEN_MEMCACHE GWEN_MEMCACHE; GWENHYWFAR_API void GWEN_MemCacheEntry_free(GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API uint32_t GWEN_MemCacheEntry_GetId(GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API void *GWEN_MemCacheEntry_GetDataPtr(GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API size_t GWEN_MemCacheEntry_GetDataLen(GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API int GWEN_MemCacheEntry_GetIsValid(const GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API void GWEN_MemCacheEntry_BeginUse(GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API void GWEN_MemCacheEntry_EndUse(GWEN_MEMCACHE_ENTRY *me); GWENHYWFAR_API GWEN_MEMCACHE *GWEN_MemCache_new(size_t maxCacheMemory, uint32_t maxCacheEntries); GWENHYWFAR_API void GWEN_MemCache_free(GWEN_MEMCACHE *mc); /** * Returns the cache entry with the given id (if any). * If NULL is returned then there is no entry with the given id, * otherwise the use counter of the object returned is incremented. * Therefore the caller has to call @ref GWEN_MemCacheEntry_EndUse * after working with the object returned in order to release unused * cache entries. */ GWENHYWFAR_API GWEN_MEMCACHE_ENTRY *GWEN_MemCache_FindEntry(GWEN_MEMCACHE *mc, uint32_t id); /** * Creates a cache entry for the given id. If there already is an entry * of the given id that existing entry will first be invalidated. * The use counter of the new object returned is 1, so the caller must * call @ref GWEN_MemCacheEntry_EndUse after working with the object returned in * order to release unused cache entries. */ GWENHYWFAR_API GWEN_MEMCACHE_ENTRY *GWEN_MemCache_CreateEntry(GWEN_MEMCACHE *mc, uint32_t id, void *dataPtr, size_t dataLen); /** * This function invalidates a given cache entry (if it exists). * The data associated with that entry is not freed yet until all * users of that entry called @ref GWEN_MemCacheEntry_EndUse (i.e. * until the use counter of that entry reaches zero). However, the * entry will be removed from the cache index so that future calls * to @ref GWEN_MemCache_FindEntry will not return it. */ GWENHYWFAR_API void GWEN_MemCache_PurgeEntry(GWEN_MEMCACHE *mc, uint32_t id); /** * This function invalidates all entries whose ids match the given * id/mask pair. See @ref GWEN_MemCache_PurgeEntry for implementation * details and caveats. */ GWENHYWFAR_API void GWEN_MemCache_PurgeEntries(GWEN_MEMCACHE *mc, uint32_t id, uint32_t mask); /** * This function invalidates all cache entries. * See @ref GWEN_MemCache_PurgeEntry for implementation * details and caveats. */ GWENHYWFAR_API void GWEN_MemCache_Purge(GWEN_MEMCACHE *mc); #endif gwenhywfar-5.12.1/src/base/list1_p.h0000644000175000017500000000475713142134463014145 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_LIST1_P_H #define GWEN_LIST1_P_H #include "list1.h" struct GWEN_LIST1_ELEMENT { GWEN_LIST1 *listPtr; void *data; GWEN_LIST1_ELEMENT *prevElement; GWEN_LIST1_ELEMENT *nextElement; }; struct GWEN_LIST1 { uint32_t count; GWEN_LIST1_ELEMENT *firstElement; GWEN_LIST1_ELEMENT *lastElement; GWEN_LIST1_SORT_FN sortFunction; }; typedef struct GWEN_LIST1_SORT_CTX GWEN_LIST1_SORT_CTX; struct GWEN_LIST1_SORT_CTX { GWEN_LIST1 *list; int param; }; static GWEN_LIST1_SORT_CTX *GWEN_List1_SortCtx_new(GWEN_LIST1 *list, int param); static void GWEN_List1_SortCtx_free(GWEN_LIST1_SORT_CTX *ctx); typedef struct GWEN_LIST1_SORT_ELEM GWEN_LIST1_SORT_ELEM; struct GWEN_LIST1_SORT_ELEM { GWEN_LIST1_SORT_CTX *context; GWEN_LIST1_ELEMENT *element; }; static GWEN_LIST1_SORT_ELEM *GWEN_List1_SortElem_new(GWEN_LIST1_SORT_CTX *ctx, GWEN_LIST1_ELEMENT *elem); static void GWEN_List1_SortElem_free(GWEN_LIST1_SORT_ELEM *e); #endif gwenhywfar-5.12.1/src/base/inherit.h0000664000175000017500000002655714460564441014247 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Dec 05 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_INHERIT_H #define GWENHYWFAR_INHERIT_H #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_INHERITDATA GWEN_INHERITDATA; #ifdef __cplusplus } #endif #include #include #ifdef __cplusplus extern "C" { #endif /** @defgroup GWEN_MACRO_INHERIT Macros For Typesafe Inheritance * */ /*@{*/ typedef void GWENHYWFAR_CB(*GWEN_INHERIT_FREEDATAFN)(void *baseData, void *data); GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_INHERITDATA, GWEN_InheritData, GWENHYWFAR_API) /* No trailing semicolon because this is a macro call */ GWENHYWFAR_API GWEN_INHERITDATA *GWEN_InheritData_new(const char *t, uint32_t id, void *data, void *baseData, GWEN_INHERIT_FREEDATAFN fn); GWENHYWFAR_API void GWEN_InheritData_free(GWEN_INHERITDATA *d); GWENHYWFAR_API void GWEN_InheritData_freeData(GWEN_INHERITDATA *d); GWENHYWFAR_API void GWEN_InheritData_freeAllData(GWEN_INHERITDATA *d); GWENHYWFAR_API void GWEN_InheritData_clear(GWEN_INHERITDATA *d); GWENHYWFAR_API const char *GWEN_InheritData_GetTypeName(const GWEN_INHERITDATA *d); GWENHYWFAR_API uint32_t GWEN_InheritData_GetId(const GWEN_INHERITDATA *d); GWENHYWFAR_API void *GWEN_InheritData_GetData(const GWEN_INHERITDATA *d); GWENHYWFAR_API GWEN_INHERIT_FREEDATAFN GWEN_InheritData_GetFreeDataFn(const GWEN_INHERITDATA *d); GWENHYWFAR_API uint32_t GWEN_Inherit_MakeId(const char *typeName); GWENHYWFAR_API void *GWEN_Inherit_FindData(GWEN_INHERITDATA_LIST *l, uint32_t id, int wantCreate); GWENHYWFAR_API GWEN_INHERITDATA *GWEN_Inherit_FindEntry(GWEN_INHERITDATA_LIST *l, uint32_t id, int wantCreate); /** @name Macros To Be Used In Inherited Classes - Header Files * */ /*@{*/ /** * Use this macro inside the struct which you want to make inheritable. * This macro defines some new elements for the struct for administration * of inheritance. */ #define GWEN_INHERIT_ELEMENT(t) \ GWEN_INHERITDATA_LIST *INHERIT__list; /** * Use this macro in the header file of the base class. This defines * the prototypes of some inheritance functions. This macro should * be used in libraries with the __declspec(dllexport) as the @c * decl argument. * * You should not care about these functions here, since you should not use * them directly. Please use @ref GWEN_INHERIT_GETDATA and * @ref GWEN_INHERIT_SETDATA instead. */ #define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl) \ decl void t##__INHERIT_SETDATA(t *element, \ const char *typeName,\ uint32_t id,\ void *data,\ GWEN_INHERIT_FREEDATAFN f);\ decl int t##__INHERIT_ISOFTYPE(const t *element, uint32_t id);\ decl GWEN_INHERITDATA_LIST *t##__INHERIT_GETLIST(const t *element);\ decl void t##__INHERIT_UNLINK(t *element, \ const char *typeName,\ uint32_t id); /** * Use this macro in the header file of the base class. This defines * the prototypes of some inheritance functions. This macro should * be used in applications, not in libraries. In libraries please * use the macro @ref GWEN_INHERIT_FUNCTION_LIB_DEFS. * * You should not care about these functions here, since you should not use * them directly. Please use @ref GWEN_INHERIT_GETDATA and * @ref GWEN_INHERIT_SETDATA instead. */ #define GWEN_INHERIT_FUNCTION_DEFS(t) \ GWEN_INHERIT_FUNCTION_LIB_DEFS(t, GWEN_DUMMY_EMPTY_ARG) /*@}*/ /** @name Macros To Be Used In Inherited Classes - C Files * */ /*@{*/ /** * Use this macro in the C file of the base class. It defines the * implementations of the inheritance functions. This macro MUST be * placed after the include statement which includes the classes header * file. */ #define GWEN_INHERIT_FUNCTIONS(t) \ GWEN_INHERITDATA_LIST *t##__INHERIT_GETLIST(const t *element) {\ assert(element);\ return element->INHERIT__list;\ }\ \ void t##__INHERIT_SETDATA(t *element, \ const char *typeName,\ uint32_t id,\ void *data,\ GWEN_INHERIT_FREEDATAFN f) {\ GWEN_INHERITDATA *d;\ void *p;\ \ assert(element);\ assert(element->INHERIT__list);\ \ p=GWEN_Inherit_FindData(element->INHERIT__list, id, 1);\ if (p) {\ fprintf(stderr,\ "ERROR: Type \"%s\" already inherits base type\n",\ typeName);\ abort();\ }\ d=GWEN_InheritData_new(typeName, id, data, (void*)element, f);\ GWEN_InheritData_List_Insert(d, element->INHERIT__list);\ }\ \ int t##__INHERIT_ISOFTYPE(const t *element, uint32_t id) {\ assert(element);\ assert(element->INHERIT__list);\ \ return (GWEN_Inherit_FindData(element->INHERIT__list, id, 1)!=0);\ }\ \ void t##__INHERIT_UNLINK(t *element, \ const char *typeName,\ uint32_t id) {\ GWEN_INHERITDATA *d;\ \ assert(element);\ assert(element->INHERIT__list);\ \ d=GWEN_Inherit_FindEntry(element->INHERIT__list, id, 1);\ if (!d) {\ fprintf(stderr, \ "ERROR: Type \"%s\" does not inherit base type\n",\ typeName);\ abort();\ }\ GWEN_InheritData_clear(d);\ GWEN_InheritData_List_Del(d);\ GWEN_InheritData_free(d);\ } /** * Use this macro in your C file in constructor functions for the base * class. This macro initializes the elements defined by the macro * @ref GWEN_INHERIT_ELEMENT. */ #define GWEN_INHERIT_INIT(t, element) {\ assert(element);\ element->INHERIT__list=GWEN_InheritData_List_new();\ } /** * Use this macro in your C file in destructor functions for the base * class. This macro deinitializes the elements defined by the macro * @ref GWEN_INHERIT_ELEMENT. This should be the first instruction in that * function, because it also gives inheriting classes the opportunity to * free their own data associated with the given element. It causes the * least problems if inheriting classes free their data before the base * class does. */ #define GWEN_INHERIT_FINI(t, element) {\ GWEN_INHERITDATA *inherit__data;\ \ assert(element);\ assert(element->INHERIT__list);\ \ while( (inherit__data=GWEN_InheritData_List_First(element->INHERIT__list)) ) {\ GWEN_InheritData_freeData(inherit__data); \ GWEN_InheritData_List_Del(inherit__data); \ GWEN_InheritData_free(inherit__data); \ } \ GWEN_InheritData_List_free(element->INHERIT__list);\ } /*@}*/ /** @name Macros To Be Used In Inheriting Classes * */ /*@{*/ /** * Use this in the C file of inheriting classes. It initializes a global * variable with a hash of the inheriting type name. This is used to speed * up inheritance functions. This variable will be filled with a value * upon the first invocation of the macro @ref GWEN_INHERIT_SETDATA. */ #define GWEN_INHERIT(bt, t) \ uint32_t t##__INHERIT_ID=0; /** * This is an extern reference when you need to call GWEN_INHERIT_GETDATA from * one source file while the GWEN_INHERIT stance is in another one. */ #define GWEN_INHERIT_REF(bt, t) \ extern uint32_t t##__INHERIT_ID; /** * This macros returns the private data of an inheriting class associated * with an element of its base class. */ #define GWEN_INHERIT_GETDATA(bt, t, element) \ ((t*)GWEN_Inherit_FindData(bt##__INHERIT_GETLIST(element),t##__INHERIT_ID,0)) /** * This macro sets the private data of an inheriting class associated * with an element of its base class. The last argument is a pointer to a * function which frees the associated data. That function will be called * when the element of the base class given is freed or new data is to be * associated with the element. * The prototype of that function is this: * @code * typedef void (*function)(void *baseData, void *data); * @endcode * Please note that the argument to that function is a pointer to the * base type element. If you want to get the private data associated with * the base type element (and you probably do) you must call * @ref GWEN_INHERIT_GETDATA. * Every time the macro @ref GWEN_INHERIT_SETDATA is used the previously * associated data will be freed by calling the function whose prototype * you've just learned. */ #define GWEN_INHERIT_SETDATA(bt, t, element, data, fn) {\ if (!t##__INHERIT_ID)\ t##__INHERIT_ID=GWEN_Inherit_MakeId(__STRING(t));\ bt##__INHERIT_SETDATA(element, __STRING(t), t##__INHERIT_ID, data, fn);\ } /** * This macro checks whether the given element is of the given type. * @return !=0 if the pointer is of the expected type, 0 otherwise * @param bt base type * @param t derived type * @param element pointer which is to be checked */ #define GWEN_INHERIT_ISOFTYPE(bt, t, element) \ ((bt##__INHERIT_ISOFTYPE(element,\ ((t##__INHERIT_ID==0)?\ ((t##__INHERIT_ID=GWEN_Inherit_MakeId(__STRING(t)))):\ t##__INHERIT_ID)))?1:0) /** * This macro gives up the inheritance for the given type. After this * macro has been executed there is no link left between the type and * its base type. * @param bt base type * @param t derived type */ #define GWEN_INHERIT_UNLINK(bt, t, element) {\ if (!t##__INHERIT_ID)\ t##__INHERIT_ID=GWEN_Inherit_MakeId(__STRING(t));\ bt##__INHERIT_UNLINK(element, __STRING(t), t##__INHERIT_ID);\ } /*@}*/ /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_INHERIT_P_H */ gwenhywfar-5.12.1/src/base/misc2.h0000644000175000017500000000325313142134463013575 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* now just a link to list2.h */ #ifndef GWENHYWFAR_MISC2_H #define GWENHYWFAR_MISC2_H #include #endif gwenhywfar-5.12.1/src/base/debug.h0000664000175000017500000002316114460564441013657 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Thu Nov 28 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_DEBUG_H #define GWEN_DEBUG_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #if (defined HAVE_FUNC && (DEBUGMODE>10)) # define DBG_ENTER fprintf(stderr,"Enter \""__func__"\" \n") # define DBG_LEAVE fprintf(stderr,"Leave \""__func__"\" \n") #else # define DBG_ENTER # define DBG_LEAVE #endif #define GWEN_MEMORY_DEBUG_MODE_ALL 0 #define GWEN_MEMORY_DEBUG_MODE_OPEN 1 #define GWEN_MEMORY_DEBUG_MODE_DETAILED 2 #define GWEN_MEMORY_DEBUG_MODE_SHORT 3 typedef struct GWEN_MEMORY_DEBUG_OBJECT GWEN_MEMORY_DEBUG_OBJECT; GWENHYWFAR_API void GWEN_MemoryDebug_Increment(const char *name, const char *wFile, int wLine, int attach); GWENHYWFAR_API void GWEN_MemoryDebug_Decrement(const char *name, const char *wFile, int wLine); GWENHYWFAR_API void GWEN_MemoryDebug_Dump(uint32_t mode); GWENHYWFAR_API void GWEN_MemoryDebug_DumpObject(const char *name, uint32_t mode); GWENHYWFAR_API long int GWEN_MemoryDebug_GetObjectCount(const char *name); GWENHYWFAR_API void GWEN_MemoryDebug_CleanUp(void); #ifdef GWEN_MEMORY_DEBUG # define DBG_MEM_INC(o, attach)\ GWEN_MemoryDebug_Increment(o, __FILE__, __LINE__, attach) # define DBG_MEM_DEC(o)\ GWEN_MemoryDebug_Decrement(o, __FILE__, __LINE__) #else # define DBG_MEM_INC(o, attach) # define DBG_MEM_DEC(o) #endif GWENHYWFAR_API uint32_t GWEN_Debug_Snprintf(char *buffer, uint32_t size, const char *fmt, ...); #ifndef NO_VARIADIC_MACROS # define DBG_ERROR(dbg_logger, format, ...) {\ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Error) {\ char dbg_buffer[300]; \ \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\ __FILE__":%5d: " format , __LINE__ , ## __VA_ARGS__)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=(char)0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Error, dbg_buffer);\ }\ }\ }; #else /* #ifndef NO_VARIADIC_MACROS */ GWENHYWFAR_API void DBG_ERROR(const char *logdomain, const char *format, ...); #endif /* #ifndef NO_VARIADIC_MACROS */ #define DBG_ERROR_ERR(dbg_logger, dbg_err) {\ char dbg_buffer[300]; \ char dbg_errbuff[256]; \ \ GWEN_Error_ToString(dbg_err,dbg_errbuff, sizeof(dbg_errbuff)); \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\ __FILE__":%5d: %s" , __LINE__ , dbg_errbuff)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Error, dbg_buffer);}; \ }; #ifndef NO_VARIADIC_MACROS # define DBG_WARN(dbg_logger, format, ...) {\ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Warning) {\ char dbg_buffer[300]; \ \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\ __FILE__":%5d: " format , __LINE__ , ## __VA_ARGS__)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=(char)0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Warning, dbg_buffer);\ }\ }\ }; #else /* #ifndef NO_VARIADIC_MACROS */ GWENHYWFAR_API void DBG_WARN(const char *logdomain, const char *format, ...); #endif /* #ifndef NO_VARIADIC_MACROS */ #define DBG_WARN_ERR(dbg_logger, dbg_err) {\ char dbg_buffer[300]; \ char dbg_errbuff[256]; \ GWEN_Error_ToString(dbg_err,dbg_errbuff, sizeof(dbg_errbuff)); \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\ __FILE__":%5d: %s" , __LINE__ , dbg_errbuff)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Warning, dbg_buffer);}; \ }; #ifndef NO_VARIADIC_MACROS # define DBG_NOTICE(dbg_logger, format, ...) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Notice) {\ char dbg_buffer[300]; \ \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\ __FILE__":%5d: " format , __LINE__ , ## __VA_ARGS__)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=(char)0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Notice, dbg_buffer);\ }\ }; #else /* #ifndef NO_VARIADIC_MACROS */ GWENHYWFAR_API void DBG_NOTICE(const char *logdomain, const char *format, ...); #endif /* #ifndef NO_VARIADIC_MACROS */ #define DBG_NOTICE_ERR(dbg_logger, dbg_err) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Notice) {\ char dbg_buffer[300]; \ char dbg_errbuff[256]; \ \ GWEN_Error_ToString(dbg_err,dbg_errbuff, sizeof(dbg_errbuff)); \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1, __FILE__":%5d: %s" , __LINE__ , dbg_errbuff)>0) {\ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Notice, dbg_buffer);\ } \ }; #ifndef NO_VARIADIC_MACROS # define DBG_INFO(dbg_logger, format, ...) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Info) {\ char dbg_buffer[300]; \ \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\ __FILE__":%5d: " format , __LINE__ , ## __VA_ARGS__)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=(char)0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Info, dbg_buffer);\ }\ }; #else /* #ifndef NO_VARIADIC_MACROS */ GWENHYWFAR_API void DBG_INFO(const char *logdomain, const char *format, ...); #endif /* #ifndef NO_VARIADIC_MACROS */ #define DBG_INFO_ERR(dbg_logger, dbg_err) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Info) {\ char dbg_buffer[300]; \ char dbg_errbuff[256]; \ \ GWEN_Error_ToString(dbg_err,dbg_errbuff, sizeof(dbg_errbuff)); \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1, __FILE__":%5d: %s" , __LINE__ , dbg_errbuff)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Info, dbg_buffer);\ }\ }; #ifndef DISABLE_DEBUGLOG # ifndef NO_VARIADIC_MACROS # define DBG_DEBUG(dbg_logger, format, ...) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Debug) {\ char dbg_buffer[300]; \ \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1, __FILE__":%5d: " format , __LINE__ , ## __VA_ARGS__)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Debug, dbg_buffer);\ }\ }; # define DBG_VERBOUS(dbg_logger, format, ...) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Verbous) {\ char dbg_buffer[300]; \ \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1, __FILE__":%5d: " format , __LINE__ , ## __VA_ARGS__)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Verbous, dbg_buffer);\ }\ }; # endif /* #ifndef NO_VARIADIC_MACROS */ # define DBG_DEBUG_ERR(dbg_logger, dbg_err) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Debug) {\ char dbg_buffer[300]; \ char dbg_errbuff[256]; \ \ GWEN_Error_ToString(dbg_err,dbg_errbuff, sizeof(dbg_errbuff)); \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1, __FILE__":%5d: %s" , __LINE__ , dbg_errbuff)>0) { \ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Debug, dbg_buffer);\ }\ }; # define DBG_VERBOUS_ERR(dbg_logger, dbg_err) \ if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevel_Verbous) {\ char dbg_buffer[300]; \ char dbg_errbuff[256]; \ \ GWEN_Error_ToString(dbg_err,dbg_errbuff, sizeof(dbg_errbuff)); \ if (snprintf(dbg_buffer, sizeof(dbg_buffer)-1, __FILE__":%5d: %s" , __LINE__ , dbg_errbuff)>0) {\ dbg_buffer[sizeof(dbg_buffer)-1]=0; \ GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevel_Verbous, dbg_buffer);\ }\ }; #else # ifndef NO_VARIADIC_MACROS # define DBG_DEBUG(dbg_logger, format, ...) # define DBG_VERBOUS(dbg_logger, format, ...) # endif /* ifndef NO_VARIADIC_MACROS */ # define DBG_DEBUG_ERR(dbg_logger, dbg_err) # define DBG_VERBOUS_ERR(dbg_logger, dbg_err) #endif /* DISABLE_DEBUGLOG */ #ifdef NO_VARIADIC_MACROS GWENHYWFAR_API void DBG_DEBUG(const char *logdomain, const char *format, ...); GWENHYWFAR_API void DBG_VERBOUS(const char *logdomain, const char *format, ...); #endif /* #ifdef NO_VARIADIC_MACROS */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/inherit_p.h0000644000175000017500000000407513142134463014544 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Dec 05 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_INHERIT_P_H #define GWENHYWFAR_INHERIT_P_H #include #include #include struct GWEN_INHERITDATA { GWEN_LIST_ELEMENT(GWEN_INHERITDATA) /* No trailing semicolon here because this is a macro call */ uint32_t id; void *data; void *baseData; GWEN_INHERIT_FREEDATAFN freeDataFn; char *typeName; }; #endif /* GWENHYWFAR_INHERIT_P_H */ gwenhywfar-5.12.1/src/base/multicache.c0000666000175000017500000004116113642701350014675 00000000000000/*************************************************************************** begin : Wed May 08 2013 copyright : (C) 2013 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "multicache_p.h" #include GWEN_LIST_FUNCTIONS(GWEN_MULTICACHE_ENTRY, GWEN_MultiCache_Entry); GWEN_IDMAP_FUNCTIONS(GWEN_MULTICACHE_ENTRY, GWEN_MultiCache_Entry); GWEN_LIST_FUNCTIONS(GWEN_MULTICACHE_TYPE, GWEN_MultiCache_Type); GWEN_MULTICACHE_ENTRY *GWEN_MultiCache_Entry_new(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *p, uint32_t i) { GWEN_MULTICACHE_ENTRY *e; GWEN_NEW_OBJECT(GWEN_MULTICACHE_ENTRY, e); GWEN_LIST_INIT(GWEN_MULTICACHE_ENTRY, e); e->cacheType=ct; e->id=id; e->dataPtr=p; e->dataSize=i; return e; } void GWEN_MultiCache_Entry_free(GWEN_MULTICACHE_ENTRY *e) { if (e) { GWEN_LIST_FINI(GWEN_MULTICACHE_ENTRY, e); GWEN_FREE_OBJECT(e); } } uint32_t GWEN_MultiCache_Entry_GetId(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->id; } uint32_t GWEN_MultiCache_Entry_GetDataSize(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->dataSize; } void *GWEN_MultiCache_Entry_GetDataPtr(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->dataPtr; } GWEN_MULTICACHE_TYPE *GWEN_MultiCache_Entry_GetCacheType(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->cacheType; } uint32_t GWEN_MultiCache_Entry_GetParam1(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->param1; } void GWEN_MultiCache_Entry_SetParam1(GWEN_MULTICACHE_ENTRY *e, uint32_t i) { assert(e); e->param1=i; } uint32_t GWEN_MultiCache_Entry_GetParam2(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->param2; } void GWEN_MultiCache_Entry_SetParam2(GWEN_MULTICACHE_ENTRY *e, uint32_t i) { assert(e); e->param2=i; } uint32_t GWEN_MultiCache_Entry_GetParam3(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->param3; } void GWEN_MultiCache_Entry_SetParam3(GWEN_MULTICACHE_ENTRY *e, uint32_t i) { assert(e); e->param3=i; } uint32_t GWEN_MultiCache_Entry_GetParam4(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->param4; } void GWEN_MultiCache_Entry_SetParam4(GWEN_MULTICACHE_ENTRY *e, uint32_t i) { assert(e); e->param4=i; } double GWEN_MultiCache_Entry_GetParam5(const GWEN_MULTICACHE_ENTRY *e) { assert(e); return e->param5; } void GWEN_MultiCache_Entry_SetParam5(GWEN_MULTICACHE_ENTRY *e, double d) { assert(e); e->param5=d; } GWEN_MULTICACHE_TYPE *GWEN_MultiCache_Type_new(GWEN_MULTICACHE *mc) { GWEN_MULTICACHE_TYPE *ct; GWEN_NEW_OBJECT(GWEN_MULTICACHE_TYPE, ct); GWEN_LIST_INIT(GWEN_MULTICACHE_TYPE, ct); ct->_refCount=1; ct->multiCache=mc; ct->entryMap=GWEN_MultiCache_Entry_IdMap_new(GWEN_IdMapAlgo_Hex4); return ct; } void GWEN_MultiCache_Type_free(GWEN_MULTICACHE_TYPE *ct) { if (ct) { assert(ct->_refCount); if (ct->_refCount==1) { GWEN_MultiCache_ReleaseEntriesForType(ct->multiCache, ct); GWEN_MultiCache_Entry_IdMap_free(ct->entryMap); GWEN_LIST_FINI(GWEN_MULTICACHE_TYPE, ct); ct->_refCount=0; GWEN_FREE_OBJECT(ct); } else ct->_refCount--; } } void *GWEN_MultiCache_Type_GetData(const GWEN_MULTICACHE_TYPE *ct, uint32_t id) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); e=(GWEN_MULTICACHE_ENTRY *)GWEN_MultiCache_Entry_IdMap_Find(ct->entryMap, id); if (e) { void *p; GWEN_MultiCache_UsingEntry(ct->multiCache, e); p=GWEN_MultiCache_Entry_GetDataPtr(e); GWEN_MultiCache_Type_AttachData(ct, p); GWEN_MultiCache_IncCacheHits(ct->multiCache); return p; } GWEN_MultiCache_IncCacheMisses(ct->multiCache); return NULL; } void *GWEN_MultiCache_Type_GetDataWithParams(const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); e=(GWEN_MULTICACHE_ENTRY *)GWEN_MultiCache_Entry_IdMap_Find(ct->entryMap, id); if (e) { if ((GWEN_MultiCache_Entry_GetParam1(e)==param1) && (GWEN_MultiCache_Entry_GetParam2(e)==param2) && (GWEN_MultiCache_Entry_GetParam3(e)==param3) && (GWEN_MultiCache_Entry_GetParam4(e)==param4)) { void *p; GWEN_MultiCache_UsingEntry(ct->multiCache, e); p=GWEN_MultiCache_Entry_GetDataPtr(e); GWEN_MultiCache_Type_AttachData(ct, p); GWEN_MultiCache_IncCacheHits(ct->multiCache); return p; } } GWEN_MultiCache_IncCacheMisses(ct->multiCache); return NULL; } void *GWEN_MultiCache_Type_GetDataWithParams5(const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); e=(GWEN_MULTICACHE_ENTRY *)GWEN_MultiCache_Entry_IdMap_Find(ct->entryMap, id); if (e) { if ((GWEN_MultiCache_Entry_GetParam1(e)==param1) && (GWEN_MultiCache_Entry_GetParam2(e)==param2) && (GWEN_MultiCache_Entry_GetParam3(e)==param3) && (GWEN_MultiCache_Entry_GetParam4(e)==param4) && (GWEN_MultiCache_Entry_GetParam5(e)==param5)) { void *p; GWEN_MultiCache_UsingEntry(ct->multiCache, e); p=GWEN_MultiCache_Entry_GetDataPtr(e); GWEN_MultiCache_Type_AttachData(ct, p); GWEN_MultiCache_IncCacheHits(ct->multiCache); return p; } } GWEN_MultiCache_IncCacheMisses(ct->multiCache); return NULL; } void GWEN_MultiCache_Type_SetData(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); GWEN_MultiCache_Type_PurgeData(ct, id); e=GWEN_MultiCache_Entry_new(ct, id, ptr, size); GWEN_MultiCache_AddEntry(ct->multiCache, e); GWEN_MultiCache_Entry_IdMap_Insert(ct->entryMap, id, (void *) e); } void GWEN_MultiCache_Type_SetDataWithParams(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); GWEN_MultiCache_Type_PurgeData(ct, id); e=GWEN_MultiCache_Entry_new(ct, id, ptr, size); GWEN_MultiCache_AddEntry(ct->multiCache, e); GWEN_MultiCache_Entry_SetParam1(e, param1); GWEN_MultiCache_Entry_SetParam2(e, param2); GWEN_MultiCache_Entry_SetParam3(e, param3); GWEN_MultiCache_Entry_SetParam4(e, param4); GWEN_MultiCache_Entry_IdMap_Insert(ct->entryMap, id, (void *) e); } void GWEN_MultiCache_Type_SetDataWithParams5(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); GWEN_MultiCache_Type_PurgeData(ct, id); e=GWEN_MultiCache_Entry_new(ct, id, ptr, size); GWEN_MultiCache_AddEntry(ct->multiCache, e); GWEN_MultiCache_Entry_SetParam1(e, param1); GWEN_MultiCache_Entry_SetParam2(e, param2); GWEN_MultiCache_Entry_SetParam3(e, param3); GWEN_MultiCache_Entry_SetParam4(e, param4); GWEN_MultiCache_Entry_SetParam5(e, param5); GWEN_MultiCache_Entry_IdMap_Insert(ct->entryMap, id, (void *) e); } void GWEN_MultiCache_Type_PurgeData(GWEN_MULTICACHE_TYPE *ct, uint32_t id) { GWEN_MULTICACHE_ENTRY *e; assert(ct); assert(ct->_refCount); e=(GWEN_MULTICACHE_ENTRY *)GWEN_MultiCache_Entry_IdMap_Find(ct->entryMap, id); if (e) GWEN_MultiCache_ReleaseEntry(ct->multiCache, e); } void GWEN_MultiCache_Type_PurgeAll(GWEN_MULTICACHE_TYPE *ct) { assert(ct); assert(ct->_refCount); GWEN_MultiCache_ReleaseEntriesForType(ct->multiCache, ct); } void GWEN_MultiCache_Type_SetAttachFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_FN fn) { assert(ct); assert(ct->_refCount); ct->attachFn=fn; } void GWEN_MultiCache_Type_SetFreeFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_FN fn) { assert(ct); assert(ct->_refCount); ct->freeFn=fn; } void GWEN_MultiCache_Type_SetAttachObjectFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN fn) { assert(ct); assert(ct->_refCount); ct->attachObjectFn=fn; } void GWEN_MultiCache_Type_SetFreeObjectFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN fn) { assert(ct); assert(ct->_refCount); ct->freeObjectFn=fn; } int GWEN_MultiCache_Type_AttachData(const GWEN_MULTICACHE_TYPE *ct, void *p) { assert(ct); assert(ct->_refCount); /* try attachObjectFn first, because that has THIS object as first argument */ if (ct->attachObjectFn) return ct->attachObjectFn(ct, p); if (ct->attachFn) return ct->attachFn(p); return GWEN_ERROR_NOT_IMPLEMENTED; } int GWEN_MultiCache_Type_FreeData(const GWEN_MULTICACHE_TYPE *ct, void *p) { assert(ct); assert(ct->_refCount); /* try freeObjectFn first, because that has THIS object as first argument */ if (ct->freeObjectFn) return ct->freeObjectFn(ct, p); if (ct->freeFn) return ct->freeFn(p); return GWEN_ERROR_NOT_IMPLEMENTED; } void GWEN_MultiCache_Type_ReleaseEntry(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_ENTRY *e) { assert(ct); assert(ct->_refCount); assert(e); GWEN_MultiCache_Entry_IdMap_Remove(ct->entryMap, GWEN_MultiCache_Entry_GetId(e)); } GWEN_IDLIST64 *GWEN_MultiCache_Type_GetIdsInCache(const GWEN_MULTICACHE_TYPE *ct) { GWEN_IDLIST64 *idList; GWEN_MULTICACHE_ENTRY *ce; assert(ct); assert(ct->_refCount); idList=GWEN_IdList64_new(); ce=GWEN_MultiCache_Entry_List_First(ct->multiCache->entryList); while (ce) { GWEN_MULTICACHE_ENTRY *ceNext; ceNext=GWEN_MultiCache_Entry_List_Next(ce); if (GWEN_MultiCache_Entry_GetCacheType(ce)==ct) { GWEN_IdList64_AddId(idList, ce->id); } ce=ceNext; } if (GWEN_IdList64_GetEntryCount(idList)<1) { GWEN_IdList64_free(idList); return NULL; } return idList; } GWEN_MULTICACHE *GWEN_MultiCache_new(uint64_t maxSize) { GWEN_MULTICACHE *mc; GWEN_NEW_OBJECT(GWEN_MULTICACHE, mc); mc->_refCount=1; mc->maxSize=maxSize; mc->typeList=GWEN_MultiCache_Type_List_new(); mc->entryList=GWEN_MultiCache_Entry_List_new(); return mc; } void GWEN_MultiCache_free(GWEN_MULTICACHE *mc) { if (mc) { assert(mc->_refCount); if (mc->_refCount==1) { GWEN_MULTICACHE_ENTRY *ce; ce=GWEN_MultiCache_Entry_List_First(mc->entryList); while (ce) { GWEN_MultiCache_ReleaseEntry(mc, ce); ce=GWEN_MultiCache_Entry_List_First(mc->entryList); } GWEN_MultiCache_Entry_List_free(mc->entryList); GWEN_MultiCache_Type_List_free(mc->typeList); DBG_NOTICE(GWEN_LOGDOMAIN, "MultiCache usage: " "%" PRIu64 " hits, " "%" PRIu64 " misses, " "%" PRIu64 " drops, " "%" PRIu64 " mb max memory used from " "%" PRIu64 " mb " "(%d %%)", (uint64_t) mc->cacheHits, (uint64_t) mc->cacheMisses, (uint64_t) mc->cacheDrops, (uint64_t)((mc->maxSizeUsed)/(1024*1024)), (uint64_t)((mc->maxSize)/(1024*1024)), (int)((mc->maxSizeUsed)*100.0/mc->maxSize)); mc->_refCount=0; GWEN_FREE_OBJECT(mc); } else mc->_refCount--; } } int GWEN_MultiCache_GetUsageString(const GWEN_MULTICACHE *mc, char *ptrBuffer, int lenBuffer) { size_t len; uint64_t totalCacheOps; int hitPercentage=0; totalCacheOps=mc->cacheHits+mc->cacheMisses; if (totalCacheOps) hitPercentage=((mc->cacheHits)*100)/totalCacheOps; len=snprintf(ptrBuffer, lenBuffer, "MultiCache usage: " "%" PRIu64 " hits (%d %%), " "%" PRIu64 " misses, " "%" PRIu64 " drops, " "%" PRIu64 " mb max memory used from " "%" PRIu64 " mb " "(%d %%)", (uint64_t) mc->cacheHits, hitPercentage, (uint64_t) mc->cacheMisses, (uint64_t) mc->cacheDrops, (uint64_t)((mc->maxSizeUsed)/(1024*1024)), (uint64_t)((mc->maxSize)/(1024*1024)), (int)((mc->maxSizeUsed)*100.0/mc->maxSize)); if (len>=(size_t)lenBuffer) { DBG_ERROR(GWEN_LOGDOMAIN, "Buffer too small (%" PRIu64 " < %" PRIu64, (uint64_t) lenBuffer, (uint64_t) len); return GWEN_ERROR_BUFFER_OVERFLOW; } ptrBuffer[len]=0; return 0; } uint64_t GWEN_MultiCache_GetMaxSizeUsed(const GWEN_MULTICACHE *mc) { assert(mc); assert(mc->_refCount); return mc->maxSizeUsed; } int GWEN_MultiCache_AddEntry(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_ENTRY *e) { uint32_t esize; assert(mc); assert(mc->_refCount); assert(e); esize=GWEN_MultiCache_Entry_GetDataSize(e); if ((mc->currentSize+esize)>mc->maxSize) { int64_t nsize; /* make room */ nsize=(mc->currentSize+esize)-mc->maxSize; while (nsize>0) { GWEN_MULTICACHE_ENTRY *ce; ce=GWEN_MultiCache_Entry_List_First(mc->entryList); if (ce) { nsize-=GWEN_MultiCache_Entry_GetDataSize(ce); GWEN_MultiCache_ReleaseEntry(mc, ce); mc->cacheDrops++; } else { DBG_ERROR(GWEN_LOGDOMAIN, "No entry left to release, cache size limit too low"); return GWEN_ERROR_MEMORY_FULL; } } } mc->currentSize+=esize; if (mc->currentSize>mc->maxSizeUsed) mc->maxSizeUsed=mc->currentSize; GWEN_MultiCache_Type_AttachData(GWEN_MultiCache_Entry_GetCacheType(e), GWEN_MultiCache_Entry_GetDataPtr(e)); GWEN_MultiCache_Entry_List_Add(e, mc->entryList); return 0; } void GWEN_MultiCache_ReleaseEntry(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_ENTRY *e) { uint32_t esize; assert(mc); assert(mc->_refCount); assert(e); assert(e->cacheType); /* remove from list first */ GWEN_MultiCache_Entry_List_Del(e); /* release from type's idmap */ GWEN_MultiCache_Type_ReleaseEntry(GWEN_MultiCache_Entry_GetCacheType(e), e); /* release */ esize=GWEN_MultiCache_Entry_GetDataSize(e); GWEN_MultiCache_Type_FreeData(e->cacheType, GWEN_MultiCache_Entry_GetDataPtr(e)); GWEN_MultiCache_Entry_free(e); mc->currentSize-=esize; } void GWEN_MultiCache_ReleaseEntriesForType(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_TYPE *ct) { GWEN_MULTICACHE_ENTRY *ce; assert(mc); assert(mc->_refCount); assert(ct); ce=GWEN_MultiCache_Entry_List_First(mc->entryList); while (ce) { GWEN_MULTICACHE_ENTRY *ceNext; ceNext=GWEN_MultiCache_Entry_List_Next(ce); if (GWEN_MultiCache_Entry_GetCacheType(ce)==ct) GWEN_MultiCache_ReleaseEntry(mc, ce); ce=ceNext; } } void GWEN_MultiCache_UsingEntry(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_ENTRY *e) { assert(mc); assert(mc->_refCount); /* move cache entry to the end of the list */ GWEN_MultiCache_Entry_List_Del(e); GWEN_MultiCache_Entry_List_Add(e, mc->entryList); } void GWEN_MultiCache_IncCacheHits(GWEN_MULTICACHE *mc) { assert(mc); assert(mc->_refCount); mc->cacheHits++; } void GWEN_MultiCache_IncCacheMisses(GWEN_MULTICACHE *mc) { assert(mc); assert(mc->_refCount); mc->cacheMisses++; } gwenhywfar-5.12.1/src/base/pathmanager_l.h0000644000175000017500000000355213142134463015364 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PATHMANAGER_L_H #define GWENHYWFAR_PATHMANAGER_L_H #include int GWEN_PathManager_ModuleInit(void); int GWEN_PathManager_ModuleFini(void); #endif /* GWENHYWFAR_PATHMANAGER_H */ gwenhywfar-5.12.1/src/base/funcs.c0000664000175000017500000000627514203160131013670 00000000000000/*************************************************************************** begin : Wed Feb 15 2022 copyright : (C) 2022 by Ralf Habacker email : ralf.habacker@freenet.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "funcs.h" #include int GWEN_Funcs_Has_Call(const GWEN_FUNCS *func) { return func->func1!=NULL; } int GWEN_Funcs_Has_Call_Args(const GWEN_FUNCS *func) { return func->func2!=NULL; } int GWEN_Funcs_Has_Call_DB_NODE_Args(const GWEN_FUNCS *func) { return func->func3!=NULL; } int GWEN_Funcs_Call(const GWEN_FUNCS *func) { return func->func1(); } int GWEN_Funcs_Call_Args(const GWEN_FUNCS *func, int argc, char **argv) { return func->func2(argc, argv); } int GWEN_Funcs_Call_DB_NODE_Args(const GWEN_FUNCS *func, GWEN_DB_NODE *node, int argc, char **argv) { return func->func3(node, argc, argv); } /** * This function prints out a space separated list of all defined functions */ void GWEN_Funcs_Usage(const GWEN_FUNCS *funcs) { const GWEN_FUNCS *p; for (p=funcs; p->name; p++) { fprintf(stderr, " %s", p->name); if (p->description) fprintf(stderr, " (%s)", p->description); } fprintf(stderr, "\n"); } /** * This function prints out list of all defined functions including the description */ void GWEN_Funcs_Usage_With_Help(const GWEN_FUNCS *funcs) { const GWEN_FUNCS *p; for (p=funcs; p->name; p++) { fprintf(stderr, " %s:\n %s\n\n", p->name, p->description ? p->description : ""); } } /** * This function returns a pointer to the function identified by \p name * or NULL if function has not been found. */ const GWEN_FUNCS* GWEN_Funcs_Find(const GWEN_FUNCS *funcs, const char *name) { const GWEN_FUNCS *p; for (p=funcs; p->name; p++) { if (strcasecmp(name, p->name)==0) return p; } return NULL; } gwenhywfar-5.12.1/src/base/plugin.c0000664000175000017500000005454414460564441014073 00000000000000/*************************************************************************** begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "plugin_p.h" #include #include #ifdef OS_WIN32 # include #endif static GWEN_PLUGIN_MANAGER_LIST *gwen_plugin_manager__list=0; GWEN_INHERIT_FUNCTIONS(GWEN_PLUGIN) GWEN_LIST_FUNCTIONS(GWEN_PLUGIN, GWEN_Plugin) GWEN_INHERIT_FUNCTIONS(GWEN_PLUGIN_MANAGER) GWEN_LIST_FUNCTIONS(GWEN_PLUGIN_MANAGER, GWEN_PluginManager) static void _setLibLoader(GWEN_PLUGIN *p, GWEN_LIBLOADER *ll); static GWEN_PLUGIN *_findPluginInListByName(GWEN_PLUGIN_MANAGER *pm, const char *s); static GWEN_PLUGIN *_createPluginFromLibloader(GWEN_PLUGIN_MANAGER *pm, GWEN_LIBLOADER *libLoader, const char *modname); static GWEN_LIBLOADER *_searchAndLoadModule(GWEN_PLUGIN_MANAGER *pm, const char *modname); static GWEN_PLUGIN_DESCRIPTION_LIST2 *_getPluginDescrsFromPluginList(GWEN_PLUGIN_MANAGER *pm); static GWEN_PLUGIN_DESCRIPTION_LIST2 *_loadPluginDescrs(GWEN_PLUGIN_MANAGER *pm); static GWEN_PLUGIN_DESCRIPTION_LIST2 *_combinedPluginDescrList(const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlLoaded, const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlFromPluginList); static GWEN_PLUGIN_DESCRIPTION *_findPluginDescrByNameInList2(const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl, const char *name); /*static void _dumpDescriptorList(const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl, const char *text);*/ int GWEN_Plugin_ModuleInit(void) { gwen_plugin_manager__list=GWEN_PluginManager_List_new(); return 0; } int GWEN_Plugin_ModuleFini(void) { GWEN_PluginManager_List_free(gwen_plugin_manager__list); return 0; } GWEN_PLUGIN *GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName) { GWEN_PLUGIN *p; assert(pm); assert(name); GWEN_NEW_OBJECT(GWEN_PLUGIN, p); DBG_MEM_INC("GWEN_PLUGIN", 0); p->refCount=1; GWEN_INHERIT_INIT(GWEN_PLUGIN, p); GWEN_LIST_INIT(GWEN_PLUGIN, p); p->manager=pm; p->name=strdup(name); if (fileName) p->fileName=strdup(fileName); return p; } void GWEN_Plugin_free(GWEN_PLUGIN *p) { if (p) { DBG_MEM_DEC("GWEN_PLUGIN"); assert(p->refCount); if (--(p->refCount)==0) { GWEN_INHERIT_FINI(GWEN_PLUGIN, p); GWEN_PluginDescription_free(p->pluginDescription); free(p->name); free(p->fileName); if (p->libLoader) { GWEN_LibLoader_CloseLibrary(p->libLoader); GWEN_LibLoader_free(p->libLoader); } GWEN_LIST_FINI(GWEN_PLUGIN, p); GWEN_FREE_OBJECT(p); } /* if refCount reaches zero */ } /* if p */ } void GWEN_Plugin_Attach(GWEN_PLUGIN *p) { assert(p); assert(p->refCount); DBG_MEM_INC("GWEN_PLUGIN", 1); p->refCount++; } GWEN_PLUGIN_MANAGER *GWEN_Plugin_GetManager(const GWEN_PLUGIN *p) { assert(p); return p->manager; } const char *GWEN_Plugin_GetName(const GWEN_PLUGIN *p) { assert(p); return p->name; } const char *GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p) { assert(p); return p->fileName; } GWEN_LIBLOADER *GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p) { assert(p); return p->libLoader; } void _setLibLoader(GWEN_PLUGIN *p, GWEN_LIBLOADER *ll) { assert(p); p->libLoader=ll; } const GWEN_PLUGIN_DESCRIPTION *GWEN_Plugin_GetPluginDescription(const GWEN_PLUGIN *p) { assert(p); return p->pluginDescription; } void GWEN_Plugin_SetPluginDescription(GWEN_PLUGIN *p, GWEN_PLUGIN_DESCRIPTION *pd) { assert(p); if (p->pluginDescription) GWEN_PluginDescription_free(p->pluginDescription); p->pluginDescription=pd; } GWEN_PLUGIN_MANAGER *GWEN_PluginManager_new(const char *name, const char *destLib) { GWEN_PLUGIN_MANAGER *pm; assert(name); assert(destLib); GWEN_NEW_OBJECT(GWEN_PLUGIN_MANAGER, pm); DBG_MEM_INC("GWEN_PLUGIN_MANAGER", 0); GWEN_INHERIT_INIT(GWEN_PLUGIN_MANAGER, pm); GWEN_LIST_INIT(GWEN_PLUGIN_MANAGER, pm); pm->name=strdup(name); pm->destLib=strdup(destLib); pm->plugins=GWEN_Plugin_List_new(); return pm; } void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm) { if (pm) { DBG_MEM_DEC("GWEN_PLUGIN_MANAGER"); GWEN_Plugin_List_free(pm->plugins); GWEN_INHERIT_FINI(GWEN_PLUGIN_MANAGER, pm); free(pm->destLib); free(pm->name); GWEN_LIST_FINI(GWEN_PLUGIN_MANAGER, pm); GWEN_FREE_OBJECT(pm); } } const char *GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm) { assert(pm); return pm->name; } int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *s) { assert(pm); return GWEN_PathManager_AddPath(callingLib, pm->destLib, pm->name, s); } int GWEN_PluginManager_AddRelPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *s, GWEN_PATHMANAGER_RELMODE rm) { assert(pm); return GWEN_PathManager_AddRelPath(callingLib, pm->destLib, pm->name, s, rm); } int GWEN_PluginManager_InsertPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *s) { assert(pm); return GWEN_PathManager_InsertPath(callingLib, pm->destLib, pm->name, s); } int GWEN_PluginManager_InsertRelPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *relpath, GWEN_PATHMANAGER_RELMODE rm) { assert(pm); return GWEN_PathManager_InsertRelPath(callingLib, pm->destLib, pm->name, relpath, rm); } int GWEN_PluginManager_RemovePath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *s) { assert(pm); return GWEN_PathManager_RemovePath(callingLib, pm->destLib, pm->name, s); } #ifdef OS_WIN32 int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *keypath, const char *varname) { HKEY hkey; TCHAR nbuffer[MAX_PATH]; BYTE vbuffer[MAX_PATH]; DWORD nsize; DWORD vsize; DWORD typ; int i; assert(pm); snprintf(nbuffer, sizeof(nbuffer), keypath); /* open the key */ if (RegOpenKey(HKEY_LOCAL_MACHINE, nbuffer, &hkey)) { DBG_INFO(GWEN_LOGDOMAIN, "RegOpenKey %s failed.", keypath); return 1; } /* find the variablename */ for (i=0;; i++) { nsize=sizeof(nbuffer); vsize=sizeof(vbuffer); if (ERROR_SUCCESS!=RegEnumValue(hkey, i, /* index */ nbuffer, &nsize, 0, /* reserved */ &typ, vbuffer, &vsize)) break; if (strcasecmp(nbuffer, varname)==0 && typ==REG_SZ) { /* variable found */ RegCloseKey(hkey); return GWEN_PathManager_AddPath(callingLib, pm->destLib, pm->name, (char *)vbuffer); } } /* for */ RegCloseKey(hkey); DBG_INFO(GWEN_LOGDOMAIN, "In RegKey \"%s\" the variable \"%s\" does not exist", keypath, varname); return 1; } #else /* OS_WIN32 */ int GWEN_PluginManager_AddPathFromWinReg(GWEN_UNUSED GWEN_PLUGIN_MANAGER *pm, GWEN_UNUSED const char *callingLib, GWEN_UNUSED const char *keypath, GWEN_UNUSED const char *varname) { return 0; } #endif /* OS_WIN32 */ GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm, const char *modname) { GWEN_LIBLOADER *libLoader; GWEN_PLUGIN *plugin; libLoader=_searchAndLoadModule(pm, modname); if (libLoader==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "No suitable module found for %s/%s", pm->name, modname); return NULL; } plugin=_createPluginFromLibloader(pm, libLoader, modname); if (plugin==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Could not create plugin from module"); GWEN_LibLoader_CloseLibrary(libLoader); GWEN_LibLoader_free(libLoader); return NULL; } _setLibLoader(plugin, libLoader); return plugin; } GWEN_LIBLOADER *_searchAndLoadModule(GWEN_PLUGIN_MANAGER *pm, const char *modname) { GWEN_LIBLOADER *libLoader; GWEN_BUFFER *nbuf; const char *s; GWEN_STRINGLIST *pathList; GWEN_STRINGLISTENTRY *se; assert(pm); libLoader=GWEN_LibLoader_new(); pathList=GWEN_PathManager_GetPaths(pm->destLib, pm->name); if (pathList==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No paths for plugins (%s)", pm->name); GWEN_LibLoader_free(libLoader); return NULL; } nbuf=GWEN_Buffer_new(0, 128, 0, 1); s=modname; while (*s) GWEN_Buffer_AppendByte(nbuf, tolower(*(s++))); se=GWEN_StringList_FirstEntry(pathList); while (se) { const char *fname; fname=GWEN_StringListEntry_Data(se); assert(fname); if (GWEN_LibLoader_OpenLibraryWithPath(libLoader, fname, GWEN_Buffer_GetStart(nbuf))==0) break; else { DBG_DEBUG(GWEN_LOGDOMAIN, "Could not load plugin \"%s\" from \"%s\"", modname, fname); } se=GWEN_StringListEntry_Next(se); } /* while */ if (!se) { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin \"%s\" not found.", modname); GWEN_Buffer_free(nbuf); GWEN_StringList_free(pathList); GWEN_LibLoader_free(libLoader); return NULL; } GWEN_Buffer_free(nbuf); GWEN_StringList_free(pathList); return libLoader; } GWEN_PLUGIN *_createPluginFromLibloader(GWEN_PLUGIN_MANAGER *pm, GWEN_LIBLOADER *libLoader, const char *modname) { GWEN_BUFFER *nbuf; const char *s; int err; GWEN_PLUGIN *plugin; GWEN_PLUGIN_FACTORYFN fn; void *p; /* create name of init function */ nbuf=GWEN_Buffer_new(0, 128, 0, 1); s=pm->name; while (*s) GWEN_Buffer_AppendByte(nbuf, tolower(*(s++))); GWEN_Buffer_AppendByte(nbuf, '_'); s=modname; while (*s) GWEN_Buffer_AppendByte(nbuf, tolower(*(s++))); GWEN_Buffer_AppendString(nbuf, "_factory"); /* resolve name of factory function */ err=GWEN_LibLoader_Resolve(libLoader, GWEN_Buffer_GetStart(nbuf), &p); if (err) { DBG_ERROR_ERR(GWEN_LOGDOMAIN, err); GWEN_Buffer_free(nbuf); return NULL; } GWEN_Buffer_free(nbuf); fn=(GWEN_PLUGIN_FACTORYFN)p; assert(fn); plugin=fn(pm, modname, ""); if (!plugin) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in plugin: No plugin created for %s/%s", pm->name, modname); return NULL; } else { GWEN_PLUGIN_DESCRIPTION *pd; pd=GWEN_PluginDescription_new(); GWEN_PluginDescription_SetName(pd, modname); GWEN_PluginDescription_SetType(pd, pm->name); GWEN_Plugin_SetPluginDescription(plugin, pd); } return plugin; } GWEN_PLUGIN *GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm, const char *modname, const char *fname) { GWEN_LIBLOADER *ll; GWEN_PLUGIN *plugin; GWEN_PLUGIN_FACTORYFN fn; void *p; GWEN_BUFFER *nbuf; const char *s; int err; ll=GWEN_LibLoader_new(); if (GWEN_LibLoader_OpenLibrary(ll, fname)) { DBG_INFO(GWEN_LOGDOMAIN, "Could not load plugin \"%s\" (%s)", modname, fname); GWEN_LibLoader_free(ll); return 0; } /* create name of init function */ nbuf=GWEN_Buffer_new(0, 128, 0, 1); s=pm->name; while (*s) GWEN_Buffer_AppendByte(nbuf, tolower(*(s++))); GWEN_Buffer_AppendByte(nbuf, '_'); s=modname; while (*s) GWEN_Buffer_AppendByte(nbuf, tolower(*(s++))); GWEN_Buffer_AppendString(nbuf, "_factory"); /* resolve name of factory function */ err=GWEN_LibLoader_Resolve(ll, GWEN_Buffer_GetStart(nbuf), &p); if (err) { DBG_INFO_ERR(GWEN_LOGDOMAIN, err); GWEN_Buffer_free(nbuf); GWEN_LibLoader_CloseLibrary(ll); GWEN_LibLoader_free(ll); return 0; } GWEN_Buffer_free(nbuf); fn=(GWEN_PLUGIN_FACTORYFN)p; assert(fn); plugin=fn(pm, modname, fname); if (!plugin) { DBG_INFO(GWEN_LOGDOMAIN, "Error in plugin: No plugin created"); GWEN_LibLoader_CloseLibrary(ll); GWEN_LibLoader_free(ll); return 0; } /* store libloader */ _setLibLoader(plugin, ll); return plugin; } GWEN_PLUGIN *GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm, const char *s) { GWEN_PLUGIN *p; p=_findPluginInListByName(pm, s); if (p) { DBG_INFO(GWEN_LOGDOMAIN, "Returning plugin \"%s\" from internal list", s); return p; } DBG_INFO(GWEN_LOGDOMAIN, "Trying to load plugin \"%s\"", s); p=GWEN_PluginManager_LoadPlugin(pm, s); if (p) { GWEN_Plugin_List_Add(p, pm->plugins); DBG_INFO(GWEN_LOGDOMAIN, "Plugin \"%s\" loaded and added to internal list", s); return p; } DBG_INFO(GWEN_LOGDOMAIN, "Plugin \"%s\" not found", s); return 0; } GWEN_PLUGIN_MANAGER *GWEN_PluginManager_FindPluginManager(const char *s) { GWEN_PLUGIN_MANAGER *pm; pm=GWEN_PluginManager_List_First(gwen_plugin_manager__list); while (pm) { if (strcasecmp(pm->name, s)==0) break; pm=GWEN_PluginManager_List_Next(pm); } return pm; } int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm) { GWEN_PLUGIN_MANAGER *tpm; int rv; assert(gwen_plugin_manager__list); assert(pm); tpm=GWEN_PluginManager_FindPluginManager(pm->name); if (tpm) { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin type \"%s\" already registered", pm->name); return -1; } rv=GWEN_PathManager_DefinePath(pm->destLib, pm->name); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "Could not define path for plugin [%s:%s]", pm->destLib, pm->name); return rv; } GWEN_PluginManager_List_Add(pm, gwen_plugin_manager__list); DBG_INFO(GWEN_LOGDOMAIN, "Plugin type \"%s\" registered", pm->name); return 0; } int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm) { GWEN_PLUGIN_MANAGER *tpm; int rv; assert(gwen_plugin_manager__list); assert(pm); tpm=GWEN_PluginManager_FindPluginManager(pm->name); if (!tpm) { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin type \"%s\" not registered", pm->name); return -1; } rv=GWEN_PathManager_UndefinePath(pm->destLib, pm->name); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "Could not undefine path for plugin [%s:%s]", pm->destLib, pm->name); return rv; } GWEN_PluginManager_List_Del(pm); DBG_INFO(GWEN_LOGDOMAIN, "Plugin type \"%s\" unregistered", pm->name); return 0; } GWEN_PLUGIN_DESCRIPTION_LIST2 *GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm) { GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlLoaded; GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlFromPluginList; pdlFromPluginList=_getPluginDescrsFromPluginList(pm); pdlLoaded=_loadPluginDescrs(pm); if (pdlFromPluginList && pdlLoaded){ GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlOut; pdlOut=_combinedPluginDescrList(pdlLoaded, pdlFromPluginList); GWEN_PluginDescription_List2_freeAll(pdlFromPluginList); GWEN_PluginDescription_List2_freeAll(pdlLoaded); return pdlOut; } else if (pdlFromPluginList) { return pdlFromPluginList; } else return pdlLoaded; } GWEN_STRINGLIST *GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm) { assert(pm); return GWEN_PathManager_GetPaths(pm->destLib, pm->name); } GWEN_PLUGIN_DESCRIPTION *GWEN_PluginManager_GetPluginDescr(GWEN_PLUGIN_MANAGER *pm, const char *modName) { GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl; pdl=GWEN_PluginManager_GetPluginDescrs(pm); if (pdl) { GWEN_PLUGIN_DESCRIPTION *pd; pd=_findPluginDescrByNameInList2(pdl, modName); if (pd) { GWEN_PluginDescription_Attach(pd); GWEN_PluginDescription_List2_freeAll(pdl); return pd; } GWEN_PluginDescription_List2_freeAll(pdl); } return NULL; } void GWEN_PluginManager_AddPlugin(GWEN_PLUGIN_MANAGER *pm, GWEN_PLUGIN *p) { const char *modname; modname=GWEN_Plugin_GetName(p); if (modname && *modname) { const GWEN_PLUGIN_DESCRIPTION *pdInPlugin; pdInPlugin=GWEN_Plugin_GetPluginDescription(p); if (pdInPlugin==NULL) { GWEN_PLUGIN_DESCRIPTION *pd; DBG_INFO(GWEN_LOGDOMAIN, "No plugin description for \"%s\", creating one", modname); pd=GWEN_PluginDescription_new(); GWEN_PluginDescription_SetName(pd, modname); GWEN_PluginDescription_SetType(pd, pm->name); GWEN_Plugin_SetPluginDescription(p, pd); } DBG_INFO(GWEN_LOGDOMAIN, "Adding plugin [%s] of type [%s]", modname, pm->name); GWEN_Plugin_List_Add(p, pm->plugins); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin to add has no name (type %s), not adding", pm->name); } } GWEN_PLUGIN *_findPluginInListByName(GWEN_PLUGIN_MANAGER *pm, const char *s) { GWEN_PLUGIN *p; assert(pm); p=GWEN_Plugin_List_First(pm->plugins); while (p) { if (strcasecmp(p->name, s)==0) break; p=GWEN_Plugin_List_Next(p); } return p; } GWEN_PLUGIN_DESCRIPTION_LIST2 *_getPluginDescrsFromPluginList(GWEN_PLUGIN_MANAGER *pm) { GWEN_PLUGIN *p; assert(pm); p=GWEN_Plugin_List_First(pm->plugins); if (p) { GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl; pdl=GWEN_PluginDescription_List2_new(); while (p) { const GWEN_PLUGIN_DESCRIPTION *pd; pd=GWEN_Plugin_GetPluginDescription(p); if (pd) GWEN_PluginDescription_List2_PushBack(pdl, GWEN_PluginDescription_dup(pd)); p=GWEN_Plugin_List_Next(p); } /* while(p) */ if (GWEN_PluginDescription_List2_GetSize(pdl)==0) { GWEN_PluginDescription_List2_free(pdl); return NULL; } return pdl; } return NULL; } GWEN_PLUGIN_DESCRIPTION_LIST2 *_loadPluginDescrs(GWEN_PLUGIN_MANAGER *pm) { GWEN_PLUGIN_DESCRIPTION_LIST2 *pl; GWEN_STRINGLIST *sl; GWEN_STRINGLISTENTRY *se; sl=GWEN_PathManager_GetPaths(pm->destLib, pm->name); if (sl==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No paths for plugins (%s)", pm->name); return NULL; } se=GWEN_StringList_FirstEntry(sl); if (!se) { DBG_ERROR(GWEN_LOGDOMAIN, "No paths given"); GWEN_StringList_free(sl); return 0; } pl=GWEN_PluginDescription_List2_new(); while (se) { int rv; const char *path; path=GWEN_StringListEntry_Data(se); assert(path); rv=GWEN_LoadPluginDescrsByType(path, pm->name, pl); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "Error loading plugin description in \"%s\"", path); } se=GWEN_StringListEntry_Next(se); } /* while */ if (GWEN_PluginDescription_List2_GetSize(pl)==0) { GWEN_PluginDescription_List2_free(pl); GWEN_StringList_free(sl); return 0; } GWEN_StringList_free(sl); return pl; } GWEN_PLUGIN_DESCRIPTION_LIST2 *_combinedPluginDescrList(const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlLoaded, const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlFromPluginList) { GWEN_PLUGIN_DESCRIPTION_LIST2 *pdlOut; GWEN_PLUGIN_DESCRIPTION_LIST2_ITERATOR *iter; pdlOut=GWEN_PluginDescription_List2_new(); /* first add entries from loaded list (more details in those entries) */ iter=GWEN_PluginDescription_List2_First(pdlLoaded); if (iter) { GWEN_PLUGIN_DESCRIPTION *pd=NULL; pd=GWEN_PluginDescription_List2Iterator_Data(iter); while(pd) { GWEN_PluginDescription_Attach(pd); GWEN_PluginDescription_List2_PushBack(pdlOut, pd); pd=GWEN_PluginDescription_List2Iterator_Next(iter); } GWEN_PluginDescription_List2Iterator_free(iter); } /* only add those entries from pluginList which are not already in the output list */ iter=GWEN_PluginDescription_List2_First(pdlFromPluginList); if (iter) { GWEN_PLUGIN_DESCRIPTION *pd=NULL; pd=GWEN_PluginDescription_List2Iterator_Data(iter); while(pd) { const char *name; name=GWEN_PluginDescription_GetName(pd); if (name && *name && NULL==_findPluginDescrByNameInList2(pdlOut, name)) { GWEN_PluginDescription_Attach(pd); GWEN_PluginDescription_List2_PushBack(pdlOut, pd); } pd=GWEN_PluginDescription_List2Iterator_Next(iter); } GWEN_PluginDescription_List2Iterator_free(iter); } if (GWEN_PluginDescription_List2_GetSize(pdlOut)==0) { GWEN_PluginDescription_List2_free(pdlOut); return NULL; } return pdlOut; } GWEN_PLUGIN_DESCRIPTION *_findPluginDescrByNameInList2(const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl, const char *name) { GWEN_PLUGIN_DESCRIPTION_LIST2_ITERATOR *iter; GWEN_PLUGIN_DESCRIPTION *pd=NULL; iter=GWEN_PluginDescription_List2_First(pdl); if (iter) { pd=GWEN_PluginDescription_List2Iterator_Data(iter); while(pd) { const char *nameInList; nameInList=GWEN_PluginDescription_GetName(pd); if (nameInList && *nameInList && strcasecmp(nameInList, name)==0) break; pd=GWEN_PluginDescription_List2Iterator_Next(iter); } GWEN_PluginDescription_List2Iterator_free(iter); } return pd; } #if 0 void _dumpDescriptorList(const GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl, const char *text) { fprintf(stderr, "Descriptor List: %s\n", text?text:""); if (pdl) { GWEN_PLUGIN_DESCRIPTION_LIST2_ITERATOR *iter; iter=GWEN_PluginDescription_List2_First(pdl); if (iter) { GWEN_PLUGIN_DESCRIPTION *pd=NULL; pd=GWEN_PluginDescription_List2Iterator_Data(iter); while(pd) { const char *name; name=GWEN_PluginDescription_GetName(pd); fprintf(stderr, "- %s\n", name?name:""); pd=GWEN_PluginDescription_List2Iterator_Next(iter); } GWEN_PluginDescription_List2Iterator_free(iter); } } else { fprintf(stderr, "- \n"); } } #endif gwenhywfar-5.12.1/src/base/stringlist.c0000664000175000017500000004545614465013270014773 00000000000000/*************************************************************************** begin : Thu Apr 03 2003 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include #include #include #include "stringlist_p.h" #include "debug.h" #include #include #include #include #ifdef HAVE_STRINGS_H # include #endif GWEN_STRINGLIST *GWEN_StringList_new(void) { GWEN_STRINGLIST *sl; GWEN_NEW_OBJECT(GWEN_STRINGLIST, sl); assert(sl); sl->ignoreRefCount=1; return sl; } void GWEN_StringList_free(GWEN_STRINGLIST *sl) { GWEN_STRINGLISTENTRY *curr, *next; if (sl) { curr=sl->first; while (curr) { next=curr->next; GWEN_StringListEntry_free(curr); curr=next; } /* while */ GWEN_FREE_OBJECT(sl); } } void GWEN_StringList_SetSenseCase(GWEN_STRINGLIST *sl, int i) { assert(sl); sl->senseCase=i; } void GWEN_StringList_SetIgnoreRefCount(GWEN_STRINGLIST *sl, int i) { assert(sl); sl->ignoreRefCount=i; } GWEN_STRINGLISTENTRY *GWEN_StringListEntry_new(const char *s, int take) { GWEN_STRINGLISTENTRY *sl; GWEN_NEW_OBJECT(GWEN_STRINGLISTENTRY, sl); assert(sl); sl->refCount=1; if (s) { if (take) sl->data=s; else sl->data=strdup(s); } return sl; } void GWEN_StringListEntry_ReplaceString(GWEN_STRINGLISTENTRY *e, const char *s, int take) { assert(e); if (e->data) free((void *)(e->data)); if (take) e->data=s; else e->data=strdup(s); } void GWEN_StringListEntry_free(GWEN_STRINGLISTENTRY *sl) { if (sl) { if (sl->data) free((void *)(sl->data)); GWEN_FREE_OBJECT(sl); } } void GWEN_StringList_AppendEntry(GWEN_STRINGLIST *sl, GWEN_STRINGLISTENTRY *se) { GWEN_STRINGLISTENTRY *curr; assert(sl); assert(se); curr=sl->first; if (!curr) { sl->first=se; } else { while (curr->next) { curr=curr->next; } curr->next=se; } sl->count++; } GWEN_STRINGLIST *GWEN_StringList_fromTabString(const char *s, int checkDup) { GWEN_STRINGLIST *sl; sl=GWEN_StringList_new(); if (s && *s) { while (*s) { const char *t; char *tmpStr; t=strchr(s, '\t'); if (t) { int len; len=(t-s); tmpStr=(char *) malloc(len+1); assert(tmpStr); memmove(tmpStr, s, len); tmpStr[len]=0; /* add partial string, take it over */ GWEN_StringList_AppendString(sl, tmpStr, 1, checkDup); s=t+1; } else { /* just add the remaining string (don't take over, copy!) */ GWEN_StringList_AppendString(sl, s, 0, checkDup); break; } } } return sl; } void GWEN_StringList_RemoveEntry(GWEN_STRINGLIST *sl, GWEN_STRINGLISTENTRY *se) { GWEN_STRINGLISTENTRY *curr; assert(sl); assert(se); curr=sl->first; if (curr) { if (curr==se) { sl->first=curr->next; if (sl->count) sl->count--; } else { while (curr->next!=se) { curr=curr->next; } if (curr) { curr->next=se->next; if (sl->count) sl->count--; } } } } void GWEN_StringList_Clear(GWEN_STRINGLIST *sl) { GWEN_STRINGLISTENTRY *se, *next; assert(sl); se=sl->first; sl->first=0; sl->count=0; while (se) { next=se->next; GWEN_StringListEntry_free(se); se=next; } /* while */ } int GWEN_StringList_AppendString(GWEN_STRINGLIST *sl, const char *s, int take, int checkDouble) { GWEN_STRINGLISTENTRY *se; if (checkDouble) { se=sl->first; if (sl->senseCase) { while (se) { if (strcmp(se->data, s)==0) { if (take) free((char *)s); se->refCount++; return 0; } se=se->next; } /* while */ } else { while (se) { if (strcasecmp(se->data, s)==0) { if (take) free((char *)s); se->refCount++; return 0; } se=se->next; } /* while */ } } /* if checkdouble */ se=GWEN_StringListEntry_new(s, take); GWEN_StringList_AppendEntry(sl, se); return 1; } int GWEN_StringList_InsertString(GWEN_STRINGLIST *sl, const char *s, int take, int checkDouble) { GWEN_STRINGLISTENTRY *se; if (checkDouble) { se=sl->first; if (sl->senseCase) { while (se) { if (strcmp(se->data, s)==0) { if (take) free((char *)s); se->refCount++; return 0; } se=se->next; } /* while */ } else { while (se) { if (strcasecmp(se->data, s)==0) { if (take) free((char *)s); se->refCount++; return 0; } se=se->next; } /* while */ } } /* if checkdouble */ se=GWEN_StringListEntry_new(s, take); se->next=sl->first; sl->first=se; sl->count++; return 1; } int GWEN_StringList_RemoveString(GWEN_STRINGLIST *sl, const char *s) { GWEN_STRINGLISTENTRY *se; se=sl->first; if (sl->senseCase) { while (se) { if (strcmp(se->data, s)==0) { assert(se->refCount); se->refCount--; if (sl->ignoreRefCount) GWEN_StringList_RemoveEntry(sl, se); else { if (se->refCount==0) GWEN_StringList_RemoveEntry(sl, se); } return 1; } se=se->next; } /* while */ return 0; } else { while (se) { if (strcasecmp(se->data, s)==0) { assert(se->refCount); se->refCount--; if (sl->ignoreRefCount) GWEN_StringList_RemoveEntry(sl, se); else { if (se->refCount==0) GWEN_StringList_RemoveEntry(sl, se); } return 1; } se=se->next; } /* while */ return 0; } } void GWEN_StringList_RemoveFirstString(GWEN_STRINGLIST *sl) { GWEN_STRINGLISTENTRY *se; assert(sl); se=sl->first; if (se) { assert(se->refCount); se->refCount--; if (sl->ignoreRefCount) GWEN_StringList_RemoveEntry(sl, se); else { if (se->refCount==0) GWEN_StringList_RemoveEntry(sl, se); } } } GWEN_STRINGLISTENTRY *GWEN_StringList_FirstEntry(const GWEN_STRINGLIST *sl) { assert(sl); return sl->first; } GWEN_STRINGLISTENTRY *GWEN_StringListEntry_Next(const GWEN_STRINGLISTENTRY *se) { assert(se); return se->next; } const char *GWEN_StringListEntry_Data(const GWEN_STRINGLISTENTRY *se) { assert(se); return se->data; } void GWEN_StringListEntry_SetData(GWEN_STRINGLISTENTRY *se, const char *s) { assert(se); if (se->data) free((void *)(se->data)); if (s) se->data=strdup(s); else se->data=NULL; } unsigned int GWEN_StringList_Count(const GWEN_STRINGLIST *sl) { assert(sl); return sl->count; } int GWEN_StringList_HasString(const GWEN_STRINGLIST *sl, const char *s) { GWEN_STRINGLISTENTRY *se; assert(sl); se=sl->first; if (sl->senseCase) { while (se) { if (strcmp(se->data, s)==0) { return 1; } se=se->next; } /* while */ return 0; } else { while (se) { if (strcasecmp(se->data, s)==0) { return 1; } se=se->next; } /* while */ return 0; } } int GWEN_StringList_GetStringPos(const GWEN_STRINGLIST *sl, const char *s) { GWEN_STRINGLISTENTRY *se; int i; assert(sl); se=sl->first; if (sl->senseCase) { i=0; while (se) { if (strcmp(se->data, s)==0) { return i; } i++; se=se->next; } /* while */ return -1; } else { i=0; while (se) { if (strcasecmp(se->data, s)==0) { return i; } i++; se=se->next; } /* while */ return -1; } } GWEN_STRINGLISTENTRY *GWEN_StringList_FindStringEntry(const GWEN_STRINGLIST *sl, const char *s) { GWEN_STRINGLISTENTRY *se; int i; assert(sl); se=sl->first; if (sl->senseCase) { i=0; while (se) { if (strcmp(se->data, s)==0) { return se; } i++; se=se->next; } /* while */ return NULL; } else { i=0; while (se) { if (strcasecmp(se->data, s)==0) { return se; } i++; se=se->next; } /* while */ return NULL; } } GWEN_STRINGLIST *GWEN_StringList_dup(const GWEN_STRINGLIST *sl) { GWEN_STRINGLISTENTRY *se; GWEN_STRINGLIST *newsl; assert(sl); newsl=GWEN_StringList_new(); se=sl->first; while (se) { GWEN_STRINGLISTENTRY *newse; newse=GWEN_StringListEntry_new(se->data, 0); GWEN_StringList_AppendEntry(newsl, newse); se=se->next; } /* while */ return newsl; } void *GWEN_StringList_ForEach(const GWEN_STRINGLIST *l, void *(*func)(const char *s, void *u), void *user_data) { GWEN_STRINGLISTENTRY *it; const char *el; void *result = 0; assert(l); it = GWEN_StringList_FirstEntry(l); if (!it) return 0; while (it) { el = GWEN_StringListEntry_Data(it); result = func(el, user_data); if (result) { return result; } it = GWEN_StringListEntry_Next(it); } return 0; } const char *GWEN_StringList_FirstString(const GWEN_STRINGLIST *l) { assert(l); if (l->first==0) return 0; return l->first->data; } static int GWEN_StringList__compar_asc_nocase(const void *a, const void *b) { const GWEN_STRINGLISTENTRY *const *pse1 = a, * const * pse2 = b; const GWEN_STRINGLISTENTRY *se1 = *pse1, *se2 = *pse2; if (se1 && se2 && se1->data && se2->data) return strcmp(se1->data, se2->data); else return 0; } static int GWEN_StringList__compar_desc_nocase(const void *a, const void *b) { const GWEN_STRINGLISTENTRY *const *pse1 = a, * const * pse2 = b; const GWEN_STRINGLISTENTRY *se1 = *pse1, *se2 = *pse2; if (se1 && se2 && se1->data && se2->data) return strcmp(se2->data, se1->data); else return 0; } static int GWEN_StringList__compar_asc_case(const void *a, const void *b) { const GWEN_STRINGLISTENTRY *const *pse1 = a, * const * pse2 = b; const GWEN_STRINGLISTENTRY *se1 = *pse1, *se2 = *pse2; if (se1 && se2 && se1->data && se2->data) return strcasecmp(se1->data, se2->data); else return 0; } static int GWEN_StringList__compar_desc_case(const void *a, const void *b) { const GWEN_STRINGLISTENTRY *const *pse1 = a, * const * pse2 = b; const GWEN_STRINGLISTENTRY *se1 = *pse1, *se2 = *pse2; if (se1 && se2 && se1->data && se2->data) return strcasecmp(se2->data, se1->data); else return 0; } static int GWEN_StringList__compar_asc_int(const void *a, const void *b) { const GWEN_STRINGLISTENTRY *const *pse1 = a, * const * pse2 = b; const GWEN_STRINGLISTENTRY *se1 = *pse1, *se2 = *pse2; if (se1 && se2 && se1->data && se2->data) { int i1, i2; i1=atoi(se1->data); i2=atoi(se2->data); return (i1>i2) - (i1data && se2->data) { int i1, i2; i1=atoi(se1->data); i2=atoi(se2->data); return (i2>i1) - (i2count<2) return; /* sort entries into a linear pointer list */ tmpEntries=(GWEN_STRINGLISTENTRY **)malloc((l->count+1)* sizeof(GWEN_STRINGLISTENTRY *)); assert(tmpEntries); sentry=l->first; psentry=tmpEntries; while (sentry) { *(psentry++)=sentry; sentry=sentry->next; } /* while */ *psentry=0; /* sort */ switch (sortMode) { case GWEN_StringList_SortModeNoCase: if (ascending) qsort(tmpEntries, l->count, sizeof(GWEN_STRINGLISTENTRY *), GWEN_StringList__compar_asc_nocase); else qsort(tmpEntries, l->count, sizeof(GWEN_STRINGLISTENTRY *), GWEN_StringList__compar_desc_nocase); break; case GWEN_StringList_SortModeCase: if (ascending) qsort(tmpEntries, l->count, sizeof(GWEN_STRINGLISTENTRY *), GWEN_StringList__compar_asc_case); else qsort(tmpEntries, l->count, sizeof(GWEN_STRINGLISTENTRY *), GWEN_StringList__compar_desc_case); break; case GWEN_StringList_SortModeInt: if (ascending) qsort(tmpEntries, l->count, sizeof(GWEN_STRINGLISTENTRY *), GWEN_StringList__compar_asc_int); else qsort(tmpEntries, l->count, sizeof(GWEN_STRINGLISTENTRY *), GWEN_StringList__compar_desc_int); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unknown sortmode %d", sortMode); } /* sort entries back into GWEN_STRINGLIST */ psentry=tmpEntries; sentry=0; while (*psentry) { if (sentry) sentry->next=*psentry; else l->first=*psentry; sentry=*psentry; psentry++; } /* while */ sentry->next=NULL; free(tmpEntries); } const char *GWEN_StringList_StringAt(const GWEN_STRINGLIST *sl, int idx) { GWEN_STRINGLISTENTRY *se; assert(sl); se=sl->first; while (se) { if (idx--==0) return se->data; se=se->next; } /* while */ return 0; } int GWEN_StringList_StringAsIntAt(const GWEN_STRINGLIST *l, int idx, int defaultValue) { const char *s; s=GWEN_StringList_StringAt(l, idx); if (s&& *s) { int i; if (1==sscanf(s, "%d", &i)) return i; } return defaultValue; } GWEN_STRINGLIST *GWEN_StringList_fromString(const char *str, const char *delimiters, int checkDouble) { if (str && *str) { GWEN_STRINGLIST *sl; const unsigned char *s; sl=GWEN_StringList_new(); s=(const unsigned char *)str; while (*s) { /* skip blanks */ while (*s && *s<33) s++; if (*s) { const unsigned char *pStart; int len; /* read word */ pStart=s; //s++; while (*s && strchr(delimiters, *s)==NULL) s++; len=s-pStart; if (len) { char *toAdd; toAdd=(char *) malloc(len+1); assert(toAdd); memmove(toAdd, pStart, len); toAdd[len]=0; GWEN_StringList_AppendString(sl, toAdd, 1, checkDouble); } } if (*s==0) break; s++; } if (GWEN_StringList_Count(sl)==0) { GWEN_StringList_free(sl); return NULL; } return sl; } else return NULL; } GWEN_STRINGLIST *GWEN_StringList_fromString2(const char *str, const char *delimiters, int checkDouble, uint32_t flags) { if (str && *str) { GWEN_STRINGLIST *sl; const char *s; GWEN_BUFFER *wbuf; sl=GWEN_StringList_new(); s=(const char *)str; wbuf=GWEN_Buffer_new(0, 256, 0, 1); while (*s) { char *copyOfWord; while (*s && isspace((int)*s)) s++; if (!(*s)) break; DBG_VERBOUS(GWEN_LOGDOMAIN, "Reading word from here: [%s] (delimiters: [%s])", s, delimiters); if (GWEN_Text_GetWordToBuffer(s, delimiters, wbuf, flags, &s)) break; copyOfWord=strdup(GWEN_Buffer_GetStart(wbuf)); GWEN_StringList_AppendString(sl, copyOfWord, 1, checkDouble); GWEN_Buffer_Reset(wbuf); if (*s) s++; } /* while */ GWEN_Buffer_free(wbuf); if (GWEN_StringList_Count(sl)==0) { GWEN_StringList_free(sl); return NULL; } return sl; } return NULL; } int GWEN_StringList_toBuffer(const GWEN_STRINGLIST *sl, const char *delimiter, GWEN_BUFFER *outBuffer) { int entriesAdded=0; if (sl) { GWEN_STRINGLISTENTRY *se; se=sl->first; while (se) { if (se->data && *(se->data)) { if (entriesAdded && delimiter && *delimiter) GWEN_Buffer_AppendString(outBuffer, delimiter); GWEN_Buffer_AppendString(outBuffer, se->data); entriesAdded++; } se=se->next; } /* while */ } return entriesAdded; } void GWEN_StringList_RemoveCommonFirstEntries(GWEN_STRINGLIST *sl1, GWEN_STRINGLIST *sl2) { GWEN_STRINGLISTENTRY *se1; GWEN_STRINGLISTENTRY *se2; se1=GWEN_StringList_FirstEntry(sl1); se2=GWEN_StringList_FirstEntry(sl2); while(se1 && se2) { GWEN_STRINGLISTENTRY *se1Next; GWEN_STRINGLISTENTRY *se2Next; const char *s1; const char *s2; se1Next=GWEN_StringListEntry_Next(se1); se2Next=GWEN_StringListEntry_Next(se2); s1=GWEN_StringListEntry_Data(se1); s2=GWEN_StringListEntry_Data(se2); if (!(s1 && *s1 && s2 && *s2 && strcasecmp(s1, s2)==0)) break; GWEN_StringList_RemoveEntry(sl1, se1); GWEN_StringList_RemoveEntry(sl2, se2); se1=se1Next; se2=se2Next; } } void GWEN_StringList_AppendStringList(GWEN_STRINGLIST *slDest, const GWEN_STRINGLIST *slSource, int checkDouble) { if (slSource) { GWEN_STRINGLISTENTRY *se; se=slSource->first; while (se) { if (se->data && *(se->data)) GWEN_StringList_AppendString(slDest, se->data, 0, checkDouble); se=se->next; } /* while */ } } gwenhywfar-5.12.1/src/base/list2.h0000644000175000017500000003351513142134463013621 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /** @file list2.h * * @short This file contains some macros concerning lists. * */ #ifndef GWENHYWFAR_LIST2_H #define GWENHYWFAR_LIST2_H #include #include #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * This macro should be used in libraries with the * __declspec(dllexport) declaration as the @c decl argument. */ #define GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, decl) \ typedef struct t##_LIST2 t##_LIST2; \ typedef struct t##_LIST2_ITERATOR t##_LIST2_ITERATOR; \ typedef t* (t##_LIST2_FOREACH)(t *element, void *user_data); \ \ decl t##_LIST2 *pr##_List2_new(void); \ decl void pr##_List2_free(t##_LIST2 *l); \ decl t##_LIST2 *pr##_List2_dup(const t##_LIST2 *l); \ decl void pr##_List2_Unshare(t##_LIST2 *l); \ decl void pr##_List2_Dump(t##_LIST2 *l, FILE *f, unsigned int indent); \ decl void pr##_List2_PushBack(t##_LIST2 *l, t *p); \ decl void pr##_List2_PushFront(t##_LIST2 *l, t *p); \ decl t *pr##_List2_GetFront(const t##_LIST2 *l); \ decl t *pr##_List2_GetBack(const t##_LIST2 *l); \ decl void pr##_List2_Erase(t##_LIST2 *l, t##_LIST2_ITERATOR *it); \ decl void pr##_List2_Remove(t##_LIST2 *l, const t *p); \ decl unsigned int pr##_List2_GetSize(const t##_LIST2 *l); \ decl int pr##_List2_IsEmpty(const t##_LIST2 *l); \ decl void pr##_List2_PopBack(t##_LIST2 *l); \ decl void pr##_List2_PopFront(t##_LIST2 *l); \ decl void pr##_List2_Clear(t##_LIST2 *l); \ decl t##_LIST2_ITERATOR *pr##_List2_First(const t##_LIST2 *l); \ decl t##_LIST2_ITERATOR *pr##_List2_Last(const t##_LIST2 *l); \ decl t##_LIST2_ITERATOR *pr##_List2Iterator_new(t##_LIST2 *l); \ decl void pr##_List2Iterator_free(t##_LIST2_ITERATOR *li); \ decl t *pr##_List2Iterator_Previous(t##_LIST2_ITERATOR *li); \ decl t *pr##_List2Iterator_Next(t##_LIST2_ITERATOR *li); \ decl t *pr##_List2Iterator_Data(t##_LIST2_ITERATOR *li); \ decl void pr##_List2Iterator_IncLinkCount(t##_LIST2_ITERATOR *li); \ decl unsigned int pr##_List2Iterator_GetLinkCount(const t##_LIST2_ITERATOR *li); \ decl t##_LIST2_ITERATOR *pr##_List2_FindIter(t##_LIST2 *l, const t *p); \ decl const t *pr##_List2_Contains(t##_LIST2 *l, const t *p); \ decl t *pr##_List2_ForEach(t##_LIST2 *l, t##_LIST2_FOREACH, void *user_data); /** This macro should be used in applications, not in libraries. In * libraries please use the macro @ref GWEN_LIST2_FUNCTION_LIB_DEFS. */ #define GWEN_LIST2_FUNCTION_DEFS(t, pr) \ GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG) /** This macro actually implements the functions. Please use it in your * source file (*.c) after the includes. */ #define GWEN_LIST2_FUNCTIONS(t, pr) \ t##_LIST2 *pr##_List2_new(void) { \ return (t##_LIST2*)GWEN_List_new(); \ } \ \ void pr##_List2_free(t##_LIST2 *l) { \ GWEN_List_free((GWEN_LIST*)l); \ } \ \ t##_LIST2 *pr##_List2_dup(const t##_LIST2 *l) {\ return (t##_LIST2*)GWEN_List_dup((const GWEN_LIST*)l); \ }\ \ void pr##_List2_Unshare(t##_LIST2 *l) { \ GWEN_List_Unshare((GWEN_LIST*)l); \ } \ \ void pr##_List2_Dump(t##_LIST2 *l, FILE *f, unsigned int indent) { \ GWEN_List_Dump((GWEN_LIST*) l, f, indent); \ } \ \ void pr##_List2_PushBack(t##_LIST2 *l, t *p) { \ GWEN_List_PushBack((GWEN_LIST*) l, p); \ } \ \ void pr##_List2_PushFront(t##_LIST2 *l, t *p) { \ GWEN_List_PushFront((GWEN_LIST*) l, p); \ } \ \ t *pr##_List2_GetFront(const t##_LIST2 *l) { \ return (t*) GWEN_List_GetFront((const GWEN_LIST*) l); \ }\ \ t *pr##_List2_GetBack(const t##_LIST2 *l) { \ return (t*) GWEN_List_GetBack((const GWEN_LIST*) l); \ } \ \ void pr##_List2_Erase(t##_LIST2 *l, t##_LIST2_ITERATOR *it) { \ GWEN_List_Erase((GWEN_LIST*) l, (GWEN_LIST_ITERATOR*) it); \ } \ \ void pr##_List2_Remove(t##_LIST2 *l, const t *p){ \ GWEN_List_Remove((GWEN_LIST*) l, p); \ } \ \ unsigned int pr##_List2_GetSize(const t##_LIST2 *l){ \ return GWEN_List_GetSize((const GWEN_LIST*) l); \ }\ \ int pr##_List2_IsEmpty(const t##_LIST2 *l){ \ return GWEN_List_IsEmpty((const GWEN_LIST*) l); \ }\ \ void pr##_List2_PopBack(t##_LIST2 *l){ \ GWEN_List_PopBack((GWEN_LIST*) l); \ }\ \ void pr##_List2_PopFront(t##_LIST2 *l){ \ GWEN_List_PopFront((GWEN_LIST*) l); \ }\ \ void pr##_List2_Clear(t##_LIST2 *l){ \ GWEN_List_Clear((GWEN_LIST*) l); \ }\ \ \ t##_LIST2_ITERATOR *pr##_List2_First(const t##_LIST2 *l) { \ return (t##_LIST2_ITERATOR*) GWEN_List_First((const GWEN_LIST*) l); \ }\ \ t##_LIST2_ITERATOR *pr##_List2_Last(const t##_LIST2 *l) { \ return (t##_LIST2_ITERATOR*) GWEN_List_Last((const GWEN_LIST*) l); \ }\ \ t##_LIST2_ITERATOR *pr##_List2Iterator_new(t##_LIST2 *l) { \ return (t##_LIST2_ITERATOR*) GWEN_ListIterator_new((GWEN_LIST*) l); \ }\ \ void pr##_List2Iterator_free(t##_LIST2_ITERATOR *li) {\ GWEN_ListIterator_free((GWEN_LIST_ITERATOR*)li); \ } \ \ t *pr##_List2Iterator_Previous(t##_LIST2_ITERATOR *li) { \ return (t*) GWEN_ListIterator_Previous((GWEN_LIST_ITERATOR*)li); \ }\ \ t *pr##_List2Iterator_Next(t##_LIST2_ITERATOR *li) { \ return (t*) GWEN_ListIterator_Next((GWEN_LIST_ITERATOR*)li); \ }\ \ t *pr##_List2Iterator_Data(t##_LIST2_ITERATOR *li) { \ return (t*) GWEN_ListIterator_Data((GWEN_LIST_ITERATOR*)li); \ } \ \ void pr##_List2Iterator_IncLinkCount(t##_LIST2_ITERATOR *li) { \ GWEN_ListIterator_IncLinkCount((GWEN_LIST_ITERATOR*)li); \ } \ \ unsigned int pr##_List2Iterator_GetLinkCount(const t##_LIST2_ITERATOR *li){\ return GWEN_ListIterator_GetLinkCount((const GWEN_LIST_ITERATOR*)li); \ } \ \ t##_LIST2_ITERATOR *pr##_List2_FindIter(t##_LIST2 *l, const t *p){ \ return (t##_LIST2_ITERATOR*) GWEN_List_FindIter((GWEN_LIST *)l, p); \ } \ \ const t *pr##_List2_Contains(t##_LIST2 *l, const t *p){ \ return (const t*) GWEN_List_Contains((GWEN_LIST*)l, p); \ } \ \ t *pr##_List2_ForEach(t##_LIST2 *l, t##_LIST2_FOREACH fn, void *user_data){ \ t##_LIST2_ITERATOR *it; \ t *el; \ if (!l) return 0; \ \ it=pr##_List2_First(l); \ if (!it) \ return 0; \ el=pr##_List2Iterator_Data(it); \ while(el) { \ el=fn(el, user_data); \ if (el) { \ pr##_List2Iterator_free(it); \ return el; \ } \ el=pr##_List2Iterator_Next(it); \ } \ pr##_List2Iterator_free(it); \ return 0; \ } /* * This macro should be used in libraries with the * __declspec(dllexport) declaration as the @c decl argument. */ #define GWEN_CONSTLIST2_FUNCTION_LIB_DEFS(t, pr, decl) \ typedef struct t##_CONSTLIST2 t##_CONSTLIST2; \ typedef struct t##_CONSTLIST2_ITERATOR t##_CONSTLIST2_ITERATOR; \ typedef const t* (t##_CONSTLIST2_FOREACH)(const t *element, void *user_data); \ \ decl t##_CONSTLIST2 *pr##_ConstList2_new(void); \ decl void pr##_ConstList2_free(t##_CONSTLIST2 *l); \ decl void pr##_ConstList2_PushBack(t##_CONSTLIST2 *l, const t *p); \ decl void pr##_ConstList2_PushFront(t##_CONSTLIST2 *l, const t *p); \ decl const t *pr##_ConstList2_GetFront(const t##_CONSTLIST2 *l); \ decl const t *pr##_ConstList2_GetBack(const t##_CONSTLIST2 *l); \ decl unsigned int pr##_ConstList2_GetSize(const t##_CONSTLIST2 *l); \ decl int pr##_ConstList2_IsEmpty(const t##_CONSTLIST2 *l); \ decl void pr##_ConstList2_PopBack(t##_CONSTLIST2 *l); \ decl void pr##_ConstList2_PopFront(t##_CONSTLIST2 *l); \ decl void pr##_ConstList2_Clear(t##_CONSTLIST2 *l); \ decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2_First(const t##_CONSTLIST2 *l); \ decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2_Last(const t##_CONSTLIST2 *l); \ decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2Iterator_new(t##_CONSTLIST2 *l); \ decl void pr##_ConstList2Iterator_free(t##_CONSTLIST2_ITERATOR *li); \ decl const t *pr##_ConstList2Iterator_Previous(t##_CONSTLIST2_ITERATOR *li); \ decl const t *pr##_ConstList2Iterator_Next(t##_CONSTLIST2_ITERATOR *li); \ decl const t *pr##_ConstList2Iterator_Data(t##_CONSTLIST2_ITERATOR *li); \ decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2_FindIter(t##_CONSTLIST2 *l, const t *p); \ decl const t *pr##_ConstList2_Contains(t##_CONSTLIST2 *l, const t *p); \ decl void pr##_ConstList2_Remove(t##_CONSTLIST2 *l, const t *p); \ decl const t *pr##_ConstList2_ForEach(t##_CONSTLIST2 *l, t##_CONSTLIST2_FOREACH, void *user_data); /* This macro should be used in applications, not in libraries. In * libraries please use the macro @ref * GWEN_CONSTLIST2_FUNCTION_LIB_DEFS. */ #define GWEN_CONSTLIST2_FUNCTION_DEFS(t, pr) \ GWEN_CONSTLIST2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG) #define GWEN_CONSTLIST2_FUNCTIONS(t, pr) \ t##_CONSTLIST2 *pr##_ConstList2_new(void) { \ return (t##_CONSTLIST2*)GWEN_ConstList_new(); \ } \ \ void pr##_ConstList2_free(t##_CONSTLIST2 *l) { \ GWEN_ConstList_free((GWEN_CONSTLIST*)l); \ } \ \ void pr##_ConstList2_PushBack(t##_CONSTLIST2 *l, const t *p) { \ GWEN_ConstList_PushBack((GWEN_CONSTLIST*) l, p); \ } \ \ void pr##_ConstList2_PushFront(t##_CONSTLIST2 *l, const t *p) { \ GWEN_ConstList_PushFront((GWEN_CONSTLIST*) l, p); \ } \ \ const t *pr##_ConstList2_GetFront(const t##_CONSTLIST2 *l) { \ return (t*) GWEN_ConstList_GetFront((const GWEN_CONSTLIST*) l); \ }\ \ const t *pr##_ConstList2_GetBack(const t##_CONSTLIST2 *l) { \ return (t*) GWEN_ConstList_GetBack((const GWEN_CONSTLIST*) l); \ } \ \ \ unsigned int pr##_ConstList2_GetSize(const t##_CONSTLIST2 *l){ \ return GWEN_ConstList_GetSize((const GWEN_CONSTLIST*) l); \ }\ \ int pr##_ConstList2_IsEmpty(const t##_CONSTLIST2 *l){ \ return GWEN_ConstList_IsEmpty((const GWEN_CONSTLIST*) l); \ }\ \ void pr##_ConstList2_PopBack(t##_CONSTLIST2 *l){ \ GWEN_ConstList_PopBack((GWEN_CONSTLIST*) l); \ }\ \ void pr##_ConstList2_PopFront(t##_CONSTLIST2 *l){ \ GWEN_ConstList_PopFront((GWEN_CONSTLIST*) l); \ }\ \ void pr##_ConstList2_Clear(t##_CONSTLIST2 *l){ \ GWEN_ConstList_Clear((GWEN_CONSTLIST*) l); \ }\ \ \ t##_CONSTLIST2_ITERATOR *pr##_ConstList2_First(const t##_CONSTLIST2 *l) { \ return (t##_CONSTLIST2_ITERATOR*) GWEN_ConstList_First((const GWEN_CONSTLIST*) l); \ }\ \ t##_CONSTLIST2_ITERATOR *pr##_ConstList2_Last(const t##_CONSTLIST2 *l) { \ return (t##_CONSTLIST2_ITERATOR*) GWEN_ConstList_Last((const GWEN_CONSTLIST*) l); \ }\ \ t##_CONSTLIST2_ITERATOR *pr##_ConstList2Iterator_new(t##_CONSTLIST2 *l) { \ return (t##_CONSTLIST2_ITERATOR*) GWEN_ConstListIterator_new((GWEN_CONSTLIST*) l); \ }\ \ void pr##_ConstList2Iterator_free(t##_CONSTLIST2_ITERATOR *li) {\ GWEN_ConstListIterator_free((GWEN_CONSTLIST_ITERATOR*)li); \ } \ \ const t *pr##_ConstList2Iterator_Previous(t##_CONSTLIST2_ITERATOR *li) { \ return (t*) GWEN_ConstListIterator_Previous((GWEN_CONSTLIST_ITERATOR*)li); \ }\ \ const t *pr##_ConstList2Iterator_Next(t##_CONSTLIST2_ITERATOR *li) { \ return (t*) GWEN_ConstListIterator_Next((GWEN_CONSTLIST_ITERATOR*)li); \ }\ \ const t *pr##_ConstList2Iterator_Data(t##_CONSTLIST2_ITERATOR *li) { \ return (t*) GWEN_ConstListIterator_Data((GWEN_CONSTLIST_ITERATOR*)li); \ } \ \ t##_CONSTLIST2_ITERATOR *pr##_ConstList2_FindIter(t##_CONSTLIST2 *l, const t *p){ \ return (t##_CONSTLIST2_ITERATOR*) GWEN_ConstList_FindIter((GWEN_CONSTLIST *)l, p); \ } \ \ const t *pr##_ConstList2_Contains(t##_CONSTLIST2 *l, const t *p){ \ return (const t*) GWEN_ConstList_Contains((GWEN_CONSTLIST*)l, p); \ } \ \ void pr##_ConstList2_Remove(t##_CONSTLIST2 *l, const t *p){ \ GWEN_ConstList_Remove((GWEN_CONSTLIST*) l, p); \ } \ \ const t *pr##_ConstList2_ForEach(t##_CONSTLIST2 *l, t##_CONSTLIST2_FOREACH fn, void *user_data){ \ t##_CONSTLIST2_ITERATOR *it; \ const t *el; \ if (!l) return 0; \ \ it=pr##_ConstList2_First(l); \ if (!it) \ return 0; \ el=pr##_ConstList2Iterator_Data(it); \ while(el) { \ el=fn(el, user_data); \ if (el) { \ pr##_ConstList2Iterator_free(it); \ return el; \ } \ el=pr##_ConstList2Iterator_Next(it); \ } \ pr##_ConstList2Iterator_free(it); \ return 0; \ } #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_LIST2_H */ gwenhywfar-5.12.1/src/base/stringlist_p.h0000644000175000017500000000471613142134463015306 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_STRINGLIST_P_H #define GWENHYWFAR_STRINGLIST_P_H #include #include #include struct GWEN_STRINGLISTENTRYSTRUCT { GWEN_STRINGLISTENTRY *next; const char *data; uint32_t refCount; }; struct GWEN_STRINGLISTSTRUCT { GWEN_STRINGLISTENTRY *first; unsigned int count; int senseCase; int ignoreRefCount; }; static int GWEN_StringList__compar_asc_nocase(const void *a, const void *b); static int GWEN_StringList__compar_desc_nocase(const void *a, const void *b); static int GWEN_StringList__compar_asc_case(const void *a, const void *b); static int GWEN_StringList__compar_desc_case(const void *a, const void *b); static int GWEN_StringList__compar_asc_int(const void *a, const void *b); static int GWEN_StringList__compar_desc_int(const void *a, const void *b); #endif gwenhywfar-5.12.1/src/base/idlist64-t.h0000666000175000017500000000350613642701350014470 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_IDLIST64_T_H #define GWENHYWFAR_IDLIST64_T_H #include #include /** * Internal tests for GWEN_IDLIST64. */ GWENHYWFAR_API int GWEN_IdList64_AddTests(GWEN_TEST_MODULE *mod); /*@}*/ #endif gwenhywfar-5.12.1/src/base/param.c0000664000175000017500000006071613644653723013700 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "param.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "./param_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(GWEN_PARAM, GWEN_Param) GWEN_LIST2_FUNCTIONS(GWEN_PARAM, GWEN_Param) GWEN_TREE_FUNCTIONS(GWEN_PARAM, GWEN_Param) GWEN_PARAM_DATATYPE GWEN_Param_DataType_fromString(const char *p_s) { if (p_s && *p_s) { if (strcasecmp(p_s, "int")==0) return GWEN_Param_DataType_Int; else if (strcasecmp(p_s, "bool")==0) return GWEN_Param_DataType_Bool; else if (strcasecmp(p_s, "float")==0) return GWEN_Param_DataType_Float; else if (strcasecmp(p_s, "string")==0) return GWEN_Param_DataType_String; } return GWEN_Param_DataType_Unknown; } GWEN_PARAM_TYPE GWEN_Param_Type_fromString(const char *p_s) { if (p_s && *p_s) { if (strcasecmp(p_s, "simple")==0) return GWEN_Param_Type_Simple; else if (strcasecmp(p_s, "choice")==0) return GWEN_Param_Type_Choice; } return GWEN_Param_Type_Unknown; } const char *GWEN_Param_DataType_toString(GWEN_PARAM_DATATYPE p_i) { switch (p_i) { case GWEN_Param_DataType_Int: return "int"; case GWEN_Param_DataType_Bool: return "bool"; case GWEN_Param_DataType_Float: return "float"; case GWEN_Param_DataType_String: return "string"; case GWEN_Param_DataType_Unknown: default: return "unknown"; } } const char *GWEN_Param_Type_toString(GWEN_PARAM_TYPE p_i) { switch (p_i) { case GWEN_Param_Type_Simple: return "simple"; case GWEN_Param_Type_Choice: return "choice"; case GWEN_Param_Type_Unknown: default: return "unknown"; } } GWEN_PARAM *GWEN_Param_new(void) { GWEN_PARAM *p_struct; GWEN_NEW_OBJECT(GWEN_PARAM, p_struct) p_struct->_refCount=1; GWEN_LIST_INIT(GWEN_PARAM, p_struct) GWEN_TREE_INIT(GWEN_PARAM, p_struct) /* members */ p_struct->name=NULL; p_struct->flags=0; p_struct->type=GWEN_Param_Type_Unknown; p_struct->dataType=GWEN_Param_DataType_Unknown; p_struct->shortDescription=NULL; p_struct->longDescription=NULL; p_struct->currentValue=NULL; p_struct->defaultValue=NULL; p_struct->choices=NULL; p_struct->internalIntValue=0; p_struct->internalFloatValue=0; p_struct->runtimeFlags=0; /* virtual functions */ return p_struct; } void GWEN_Param_free(GWEN_PARAM *p_struct) { if (p_struct) { assert(p_struct->_refCount); if (p_struct->_refCount==1) { GWEN_LIST_FINI(GWEN_PARAM, p_struct) GWEN_TREE_FINI(GWEN_PARAM, p_struct) /* members */ free(p_struct->name); p_struct->name=NULL; free(p_struct->shortDescription); p_struct->shortDescription=NULL; free(p_struct->longDescription); p_struct->longDescription=NULL; free(p_struct->currentValue); p_struct->currentValue=NULL; free(p_struct->defaultValue); p_struct->defaultValue=NULL; GWEN_StringList2_free(p_struct->choices); p_struct->choices=NULL; p_struct->_refCount=0; GWEN_FREE_OBJECT(p_struct); } else p_struct->_refCount--; } } void GWEN_Param_Attach(GWEN_PARAM *p_struct) { assert(p_struct); assert(p_struct->_refCount); p_struct->_refCount++; } GWEN_PARAM *GWEN_Param_dup(const GWEN_PARAM *p_src) { GWEN_PARAM *p_struct; assert(p_src); p_struct=GWEN_Param_new(); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "flags" */ p_struct->flags=p_src->flags; /* member "type" */ p_struct->type=p_src->type; /* member "dataType" */ p_struct->dataType=p_src->dataType; /* member "shortDescription" */ if (p_struct->shortDescription) { free(p_struct->shortDescription); p_struct->shortDescription=NULL; p_struct->shortDescription=NULL; } if (p_src->shortDescription) { p_struct->shortDescription=strdup(p_src->shortDescription); } /* member "longDescription" */ if (p_struct->longDescription) { free(p_struct->longDescription); p_struct->longDescription=NULL; p_struct->longDescription=NULL; } if (p_src->longDescription) { p_struct->longDescription=strdup(p_src->longDescription); } /* member "currentValue" */ if (p_struct->currentValue) { free(p_struct->currentValue); p_struct->currentValue=NULL; p_struct->currentValue=NULL; } if (p_src->currentValue) { p_struct->currentValue=strdup(p_src->currentValue); } /* member "defaultValue" */ if (p_struct->defaultValue) { free(p_struct->defaultValue); p_struct->defaultValue=NULL; p_struct->defaultValue=NULL; } if (p_src->defaultValue) { p_struct->defaultValue=strdup(p_src->defaultValue); } /* member "choices" */ if (p_struct->choices) { GWEN_StringList2_free(p_struct->choices); p_struct->choices=NULL; p_struct->choices=NULL; } if (p_src->choices) { p_struct->choices=GWEN_StringList2_dup(p_src->choices); } /* member "internalIntValue" */ p_struct->internalIntValue=p_src->internalIntValue; /* member "internalFloatValue" */ p_struct->internalFloatValue=p_src->internalFloatValue; /* member "runtimeFlags" */ p_struct->runtimeFlags=p_src->runtimeFlags; return p_struct; } GWEN_PARAM *GWEN_Param_copy(GWEN_PARAM *p_struct, const GWEN_PARAM *p_src) { assert(p_struct); assert(p_src); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "flags" */ p_struct->flags=p_src->flags; /* member "type" */ p_struct->type=p_src->type; /* member "dataType" */ p_struct->dataType=p_src->dataType; /* member "shortDescription" */ if (p_struct->shortDescription) { free(p_struct->shortDescription); p_struct->shortDescription=NULL; p_struct->shortDescription=NULL; } if (p_src->shortDescription) { p_struct->shortDescription=strdup(p_src->shortDescription); } /* member "longDescription" */ if (p_struct->longDescription) { free(p_struct->longDescription); p_struct->longDescription=NULL; p_struct->longDescription=NULL; } if (p_src->longDescription) { p_struct->longDescription=strdup(p_src->longDescription); } /* member "currentValue" */ if (p_struct->currentValue) { free(p_struct->currentValue); p_struct->currentValue=NULL; p_struct->currentValue=NULL; } if (p_src->currentValue) { p_struct->currentValue=strdup(p_src->currentValue); } /* member "defaultValue" */ if (p_struct->defaultValue) { free(p_struct->defaultValue); p_struct->defaultValue=NULL; p_struct->defaultValue=NULL; } if (p_src->defaultValue) { p_struct->defaultValue=strdup(p_src->defaultValue); } /* member "choices" */ if (p_struct->choices) { GWEN_StringList2_free(p_struct->choices); p_struct->choices=NULL; p_struct->choices=NULL; } if (p_src->choices) { p_struct->choices=GWEN_StringList2_dup(p_src->choices); } /* member "internalIntValue" */ p_struct->internalIntValue=p_src->internalIntValue; /* member "internalFloatValue" */ p_struct->internalFloatValue=p_src->internalFloatValue; /* member "runtimeFlags" */ p_struct->runtimeFlags=p_src->runtimeFlags; return p_struct; } const char *GWEN_Param_GetName(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->name; } uint32_t GWEN_Param_GetFlags(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->flags; } GWEN_PARAM_TYPE GWEN_Param_GetType(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->type; } GWEN_PARAM_DATATYPE GWEN_Param_GetDataType(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->dataType; } const char *GWEN_Param_GetShortDescription(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->shortDescription; } const char *GWEN_Param_GetLongDescription(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->longDescription; } const char *GWEN_Param_GetCurrentValue(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->currentValue; } const char *GWEN_Param_GetDefaultValue(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->defaultValue; } GWEN_STRINGLIST2 *GWEN_Param_GetChoices(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->choices; } int GWEN_Param_GetInternalIntValue(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->internalIntValue; } double GWEN_Param_GetInternalFloatValue(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->internalFloatValue; } uint32_t GWEN_Param_GetRuntimeFlags(const GWEN_PARAM *p_struct) { assert(p_struct); return p_struct->runtimeFlags; } void GWEN_Param_SetName(GWEN_PARAM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src) { p_struct->name=strdup(p_src); } else { p_struct->name=NULL; } } void GWEN_Param_SetFlags(GWEN_PARAM *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags=p_src; } void GWEN_Param_AddFlags(GWEN_PARAM *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags|=p_src; } void GWEN_Param_SubFlags(GWEN_PARAM *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags&=~p_src; } void GWEN_Param_SetType(GWEN_PARAM *p_struct, GWEN_PARAM_TYPE p_src) { assert(p_struct); p_struct->type=p_src; } void GWEN_Param_SetDataType(GWEN_PARAM *p_struct, GWEN_PARAM_DATATYPE p_src) { assert(p_struct); p_struct->dataType=p_src; } void GWEN_Param_SetShortDescription(GWEN_PARAM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->shortDescription) { free(p_struct->shortDescription); p_struct->shortDescription=NULL; } if (p_src) { p_struct->shortDescription=strdup(p_src); } else { p_struct->shortDescription=NULL; } } void GWEN_Param_SetLongDescription(GWEN_PARAM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->longDescription) { free(p_struct->longDescription); p_struct->longDescription=NULL; } if (p_src) { p_struct->longDescription=strdup(p_src); } else { p_struct->longDescription=NULL; } } void GWEN_Param_SetCurrentValue(GWEN_PARAM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->currentValue) { free(p_struct->currentValue); p_struct->currentValue=NULL; } if (p_src) { p_struct->currentValue=strdup(p_src); } else { p_struct->currentValue=NULL; } } void GWEN_Param_SetDefaultValue(GWEN_PARAM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->defaultValue) { free(p_struct->defaultValue); p_struct->defaultValue=NULL; } if (p_src) { p_struct->defaultValue=strdup(p_src); } else { p_struct->defaultValue=NULL; } } void GWEN_Param_SetChoices(GWEN_PARAM *p_struct, GWEN_STRINGLIST2 *p_src) { assert(p_struct); if (p_struct->choices) { GWEN_StringList2_free(p_struct->choices); p_struct->choices=NULL; } p_struct->choices=p_src; } void GWEN_Param_SetInternalIntValue(GWEN_PARAM *p_struct, int p_src) { assert(p_struct); p_struct->internalIntValue=p_src; } void GWEN_Param_SetInternalFloatValue(GWEN_PARAM *p_struct, double p_src) { assert(p_struct); p_struct->internalFloatValue=p_src; } void GWEN_Param_SetRuntimeFlags(GWEN_PARAM *p_struct, uint32_t p_src) { assert(p_struct); p_struct->runtimeFlags=p_src; } void GWEN_Param_AddRuntimeFlags(GWEN_PARAM *p_struct, uint32_t p_src) { assert(p_struct); p_struct->runtimeFlags|=p_src; } void GWEN_Param_SubRuntimeFlags(GWEN_PARAM *p_struct, uint32_t p_src) { assert(p_struct); p_struct->runtimeFlags&=~p_src; } /* list1 functions */ GWEN_PARAM_LIST *GWEN_Param_List_dup(const GWEN_PARAM_LIST *p_src) { GWEN_PARAM_LIST *p_dest; GWEN_PARAM *p_elem; assert(p_src); p_dest=GWEN_Param_List_new(); p_elem=GWEN_Param_List_First(p_src); while (p_elem) { GWEN_PARAM *p_cpy; p_cpy=GWEN_Param_dup(p_elem); GWEN_Param_List_Add(p_cpy, p_dest); p_elem=GWEN_Param_List_Next(p_elem); } return p_dest; } void GWEN_Param_ReadDb(GWEN_PARAM *p_struct, GWEN_DB_NODE *p_db) { assert(p_struct); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "name", 0, NULL); if (s) p_struct->name=strdup(s); } if (p_struct->name==NULL) { p_struct->name=NULL; } /* member "flags" */ p_struct->flags=GWEN_DB_GetIntValue(p_db, "flags", 0, 0); /* member "type" */ { const char *s; s=GWEN_DB_GetCharValue(p_db, "type", 0, NULL); if (s) p_struct->type=GWEN_Param_Type_fromString(s); else p_struct->type=GWEN_Param_Type_Unknown; } /* member "dataType" */ { const char *s; s=GWEN_DB_GetCharValue(p_db, "dataType", 0, NULL); if (s) p_struct->dataType=GWEN_Param_DataType_fromString(s); else p_struct->dataType=GWEN_Param_DataType_Unknown; } /* member "shortDescription" */ if (p_struct->shortDescription) { free(p_struct->shortDescription); p_struct->shortDescription=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "shortDescription", 0, NULL); if (s) p_struct->shortDescription=strdup(s); } if (p_struct->shortDescription==NULL) { p_struct->shortDescription=NULL; } /* member "longDescription" */ if (p_struct->longDescription) { free(p_struct->longDescription); p_struct->longDescription=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "longDescription", 0, NULL); if (s) p_struct->longDescription=strdup(s); } if (p_struct->longDescription==NULL) { p_struct->longDescription=NULL; } /* member "currentValue" */ if (p_struct->currentValue) { free(p_struct->currentValue); p_struct->currentValue=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "currentValue", 0, NULL); if (s) p_struct->currentValue=strdup(s); } if (p_struct->currentValue==NULL) { p_struct->currentValue=NULL; } /* member "defaultValue" */ if (p_struct->defaultValue) { free(p_struct->defaultValue); p_struct->defaultValue=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "defaultValue", 0, NULL); if (s) p_struct->defaultValue=strdup(s); } if (p_struct->defaultValue==NULL) { p_struct->defaultValue=NULL; } /* member "choices" */ if (p_struct->choices) { GWEN_StringList2_free(p_struct->choices); p_struct->choices=NULL; } { p_struct->choices=GWEN_StringList2_fromDb(p_db, "choices", GWEN_StringList2_IntertMode_AlwaysAdd); } if (p_struct->choices==NULL) { p_struct->choices=NULL; } /* member "internalIntValue" */ /* member "internalIntValue" is volatile, just presetting */ p_struct->internalIntValue=0; /* member "internalFloatValue" */ /* member "internalFloatValue" is volatile, just presetting */ p_struct->internalFloatValue=0; /* member "runtimeFlags" */ /* member "runtimeFlags" is volatile, just presetting */ p_struct->runtimeFlags=0; } int GWEN_Param_WriteDb(const GWEN_PARAM *p_struct, GWEN_DB_NODE *p_db) { int p_rv; assert(p_struct); /* member "name" */ if (p_struct->name) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "name", p_struct->name); else { GWEN_DB_DeleteVar(p_db, "name"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "flags" */ p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "flags", p_struct->flags); if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "type" */ p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "type", GWEN_Param_Type_toString(p_struct->type)); if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "dataType" */ p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "dataType", GWEN_Param_DataType_toString(p_struct->dataType)); if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "shortDescription" */ if (p_struct->shortDescription) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "shortDescription", p_struct->shortDescription); else { GWEN_DB_DeleteVar(p_db, "shortDescription"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "longDescription" */ if (p_struct->longDescription) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "longDescription", p_struct->longDescription); else { GWEN_DB_DeleteVar(p_db, "longDescription"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "currentValue" */ if (p_struct->currentValue) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "currentValue", p_struct->currentValue); else { GWEN_DB_DeleteVar(p_db, "currentValue"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "defaultValue" */ if (p_struct->defaultValue) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "defaultValue", p_struct->defaultValue); else { GWEN_DB_DeleteVar(p_db, "defaultValue"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "choices" */ if (p_struct->choices) { p_rv=GWEN_StringList2_toDb(p_struct->choices, p_db, "choices"); } else { GWEN_DB_DeleteVar(p_db, "choices"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "internalIntValue" is volatile, not writing to db */ /* member "internalFloatValue" is volatile, not writing to db */ /* member "runtimeFlags" is volatile, not writing to db */ return 0; } GWEN_PARAM *GWEN_Param_fromDb(GWEN_DB_NODE *p_db) { GWEN_PARAM *p_struct; p_struct=GWEN_Param_new(); GWEN_Param_ReadDb(p_struct, p_db); return p_struct; } int GWEN_Param_toDb(const GWEN_PARAM *p_struct, GWEN_DB_NODE *p_db) { return GWEN_Param_WriteDb(p_struct, p_db); } void GWEN_Param_ReadXml(GWEN_PARAM *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "name", NULL); if (s) p_struct->name=strdup(s); } if (p_struct->name==NULL) { /* preset member "name" if empty */ p_struct->name=NULL; } /* member "flags" */ p_struct->flags=GWEN_XMLNode_GetIntValue(p_db, "flags", 0); /* member "type" */ { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "type", NULL); if (s) p_struct->type=GWEN_Param_Type_fromString(s); else p_struct->type=GWEN_Param_Type_Unknown; } /* member "dataType" */ { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "dataType", NULL); if (s) p_struct->dataType=GWEN_Param_DataType_fromString(s); else p_struct->dataType=GWEN_Param_DataType_Unknown; } /* member "shortDescription" */ if (p_struct->shortDescription) { free(p_struct->shortDescription); p_struct->shortDescription=NULL; } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "shortDescription", NULL); if (s) p_struct->shortDescription=strdup(s); } if (p_struct->shortDescription==NULL) { /* preset member "shortDescription" if empty */ p_struct->shortDescription=NULL; } /* member "longDescription" */ if (p_struct->longDescription) { free(p_struct->longDescription); p_struct->longDescription=NULL; } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "longDescription", NULL); if (s) p_struct->longDescription=strdup(s); } if (p_struct->longDescription==NULL) { /* preset member "longDescription" if empty */ p_struct->longDescription=NULL; } /* member "currentValue" */ if (p_struct->currentValue) { free(p_struct->currentValue); p_struct->currentValue=NULL; } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "currentValue", NULL); if (s) p_struct->currentValue=strdup(s); } if (p_struct->currentValue==NULL) { /* preset member "currentValue" if empty */ p_struct->currentValue=NULL; } /* member "defaultValue" */ if (p_struct->defaultValue) { free(p_struct->defaultValue); p_struct->defaultValue=NULL; } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "defaultValue", NULL); if (s) p_struct->defaultValue=strdup(s); } if (p_struct->defaultValue==NULL) { /* preset member "defaultValue" if empty */ p_struct->defaultValue=NULL; } /* member "choices" */ if (p_struct->choices) { GWEN_StringList2_free(p_struct->choices); p_struct->choices=NULL; } { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(p_db, "choices", 0, 0); if (n) { p_struct->choices=GWEN_StringList2_fromXml(n, GWEN_StringList2_IntertMode_AlwaysAdd); } else p_struct->choices=NULL; } if (p_struct->choices==NULL) { /* preset member "choices" if empty */ p_struct->choices=NULL; } /* member "internalIntValue" */ /* member "internalIntValue" is volatile, just presetting */ p_struct->internalIntValue=0; /* member "internalFloatValue" */ /* member "internalFloatValue" is volatile, just presetting */ p_struct->internalFloatValue=0; /* member "runtimeFlags" */ /* member "runtimeFlags" is volatile, just presetting */ p_struct->runtimeFlags=0; } void GWEN_Param_WriteXml(const GWEN_PARAM *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ GWEN_XMLNode_SetCharValue(p_db, "name", p_struct->name); /* member "flags" */ GWEN_XMLNode_SetIntValue(p_db, "flags", p_struct->flags); /* member "type" */ GWEN_XMLNode_SetCharValue(p_db, "type", GWEN_Param_Type_toString(p_struct->type)); /* member "dataType" */ GWEN_XMLNode_SetCharValue(p_db, "dataType", GWEN_Param_DataType_toString(p_struct->dataType)); /* member "shortDescription" */ GWEN_XMLNode_SetCharValue(p_db, "shortDescription", p_struct->shortDescription); /* member "longDescription" */ GWEN_XMLNode_SetCharValue(p_db, "longDescription", p_struct->longDescription); /* member "currentValue" */ GWEN_XMLNode_SetCharValue(p_db, "currentValue", p_struct->currentValue); /* member "defaultValue" */ GWEN_XMLNode_SetCharValue(p_db, "defaultValue", p_struct->defaultValue); /* member "choices" */ if (p_struct->choices) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "choices"); GWEN_StringList2_toXml(p_struct->choices, n); GWEN_XMLNode_AddChild(p_db, n); } /* member "internalIntValue" is volatile, not writing to xml */ /* member "internalFloatValue" is volatile, not writing to xml */ /* member "runtimeFlags" is volatile, not writing to xml */ } void GWEN_Param_toXml(const GWEN_PARAM *p_struct, GWEN_XMLNODE *p_db) { GWEN_Param_WriteXml(p_struct, p_db); } GWEN_PARAM *GWEN_Param_fromXml(GWEN_XMLNODE *p_db) { GWEN_PARAM *p_struct; p_struct=GWEN_Param_new(); GWEN_Param_ReadXml(p_struct, p_db); return p_struct; } GWEN_PARAM *GWEN_Param_List_GetByName(const GWEN_PARAM_LIST *p_list, const char *p_cmp) { GWEN_PARAM *p_struct; assert(p_list); p_struct = GWEN_Param_List_First(p_list); while (p_struct) { int p_rv; if (p_struct->name && p_cmp) p_rv=strcasecmp(p_cmp, p_struct->name); else if (p_cmp) p_rv=1; else if (p_struct->name) p_rv=-1; else p_rv=0; if (p_rv == 0) return p_struct; p_struct = GWEN_Param_List_Next(p_struct); } return NULL; } GWEN_PARAM *GWEN_Param_Tree_GetByName(const GWEN_PARAM_TREE *p_tree, const char *p_cmp) { GWEN_PARAM *p_struct; assert(p_tree); p_struct = GWEN_Param_Tree_GetFirst(p_tree); while (p_struct) { int p_rv; if (p_struct->name && p_cmp) p_rv=strcasecmp(p_cmp, p_struct->name); else if (p_cmp) p_rv=1; else if (p_struct->name) p_rv=-1; else p_rv=0; if (p_rv == 0) return p_struct; p_struct = GWEN_Param_Tree_GetBelow(p_struct); } return NULL; } /* code headers */ #include "param_fns.c" gwenhywfar-5.12.1/src/base/plugindescr.h0000664000175000017500000001447014460564441015113 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PLUGINDESCR_H #define GWENHYWFAR_PLUGINDESCR_H #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_PLUGIN_DESCRIPTION GWEN_PLUGIN_DESCRIPTION; GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_PLUGIN_DESCRIPTION, GWEN_PluginDescription, GWENHYWFAR_API) GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_PLUGIN_DESCRIPTION, GWEN_PluginDescription, GWENHYWFAR_API) /* Do not terminate these lines with semicolon because they are macros, not functions, and ISO C89 does not allow a semicolon there. */ GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION *GWEN_PluginDescription_new(void); GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION *GWEN_PluginDescription_fromXml(GWEN_XMLNODE *node); GWENHYWFAR_API void GWEN_PluginDescription_List2_freeAll(GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl); GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2 *GWEN_LoadPluginDescrs(const char *path); /** * Loads a list of plugins descriptions. * When parsing the description files entries for the current language will * be selected. The current language can be set via @ref GWEN_I18N_SetLocale. * @param path folder to search for XML files * @param type plugin type (property "type" of tag "plugin") * @param pdl plugin descriptions list2 to load descriptions to */ GWENHYWFAR_API int GWEN_LoadPluginDescrsByType(const char *path, const char *type, GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl); GWENHYWFAR_API void GWEN_PluginDescription_free(GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION *GWEN_PluginDescription_dup(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_Attach(GWEN_PLUGIN_DESCRIPTION *pd); /** * Returns the XML node this description consists of (the "plugin" node). * It may contain additional information used by programs. * This function does not relinquish ownership of the returned pointer, * so you MUST NOT free it. As soon as the description itself is destroyed * this XML node will be, too. So you have to call GWEN_XMLNode_dup() if * you want the XML node to survive the description. */ GWENHYWFAR_API GWEN_XMLNODE *GWEN_PluginDescription_GetXmlNode(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API const char *GWEN_PluginDescription_GetPath(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetPath(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetName(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetName(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetType(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetType(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetShortDescr(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetShortDescr(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetAuthor(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetAuthor(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetVersion(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetVersion(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetLongDescr(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetLongDescr(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); GWENHYWFAR_API const char *GWEN_PluginDescription_GetFileName(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetFileName(GWEN_PLUGIN_DESCRIPTION *pd, const char *s); #ifndef NO_DEPRECATED_SYMBOLS /** *

* Seeks for a long description with the given format and the currently * selected locale and appends it to the data in the given buffer. *

*

* The DESCR tag of the plugin description is expected to contain sub tags * named TEXT with the property "FORMAT" describing the format and "LANG" * containing the language of the element. *

*

* Currently supported format is "html". *

* @return 0 if ok, !=0 on error * @param pd plugin description * @param s name of the format (e.g. html) * @param buf buffer to append the description to */ GWENHYWFAR_API GWEN_DEPRECATED int GWEN_PluginDescription_GetLongDescrByFormat(const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf); #endif // ifndef NO_DEPRECATED_SYMBOLS GWENHYWFAR_API int GWEN_PluginDescription_IsActive(const GWEN_PLUGIN_DESCRIPTION *pd); GWENHYWFAR_API void GWEN_PluginDescription_SetIsActive(GWEN_PLUGIN_DESCRIPTION *pd, int i); #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_PLUGINDESCR_H */ gwenhywfar-5.12.1/src/base/plugin_l.h0000664000175000017500000000362114460564441014401 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PLUGIN_L_H #define GWENHYWFAR_PLUGIN_L_H #include "plugin.h" #include GWEN_LIST_FUNCTION_DEFS(GWEN_PLUGIN, GWEN_Plugin) GWEN_LIST_FUNCTION_DEFS(GWEN_PLUGIN_MANAGER, GWEN_PluginManager) int GWEN_Plugin_ModuleInit(void); int GWEN_Plugin_ModuleFini(void); void GWEN_Plugin_Attach(GWEN_PLUGIN *p); #endif gwenhywfar-5.12.1/src/base/bindata.h0000644000175000017500000000347413142134462014166 00000000000000/*************************************************************************** begin : Fri Aug 16 2013 copyright : (C) 2013 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_BINDATA_H #define GWENHYWFAR_BINDATA_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct { uint8_t *pointer; uint64_t length; } GWEN_BINDATA; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/gwensignal.c0000644000175000017500000003715213552051657014726 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: stringlist.c 1067 2006-05-22 15:25:23Z christian $ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwensignal_p.h" #include #include #include #include #include #include GWEN_LIST2_FUNCTIONS(GWEN_SIGNAL, GWEN_Signal) GWEN_LIST2_FUNCTIONS(GWEN_SLOT, GWEN_Slot) GWEN_SIGNALOBJECT *GWEN_SignalObject_new(void) { GWEN_SIGNALOBJECT *so; GWEN_NEW_OBJECT(GWEN_SIGNALOBJECT, so); so->signalList=GWEN_Signal_List2_new(); so->slotList=GWEN_Slot_List2_new(); return so; } void GWEN_SignalObject_free(GWEN_SIGNALOBJECT *so) { if (so) { GWEN_Slot_List2_freeAll(so->slotList); GWEN_Signal_List2_freeAll(so->signalList); GWEN_FREE_OBJECT(so); } } uint32_t GWEN_SignalObject_MkTypeId(const char *typeName) { return GWEN_Inherit_MakeId(typeName); } GWEN_SIGNAL *GWEN_SignalObject__findSignal(const GWEN_SIGNALOBJECT *so, const char *name, uint32_t typeId1, uint32_t typeId2) { GWEN_SIGNAL_LIST2_ITERATOR *sit; assert(so); assert(name); sit=GWEN_Signal_List2_First(so->signalList); if (sit) { GWEN_SIGNAL *sig; sig=GWEN_Signal_List2Iterator_Data(sit); assert(sig); while (sig) { const char *s; s=sig->name; assert(s); if (strcasecmp(s, name)==0 && (typeId1==0 || typeId1==sig->typeOfArg1) && (typeId2==0 || typeId2==sig->typeOfArg2)) { GWEN_Signal_List2Iterator_free(sit); return sig; } sig=GWEN_Signal_List2Iterator_Next(sit); } GWEN_Signal_List2Iterator_free(sit); } return 0; } GWEN_SIGNAL *GWEN_SignalObject_FindSignal(const GWEN_SIGNALOBJECT *so, const char *name, const char *typeOfArg1, const char *typeOfArg2) { uint32_t typeId1=0; uint32_t typeId2=0; if (typeOfArg1) typeId1=GWEN_SignalObject_MkTypeId(typeOfArg1); if (typeOfArg2) typeId2=GWEN_SignalObject_MkTypeId(typeOfArg2); return GWEN_SignalObject__findSignal(so, name, typeId1, typeId2); } GWEN_SLOT *GWEN_SignalObject__findSlot(const GWEN_SIGNALOBJECT *so, const char *name, uint32_t typeId1, uint32_t typeId2) { GWEN_SLOT_LIST2_ITERATOR *sit; assert(so); assert(name); sit=GWEN_Slot_List2_First(so->slotList); if (sit) { GWEN_SLOT *slot; slot=GWEN_Slot_List2Iterator_Data(sit); assert(slot); while (slot) { const char *s; s=slot->name; assert(s); if (strcasecmp(s, name)==0 && (typeId1==0 || typeId1==slot->typeOfArg1) && (typeId2==0 || typeId2==slot->typeOfArg2)) { GWEN_Slot_List2Iterator_free(sit); return slot; } slot=GWEN_Slot_List2Iterator_Next(sit); } GWEN_Slot_List2Iterator_free(sit); } return 0; } GWEN_SLOT *GWEN_SignalObject_FindSlot(const GWEN_SIGNALOBJECT *so, const char *name, const char *typeOfArg1, const char *typeOfArg2) { uint32_t typeId1=0; uint32_t typeId2=0; if (typeOfArg1) typeId1=GWEN_SignalObject_MkTypeId(typeOfArg1); if (typeOfArg2) typeId2=GWEN_SignalObject_MkTypeId(typeOfArg2); return GWEN_SignalObject__findSlot(so, name, typeId1, typeId2); } int GWEN_SignalObject_AddSignal(GWEN_SIGNALOBJECT *so, GWEN_SIGNAL *sig) { if (GWEN_SignalObject__findSignal(so, sig->name, sig->typeOfArg1, sig->typeOfArg2)) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" already exists", sig->name); return GWEN_ERROR_INVALID; } sig->signalObject=so; GWEN_Signal_List2_PushBack(so->signalList, sig); DBG_INFO(GWEN_LOGDOMAIN, "Added signal \"%s\"", sig->name); return 0; } int GWEN_SignalObject_AddSlot(GWEN_SIGNALOBJECT *so, GWEN_SLOT *slot) { if (GWEN_SignalObject__findSlot(so, slot->name, slot->typeOfArg1, slot->typeOfArg2)) { DBG_ERROR(GWEN_LOGDOMAIN, "Slot \"%s\" already exists", slot->name); return GWEN_ERROR_INVALID; } slot->signalObject=so; GWEN_Slot_List2_PushBack(so->slotList, slot); DBG_INFO(GWEN_LOGDOMAIN, "Added slot \"%s\"", slot->name); return 0; } void GWEN_SignalObject_RemoveForDerivedType(GWEN_SIGNALOBJECT *so, const char *derivedType) { uint32_t typeId=0; GWEN_SLOT_LIST2_ITERATOR *slotIt; GWEN_SIGNAL_LIST2_ITERATOR *sigIt; assert(so); if (derivedType) typeId=GWEN_SignalObject_MkTypeId(derivedType); slotIt=GWEN_Slot_List2_First(so->slotList); if (slotIt) { GWEN_SLOT *slot; slot=GWEN_Slot_List2Iterator_Data(slotIt); assert(slot); while (slot) { const char *s; s=slot->name; assert(s); if (typeId==0 || slot->derivedParentType==typeId) { GWEN_Slot_List2_Erase(so->slotList, slotIt); GWEN_Slot_free(slot); /* iterator now points to the next entry in any case (or NULL) */ slot=GWEN_Slot_List2Iterator_Data(slotIt); } else slot=GWEN_Slot_List2Iterator_Next(slotIt); } GWEN_Slot_List2Iterator_free(slotIt); } sigIt=GWEN_Signal_List2_First(so->signalList); if (sigIt) { GWEN_SIGNAL *sig; sig=GWEN_Signal_List2Iterator_Data(sigIt); assert(sig); while (sig) { const char *s; s=sig->name; assert(s); if (typeId==0 || sig->derivedParentType==typeId) { GWEN_Signal_List2_Erase(so->signalList, sigIt); GWEN_Signal_free(sig); /* iterator now points to the next entry in any case (or NULL) */ sig=GWEN_Signal_List2Iterator_Data(sigIt); } else sig=GWEN_Signal_List2Iterator_Next(sigIt); } GWEN_Signal_List2Iterator_free(sigIt); } } GWEN_SIGNAL *GWEN_Signal_new(GWEN_SIGNALOBJECT *so, const char *derivedType, const char *name, const char *typeOfArg1, const char *typeOfArg2) { GWEN_SIGNAL *sig; assert(so); assert(name); GWEN_NEW_OBJECT(GWEN_SIGNAL, sig) sig->_refCount=1; sig->connectedSlots=GWEN_Slot_List2_new(); sig->name=strdup(name); if (typeOfArg1) sig->typeOfArg1=GWEN_SignalObject_MkTypeId(typeOfArg1); if (typeOfArg2) sig->typeOfArg2=GWEN_SignalObject_MkTypeId(typeOfArg2); if (derivedType) sig->derivedParentType=GWEN_SignalObject_MkTypeId(derivedType); if (GWEN_SignalObject_AddSignal(so, sig)) { GWEN_Signal_free(sig); return 0; } return sig; } void GWEN_Signal_free(GWEN_SIGNAL *sig) { if (sig) { assert(sig->_refCount); if (sig->_refCount==1) { GWEN_SLOT_LIST2_ITERATOR *sit; /* remove from all connected slots */ sit=GWEN_Slot_List2_First(sig->connectedSlots); if (sit) { GWEN_SLOT *slot; slot=GWEN_Slot_List2Iterator_Data(sit); assert(slot); while (slot) { GWEN_SLOT *next; next=GWEN_Slot_List2Iterator_Next(sit); DBG_ERROR(GWEN_LOGDOMAIN, "Disconnecting signal \"%s\" from slot \"%s\"", sig->name, slot->name); GWEN_Signal_List2_Remove(slot->connectedSignals, sig); slot=next; } GWEN_Slot_List2Iterator_free(sit); } GWEN_Slot_List2_free(sig->connectedSlots); free(sig->name); sig->_refCount=0; GWEN_FREE_OBJECT(sig); } else sig->_refCount--; } } void GWEN_Signal_Attach(GWEN_SIGNAL *sig) { assert(sig); assert(sig->_refCount); sig->_refCount++; } GWEN_SIGNAL *GWEN_Signal__List2_freeAll_cb(GWEN_SIGNAL *sig, GWEN_UNUSED void *user_data) { GWEN_Signal_free(sig); return 0; } void GWEN_Signal_List2_freeAll(GWEN_SIGNAL_LIST2 *slist) { GWEN_Signal_List2_ForEach(slist, GWEN_Signal__List2_freeAll_cb, 0); GWEN_Signal_List2_free(slist); } GWEN_SIGNAL *GWEN_Signal__List2_hasSignal_cb(GWEN_SIGNAL *sig, void *user_data) { if ((void *)sig==user_data) return sig; return 0; } int GWEN_Signal_List2_HasSignal(GWEN_SIGNAL_LIST2 *slist, GWEN_SIGNAL *sig) { if (GWEN_Signal_List2_ForEach(slist, GWEN_Signal__List2_hasSignal_cb, (void *)sig)) return 1; return 0; } GWEN_SIGNALOBJECT *GWEN_Signal_GetSignalObject(const GWEN_SIGNAL *sig) { assert(sig); return sig->signalObject; } int GWEN_Signal_Connect(GWEN_SIGNAL *sig, GWEN_SLOT *slot) { assert(sig); assert(slot); if (sig->typeOfArg1!=slot->typeOfArg1) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" and slot \"%s\" use different types for " "argument 1", sig->name, slot->name); return GWEN_ERROR_INVALID; } if (sig->typeOfArg2!=slot->typeOfArg2) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" and slot \"%s\" use different types for " "argument 2", sig->name, slot->name); return GWEN_ERROR_INVALID; } if (GWEN_Signal_List2_HasSignal(slot->connectedSignals, sig)) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" and slot \"%s\" already connected", sig->name, slot->name); return GWEN_ERROR_INVALID; } if (GWEN_Slot_List2_HasSlot(sig->connectedSlots, slot)) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" and slot \"%s\" already connected", sig->name, slot->name); return GWEN_ERROR_INVALID; } GWEN_Signal_List2_PushBack(slot->connectedSignals, sig); GWEN_Slot_List2_PushBack(sig->connectedSlots, slot); return 0; } int GWEN_Signal_Disconnect(GWEN_SIGNAL *sig, GWEN_SLOT *slot) { assert(sig); assert(slot); if (GWEN_Signal_List2_HasSignal(slot->connectedSignals, sig)==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" and slot \"%s\" are not connected", sig->name, slot->name); return GWEN_ERROR_INVALID; } if (GWEN_Slot_List2_HasSlot(sig->connectedSlots, slot)==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Signal \"%s\" and slot \"%s\" are not connected", sig->name, slot->name); return GWEN_ERROR_INVALID; } GWEN_Signal_List2_Remove(slot->connectedSignals, sig); GWEN_Slot_List2_Remove(sig->connectedSlots, slot); return 0; } int GWEN_Signal_Emit(GWEN_SIGNAL *sig, void *pArg1, void *pArg2, int iArg3, int iArg4) { GWEN_SLOT_LIST2_ITERATOR *sit; int result=0; assert(sig); sit=GWEN_Slot_List2_First(sig->connectedSlots); if (sit) { GWEN_SLOT *slot; slot=GWEN_Slot_List2Iterator_Data(sit); assert(slot); while (slot) { if (slot->func) { int rv; DBG_DEBUG(GWEN_LOGDOMAIN, "Sending signal \"%s\" to slot \"%s\" (%p)", sig->name, slot->name, slot); rv=slot->func(slot, slot->userData, pArg1, pArg2, iArg3, iArg4); if (rv>0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Slot \"%s\" (%p) returned an error (%d)", slot->name, slot, rv); result=rv; } } slot=GWEN_Slot_List2Iterator_Next(sit); } GWEN_Slot_List2Iterator_free(sit); } return result; } GWEN_SLOT *GWEN_Slot_new(GWEN_SIGNALOBJECT *so, const char *derivedType, const char *name, const char *typeOfArg1, const char *typeOfArg2, GWEN_SLOT_FUNCTION fn, void *userData) { GWEN_SLOT *slot; assert(name); GWEN_NEW_OBJECT(GWEN_SLOT, slot) slot->_refCount=1; slot->connectedSignals=GWEN_Signal_List2_new(); slot->name=strdup(name); if (typeOfArg1) slot->typeOfArg1=GWEN_SignalObject_MkTypeId(typeOfArg1); if (typeOfArg2) slot->typeOfArg2=GWEN_SignalObject_MkTypeId(typeOfArg2); if (derivedType) slot->derivedParentType=GWEN_SignalObject_MkTypeId(derivedType); slot->func=fn; slot->userData=userData; if (GWEN_SignalObject_AddSlot(so, slot)) { GWEN_Slot_free(slot); return 0; } return slot; } void GWEN_Slot_free(GWEN_SLOT *slot) { if (slot) { assert(slot->_refCount); if (slot->_refCount==1) { GWEN_SIGNAL_LIST2_ITERATOR *sit; /* remove from all connected signals */ sit=GWEN_Signal_List2_First(slot->connectedSignals); if (sit) { GWEN_SIGNAL *sig; sig=GWEN_Signal_List2Iterator_Data(sit); assert(sig); while (sig) { DBG_ERROR(GWEN_LOGDOMAIN, "Disconnecting slot \"%s\" from signal \"%s\"", slot->name, sig->name); GWEN_Slot_List2_Remove(sig->connectedSlots, slot); sig=GWEN_Signal_List2Iterator_Next(sit); } GWEN_Signal_List2Iterator_free(sit); } GWEN_Signal_List2_free(slot->connectedSignals); free(slot->name); slot->_refCount=0; GWEN_FREE_OBJECT(slot); } else slot->_refCount--; } } void GWEN_Slot_Attach(GWEN_SLOT *slot) { assert(slot); assert(slot->_refCount); slot->_refCount++; } GWEN_SLOT *GWEN_Slot__List2_freeAll_cb(GWEN_SLOT *slot, GWEN_UNUSED void *user_data) { GWEN_Slot_free(slot); return 0; } void GWEN_Slot_List2_freeAll(GWEN_SLOT_LIST2 *slist) { GWEN_Slot_List2_ForEach(slist, GWEN_Slot__List2_freeAll_cb, 0); GWEN_Slot_List2_free(slist); } GWEN_SLOT *GWEN_Slot__List2_hasSlot_cb(GWEN_SLOT *slot, void *user_data) { if ((void *)slot==user_data) return slot; return 0; } int GWEN_Slot_List2_HasSlot(GWEN_SLOT_LIST2 *slist, GWEN_SLOT *slot) { if (GWEN_Slot_List2_ForEach(slist, GWEN_Slot__List2_hasSlot_cb, (void *)slot)) return 1; return 0; } GWEN_SIGNALOBJECT *GWEN_Slot_GetSignalObject(const GWEN_SLOT *slot) { assert(slot); return slot->signalObject; } gwenhywfar-5.12.1/src/base/param_fns.h0000644000175000017500000001403513142134475014531 00000000000000/*************************************************************************** begin : Wed Sep 17 2014 copyright : (C) 2014 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PARAM_FNS_H #define GWENHYWFAR_PARAM_FNS_H /** * Returns the current value of the given param converted to integer. * @return current value as integer * @param param parameter to read the value from */ GWENHYWFAR_API int GWEN_Param_GetCurrentValueAsInt(const GWEN_PARAM *param); /** * Changes the current value of the given param (converted from integer). * The given value is converted to char and stored. * @param param parameter to change * @param v value to set */ GWENHYWFAR_API void GWEN_Param_SetCurrentValueAsInt(GWEN_PARAM *param, int v); /** * Returns the current value of the given param converted to floating point. * @return current value as floating point * @param param parameter to read the value from */ GWENHYWFAR_API double GWEN_Param_GetCurrentValueAsDouble(const GWEN_PARAM *param); /** * Changes the current value of the given param (converted from floating point). * The given value is converted to char and stored. * @param param parameter to change * @param v value to set */ GWENHYWFAR_API void GWEN_Param_SetCurrentValueAsDouble(GWEN_PARAM *param, double v); /** * Find param with the given name and return its current value. If there is no value (or no * valid value) then a default value is returned. * This is for integer values. * @return value * @param pl list of parameters * @param name name of the parameter * @param defVal default value (returned if param has no value or no valid value). * */ GWENHYWFAR_API int GWEN_Param_List_GetCurrentValueAsInt(const GWEN_PARAM_LIST *pl, const char *name, int defVal); /** * Find param with the given name and change its current value. If there is no param of that name is * found this function does nothing. * This is for integer values. * @return value * @param pl list of parameters * @param name name of the parameter * @param v value to set. * */ GWENHYWFAR_API void GWEN_Param_List_SetCurrentValueAsInt(GWEN_PARAM_LIST *pl, const char *name, int v); /** * Find param with the given name and return its current value. If there is no value (or no * valid value) then a default value is returned. * This is for floating point values. * @return value * @param pl list of parameters * @param name name of the parameter * @param defVal default value (returned if param has no value or no valid value). * */ GWENHYWFAR_API double GWEN_Param_List_GetCurrentValueAsDouble(const GWEN_PARAM_LIST *pl, const char *name, double defVal); /** * Find param with the given name and change its current value. If there is no param of that name is * found this function does nothing. * This is for floating point values. * @return value * @param pl list of parameters * @param name name of the parameter * @param v value to set. * */ GWENHYWFAR_API void GWEN_Param_List_SetCurrentValueAsDouble(GWEN_PARAM_LIST *pl, const char *name, double v); /** * Write the list of parameters to XML. * @param pl list of parameters to write * @param xn XML node to store the parameters */ GWENHYWFAR_API void GWEN_Param_List_WriteXml(const GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn); /** * Read a list of parameters from XML. * @param pl list to store parameters read * @param xn XML node to read the parameters from */ GWENHYWFAR_API void GWEN_Param_List_ReadXml(GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn); /** * Write the current values of a list of parameters to XML. * * For every member of the given list an XML node "param" is created below the given XML node * which only contains the attribute "name" (parameter name) and the param's "currentValue" (the current value) * as data node. * Example: * @code * data1 * data2 * @endcode * * @param pl list of parameters to write * @param xn XML node to store the parameters */ GWENHYWFAR_API void GWEN_Param_List_WriteValuesToXml(const GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn); /** * Read the current values for a list of parameters from XML. * * The XML tree is expected to have been created by @ref GWEN_Param_List_WriteValuesToXml. * Every "param" node below the given XML node is expected to have an attribute "name" with the name of * the param and a data node which holds the current value to set. * Entries for non-existing params are ignored. * @param pl list of parameters to read values for * @param xn XML node to read values for the parameters */ GWENHYWFAR_API void GWEN_Param_List_ReadValuesFromXml(GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn); #endif gwenhywfar-5.12.1/src/base/tree_p.h0000644000175000017500000000373713142134463014045 00000000000000/*************************************************************************** begin : Fri Jan 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_TREE_P_H #define GWEN_TREE_P_H #include "tree.h" struct GWEN_TREE_ELEMENT { GWEN_TREE *treePtr; void *data; GWEN_TREE_ELEMENT *prevElement; GWEN_TREE_ELEMENT *nextElement; GWEN_TREE_ELEMENT *firstChild; GWEN_TREE_ELEMENT *lastChild; GWEN_TREE_ELEMENT *parent; uint32_t count; }; struct GWEN_TREE { uint32_t count; GWEN_TREE_ELEMENT *firstElement; GWEN_TREE_ELEMENT *lastElement; }; #endif gwenhywfar-5.12.1/src/base/idlist64.h0000664000175000017500000001023114043240674014221 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /** @file idlist.h * @short A list of uint64_t objects */ #ifndef GWENHYWFAR_IDLIST64_H #define GWENHYWFAR_IDLIST64_H #include #include #include #ifdef __cplusplus extern "C" { #endif typedef GWEN_SIMPLEPTRLIST GWEN_IDLIST64; typedef struct GWEN_IDLIST64_ITERATOR GWEN_IDLIST64_ITERATOR; #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif /** * @defgroup MOD_IDLIST64 ID list module * @ingroup MOD_BASE * @short A list of uint64_t objects * * This is basically a list for uint64_t objects, * but since it uses tables instead of those list objects normally used * throughout Gwen it is less memory consuming. */ /*@{*/ GWENHYWFAR_API GWEN_IDLIST64 *GWEN_IdList64_new(void); GWENHYWFAR_API GWEN_IDLIST64 *GWEN_IdList64_newWithSteps(uint64_t steps); GWENHYWFAR_API void GWEN_IdList64_Attach(GWEN_IDLIST64 *idl); GWENHYWFAR_API void GWEN_IdList64_free(GWEN_IDLIST64 *idl); GWENHYWFAR_API void GWEN_IdList64_Clear(GWEN_IDLIST64 *idl); GWENHYWFAR_API GWEN_IDLIST64 *GWEN_IdList64_dup(const GWEN_IDLIST64 *oldList); GWENHYWFAR_API GWEN_IDLIST64 *GWEN_IdList64_LazyCopy(GWEN_IDLIST64 *oldList); /** * Adds an id to the list, returns its index. This function does no doublecheck. */ GWENHYWFAR_API int64_t GWEN_IdList64_AddId(GWEN_IDLIST64 *idl, uint64_t id); /** * Removes the first occurrence of the given id. * @return 0 if deleted, !=0 if the id wasn't found */ GWENHYWFAR_API int GWEN_IdList64_DelId(GWEN_IDLIST64 *idl, uint64_t id); /** * Checks whether the given id exists in the idlist. * @return 1 if found, 0 otherwise */ GWENHYWFAR_API int GWEN_IdList64_HasId(const GWEN_IDLIST64 *idl, uint64_t id); GWENHYWFAR_API int64_t GWEN_IdList64_GetIdAt(const GWEN_IDLIST64 *idl, uint64_t index); GWENHYWFAR_API uint64_t GWEN_IdList64_GetEntryCount(const GWEN_IDLIST64 *idl); /** * Sorts the ids in ascending order */ GWENHYWFAR_API int GWEN_IdList64_Sort(GWEN_IDLIST64 *idl); GWENHYWFAR_API int GWEN_IdList64_ReverseSort(GWEN_IDLIST64 *idl); /*@}*/ /** * @defgroup MOD_IDLIST64_ITERATOR Iterator for ID list module * @ingroup MOD_BASE * @short Iterator for a list of uint64_t objects * */ /*@{*/ GWENHYWFAR_API GWEN_IDLIST64_ITERATOR *GWEN_IdList64_Iterator_new(const GWEN_IDLIST64 *idl); GWENHYWFAR_API void GWEN_IdList64_Iterator_free(GWEN_IDLIST64_ITERATOR *it); GWENHYWFAR_API uint64_t GWEN_IdList64_Iterator_GetFirstId(GWEN_IDLIST64_ITERATOR *it); GWENHYWFAR_API uint64_t GWEN_IdList64_Iterator_GetNextId(GWEN_IDLIST64_ITERATOR *it); /*@}*/ #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_IDLIST64_H */ gwenhywfar-5.12.1/src/base/tree2_p.h0000666000175000017500000000352013507337634014133 00000000000000/*************************************************************************** begin : Thu Jul 04 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_TREE2_P_H #define GWEN_TREE2_P_H #include "tree2.h" struct GWEN_TREE2_ELEMENT { void *data; GWEN_TREE2_ELEMENT *prevElement; GWEN_TREE2_ELEMENT *nextElement; GWEN_TREE2_ELEMENT *firstChild; GWEN_TREE2_ELEMENT *lastChild; GWEN_TREE2_ELEMENT *parent; }; #endif gwenhywfar-5.12.1/src/base/tree2.h0000666000175000017500000003540113605634305013611 00000000000000/*************************************************************************** begin : Thu Jul 04 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_TREE2_H #define GWEN_TREE2_H #include #include #include #ifndef GWEN_DUMMY_EMPTY_ARG /** Necessary for MSVC compiler because it does not accept a left-out macro argument. */ # define GWEN_DUMMY_EMPTY_ARG #endif #ifdef __cplusplus extern "C" { #endif /** @defgroup GWEN_MACRO_TREE2 Macros For Typesafe Tree Handling * * The macros of this group facilitates typesafe use of trees. * *

* Let's assume you have a structure type called MYSTRUCT and you want * to manage lists of them. Let's further assume that you want the * functions dealing with that struct have prefixes like MyStruct (as in * @b MyStruct_new) *

* The header file would look like this: * * @code * * / * mystruct.h * / * * #ifndef MYSTRUCT_H * #define MYSTRUCT_H * * typedef struct MYSTRUCT MYSTRUCT; * * GWEN_TREE2_FUNCTION_DEFS(MYSTRUCT, MyStruct); * * struct MYSTRUCT { * GWEN_TREE2_ELEMENT(MYSTRUCT); * int myData; * } * * * MYSTRUCT *MyStruct_new(int myData); * void MyStruct_free(MYSTRUCT *myStruct); * * #endif * @endcode *

* This defines all necessary data and function prototypes needed for * list management. *

* *

* The code file would look quite similar to the following: *

* * @code * * / * mystruct.c * / * * GWEN_TREE2_FUNCTIONS(MYSTRUCT, MyStruct) * * MYSTRUCT *MyStruct_new(int myData) { * MYSTRUCT *pMyStruct; * * pMyStruct=(MYSTRUCT*)malloc(sizeof(MYSTRUCT)); * memset(pMyStruct, 0, sizeof(MYSTRUCT)); * * GWEN_TREE2_INIT(MYSTRUCT, pMyStruct) * * pMyStruct->myData=myData; * return pMyStruct; * } * * void MyStruct_free(MYSTRUCT *pMyStruct) { * if (pMyStruct) { * pMyStruct->myData=0; * * GWEN_TREE2_FINI(MYSTRUCT, pMyStruct) * * free(pMyStruct); * } * } * * @endcode * Please note the three macros used in the code file: *
    *
  • @ref GWEN_TREE2_FUNCTIONS creates the functions for the list * management
  • *
  • @ref GWEN_TREE2_INIT initializes the list data inside your * struct to defined values
  • *
  • @ref GWEN_TREE2_FINI frees all ressources occupied by the list * management code. Please note that this macro should be the last * statement inside the destructor function before @b free()
  • *
* *

Note: When writing these macro code lines, the original ISO * C89 standard for the C language does not allow terminating the * macro statement with a semicolon ';'. Any recent compiler will * probably silently ignore such an extra ';', but you should be * aware that this can cause problems once one of your users tries * to compile this with a different compiler. Therefore these code * lines should end directly with the closing parentheses.

* *

* The tree management code assumes that there is a function called * (in this example) @b MyStruct_free() (or generally: TYPEPREFIX_free). * This is used when destroying a list of MYSTRUCT elements. In this case * all elements still enlisted are destroyed upon destruction of the list. *

*/ /*@{*/ /** @name Internal Functions * * All functions and structs within this group should be considered * internal. They just implement the functionality behind the typesafe list * macros (see @ref GWEN_TREE2_FUNCTION_LIB_DEFS and following). */ /*@{*/ typedef struct GWEN_TREE2_ELEMENT GWEN_TREE2_ELEMENT; /** Unlinks (removes) a tree element from the tree it used to * belong to. The tree element is not free'd or anything, it is * only removed from the tree it used to belong to. (This * operation is also called "remove" elsewhere.) */ GWENHYWFAR_API void GWEN_Tree2_Unlink(GWEN_TREE2_ELEMENT *el); /** Replaces a tree element with another one, so the replacement takes the place of the given element. * The given element to replace is unlinked in the process and can be free'd. * The replacement MUST NOT be part of any tree. */ GWENHYWFAR_API void GWEN_Tree2_Replace(GWEN_TREE2_ELEMENT *elToReplace, GWEN_TREE2_ELEMENT *elReplacement); /** Add a child below the given element. */ GWENHYWFAR_API void GWEN_Tree2_AddChild(GWEN_TREE2_ELEMENT *where, GWEN_TREE2_ELEMENT *el); /** Insert a child below the given element. */ GWENHYWFAR_API void GWEN_Tree2_InsertChild(GWEN_TREE2_ELEMENT *where, GWEN_TREE2_ELEMENT *el); /** Returns the data pointer of the first list element. */ GWENHYWFAR_API void *GWEN_Tree2_GetFirstChild(const GWEN_TREE2_ELEMENT *el); /** Returns the data pointer of the last list element. */ GWENHYWFAR_API void *GWEN_Tree2_GetLastChild(const GWEN_TREE2_ELEMENT *el); /** Allocate (create) a new list element structure. */ GWENHYWFAR_API GWEN_TREE2_ELEMENT *GWEN_Tree2Element_new(void *d); /** Free (delete) a list element structure. */ GWENHYWFAR_API void GWEN_Tree2Element_free(GWEN_TREE2_ELEMENT *el); /** Returns the data pointer of the list element that is the * previous (predecessor) to the given one in its list. If there * is no such prepending list element, returns NULL. */ GWENHYWFAR_API void *GWEN_Tree2Element_GetPrevious(const GWEN_TREE2_ELEMENT *el); /** Returns the data pointer of the list element that is the next * one (successor) to the given one in its list. If there is no * such prepending list element, returns NULL. */ GWENHYWFAR_API void *GWEN_Tree2Element_GetNext(const GWEN_TREE2_ELEMENT *el); /** Returns the element which is logically below the given one. * The order of search is this: *
    *
  • first child of the given element
  • *
  • next neighbour of the given element
  • *
  • loop for every parent: check next neighbour of the given element's parent (if any)
  • *
*/ GWENHYWFAR_API void *GWEN_Tree2Element_GetBelow(const GWEN_TREE2_ELEMENT *el); /** Returns the first child of the given element. */ GWENHYWFAR_API void *GWEN_Tree2Element_GetFirstChild(const GWEN_TREE2_ELEMENT *el); /** Returns the last child of the given element. */ GWENHYWFAR_API void *GWEN_Tree2Element_GetLastChild(const GWEN_TREE2_ELEMENT *el); GWENHYWFAR_API void *GWEN_Tree2Element_GetParent(const GWEN_TREE2_ELEMENT *el); /** Returns the number of children of the given element */ GWENHYWFAR_API uint32_t GWEN_Tree2Element_GetChildrenCount(const GWEN_TREE2_ELEMENT *el); /*@}*/ /** @name Typesafe Macros * */ /*@{*/ /** * Use this inside the declaration of a struct for which you want to create * lists. */ #define GWEN_TREE2_ELEMENT(t) \ GWEN_TREE2_ELEMENT *_tree2_element; /** * Use this macro in your public header files to export only list functions * which do not modify a list. This allows your code to return lists which can * not be modified by callers. It also prevents callers from creating their * own lists (this is sometimes needed). */ #define GWEN_TREE2_FUNCTION_LIB_DEFS_CONST(t, pr, decl) \ decl t* pr##_Tree2_GetNext(const t *element); \ decl t* pr##_Tree2_GetPrevious(const t *element); \ decl t* pr##_Tree2_GetBelow(const t *element); \ decl t* pr##_Tree2_GetFirstChild(const t *element); \ decl t* pr##_Tree2_GetLastChild(const t *element); \ decl t* pr##_Tree2_GetParent(const t *element); #define GWEN_TREE2_FUNCTION_LIB_DEFS_NOCONST(t, pr, decl) \ typedef GWEN_TREE2_ELEMENT t##_TREE2_ELEMENT; \ \ decl void pr##_Tree2_Unlink(t *element); \ decl void pr##_Tree2_Replace(t *elToReplace, t *elReplacement); \ \ decl void pr##_Tree2_AddChild(t *where, t *element); \ decl void pr##_Tree2_InsertChild(t *where, t *element); \ \ decl void pr##_Tree2_ClearChildren(t *element); \ decl void pr##_Tree2_free(t *element); #define GWEN_TREE2_FUNCTION_DEFS_CONST(t, pr) \ GWEN_TREE2_FUNCTION_LIB_DEFS_CONST(t, pr, GWEN_DUMMY_EMPTY_ARG) #define GWEN_TREE2_FUNCTION_DEFS_NOCONST(t, pr) \ GWEN_TREE2_FUNCTION_LIB_DEFS_NOCONST(t, pr, GWEN_DUMMY_EMPTY_ARG) /** * Use this in public header files to define some prototypes for list * functions. * Let's assume the type of your list elements is "MYTYPE" and you want to * use the prefix "MyType_" for the list functions. * The following function prototypes will then be created: *
    *
  • * void MyType_Tree2_Add(MYTYPE *element, MYTYPE_TREE *list);
    * Adds (appends) a MYTYPE struct at the end of the given * list. (We apologize for the unusual argument order here.) *
  • *
  • * void MyType_Tree2_Unlink(MYTYPE *element);
    * Removes a MyType struct from the list it is enlisted to. *
  • *
  • * MYTYPE *MyType_Tree2_FirstChild(MYTYPE *element);
    * Returns the first element of the given list. *
  • *
  • * MYTYPE* MyType_Tree2_Next(const MYTYPE *element);
    * Returns the next list element to the given one (the * successor) in its list. *
  • *
  • * MYTYPE* MyType_Tree2_Previous(const MYTYPE *element);
    * Returns the previous list element to the given one (the * predecessor) in its list. *
  • *
  • * void MyType_Tree2_Clear(MYTYPE *element);
    * Frees all entries of the given list. * This function assumes that there is a function Mytype_free(). *
  • *
  • * MYTYPE_TREE *MyType_Tree2_new();
    * Creates a new list of elements of MYTYPE type. *
  • *
  • * void MyType_Tree2_free(MYTYPE_TREE *l);
    * Clears and frees a list of elements of MYTYPE type. * All objects inside the list are freed. *
  • *
* */ #define GWEN_TREE2_FUNCTION_LIB_DEFS(t, pr, decl) \ GWEN_TREE2_FUNCTION_LIB_DEFS_CONST(t, pr, decl) \ GWEN_TREE2_FUNCTION_LIB_DEFS_NOCONST(t, pr, decl) /** * This macro should be used in applications, not in libraries. In * libraries please use the macro @ref GWEN_TREE2_FUNCTION_LIB_DEFS. */ #define GWEN_TREE2_FUNCTION_DEFS(t, pr) \ GWEN_TREE2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG) /** * Use this inside your code files (*.c). * Actually implements the functions for which the prototypes have been * defined via @ref GWEN_TREE2_FUNCTION_DEFS. */ #define GWEN_TREE2_FUNCTIONS(t, pr) \ \ void pr##_Tree2_Unlink(t *element){ \ assert(element); \ assert(element->_tree2_element);\ GWEN_Tree2_Unlink(element->_tree2_element); \ }\ \ void pr##_Tree2_Replace(t *elToReplace, t *elReplacement) { \ assert(elToReplace); \ assert(elToReplace->_tree2_element);\ assert(elReplacement); \ assert(elReplacement->_tree2_element);\ GWEN_Tree2_Replace(elToReplace->_tree2_element, elReplacement->_tree2_element); \ } \ \ \ t* pr##_Tree2_GetNext(const t *element) { \ assert(element); \ assert(element->_tree2_element);\ return (t*)GWEN_Tree2Element_GetNext(element->_tree2_element);\ } \ \ t* pr##_Tree2_GetPrevious(const t *element) { \ assert(element); \ assert(element->_tree2_element);\ return (t*)GWEN_Tree2Element_GetPrevious(element->_tree2_element);\ } \ \ t* pr##_Tree2_GetBelow(const t *element) { \ assert(element); \ assert(element->_tree2_element);\ return (t*)GWEN_Tree2Element_GetBelow(element->_tree2_element);\ } \ \ void pr##_Tree2_AddChild(t *where, t *element) { \ assert(where); \ assert(where->_tree2_element);\ assert(element); \ assert(element->_tree2_element);\ GWEN_Tree2_AddChild(where->_tree2_element, element->_tree2_element); \ } \ \ void pr##_Tree2_InsertChild(t *where, t *element) { \ assert(where); \ assert(where->_tree2_element);\ assert(element); \ assert(element->_tree2_element);\ GWEN_Tree2_InsertChild(where->_tree2_element, element->_tree2_element); \ } \ \ void pr##_Tree2_ClearChildren(t *element) { \ t* c; \ while( (c=GWEN_Tree2Element_GetFirstChild(element->_tree2_element)) ) {\ pr##_Tree2_ClearChildren(c);\ pr##_Tree2_Unlink(c);\ pr##_free(c);\ } /* while */ \ } \ \ void pr##_Tree2_free(t *element) { \ pr##_Tree2_ClearChildren(element);\ pr##_Tree2_Unlink(element);\ pr##_free(element);\ } \ \ t* pr##_Tree2_GetFirstChild(const t *element) { \ assert(element); \ assert(element->_tree2_element);\ return (t*)GWEN_Tree2Element_GetFirstChild(element->_tree2_element);\ } \ \ t* pr##_Tree2_GetLastChild(const t *element) { \ assert(element); \ assert(element->_tree2_element);\ return (t*)GWEN_Tree2Element_GetLastChild(element->_tree2_element);\ } \ \ t* pr##_Tree2_GetParent(const t *element) { \ assert(element); \ assert(element->_tree2_element);\ return (t*)GWEN_Tree2Element_GetParent(element->_tree2_element);\ } \ \ /** * Use this in your code file (*.c) inside the init code for the struct * you want to use in lists (in GWEN these are the functions which end with * "_new". */ #define GWEN_TREE2_INIT(t, element, pr) \ element->_tree2_element=GWEN_Tree2Element_new(element); /** * Use this in your code file (*.c) inside the fini code for the struct * you want to use in lists (in GWEN these are the functions which end with * "_free". * t is the base type id (e.g. "AF_ACCOUNT") * element is the pointer to the element to fini * pr ist the prefix of functions for this type (e.g. "AF_Account") */ #define GWEN_TREE2_FINI(t, element, pr) \ if (element && element->_tree2_element) { \ pr##_Tree2_ClearChildren(element);\ pr##_Tree2_Unlink(element);\ GWEN_Tree2Element_free(element->_tree2_element); \ element->_tree2_element=0; \ } /*@}*/ /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/endianfns.h0000664000175000017500000000623314735251743014542 00000000000000/*************************************************************************** begin : Tuet Apr 26 2016 copyright : (C) 2016 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_ENDIANFNS_H #define GWENHYWFAR_ENDIANFNS_H #include #if GWENHYWFAR_SYS_IS_WINDOWS /* assume little endian for now (is there any big endian Windows system??) */ # define GWEN_ENDIAN_LE16TOH(x) (x) # define GWEN_ENDIAN_HTOLE16(x) (x) # define GWEN_ENDIAN_LE32TOH(x) (x) # define GWEN_ENDIAN_HTOLE32(x) (x) # define GWEN_ENDIAN_LE64TOH(x) (x) # define GWEN_ENDIAN_HTOLE64(x) (x) #elif defined(__APPLE__) /* inspired by https://stackoverflow.com/questions/20813028/endian-h-not-found-on-mac-osx */ #include #define GWEN_ENDIAN_HTOLE16(x) OSSwapHostToLittleInt16(x) #define GWEN_ENDIAN_LE16TOH(x) OSSwapLittleToHostInt16(x) #define GWEN_ENDIAN_HTOLE32(x) OSSwapHostToLittleInt32(x) #define GWEN_ENDIAN_LE32TOH(x) OSSwapLittleToHostInt32(x) #define GWEN_ENDIAN_HTOLE64(x) OSSwapHostToLittleInt64(x) #define GWEN_ENDIAN_LE64TOH(x) OSSwapLittleToHostInt64(x) #define GWEN_ENDIAN_HTOBE16(x) OSSwapHostToBigInt16(x) #define GWEN_ENDIAN_BE16TOH(x) OSSwapBigToHostInt16(x) #define GWEN_ENDIAN_HTOBE32(x) OSSwapHostToBigInt32(x) #define GWEN_ENDIAN_BE32TOH(x) OSSwapBigToHostInt32(x) #define GWEN_ENDIAN_HTOBE64(x) OSSwapHostToBigInt64(x) #define GWEN_ENDIAN_BE64TOH(x) OSSwapBigToHostInt64(x) #else /* for Linux and others use definitions from endian.h */ # include # define GWEN_ENDIAN_LE16TOH(x) le16toh(x) # define GWEN_ENDIAN_HTOLE16(x) htole16(x) # define GWEN_ENDIAN_LE32TOH(x) le32toh(x) # define GWEN_ENDIAN_HTOLE32(x) htole32(x) # define GWEN_ENDIAN_LE64TOH(x) le64toh(x) # define GWEN_ENDIAN_HTOLE64(x) htole64(x) #endif #endif gwenhywfar-5.12.1/src/base/args_p.h0000644000175000017500000000412513142134462014031 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Apr 24 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_ARGS_P #define GWENHYWFAR_ARGS_P #include typedef enum { GWEN_ArgsElementTypeFreeParam=0, GWEN_ArgsElementTypeShort, GWEN_ArgsElementTypeLong } GWEN_ARGS_ELEMENT_TYPE; int GWEN_Args_UsageTXT(const GWEN_ARGS *args, GWEN_BUFFER *ubuf); int GWEN_Args_UsageHTML(const GWEN_ARGS *args, GWEN_BUFFER *ubuf); int GWEN_Args__AppendTXT(GWEN_BUFFER *ubuf, const char *s, unsigned int ins); #endif /* GWENHYWFAR_ARGS_P */ gwenhywfar-5.12.1/src/base/error.c0000644000175000017500000001253513142134475013712 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Tue Oct 02 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "error_p.h" /* Internationalization */ #ifdef ENABLE_NLS # include # include # define I18N(m) dgettext("gwenhywfar", m) # define I18S(m) m #else # define I18N(m) m # define I18S(m) m #endif #include #include #include #ifdef HAVE_STRINGS_H # include #endif #include "gwenhywfar/debug.h" #include "gwenhywfar/misc.h" #include "gwenhywfar/inetsocket.h" #include "gwenhywfar/inetaddr.h" #include "gwenhywfar/libloader.h" int GWEN_Error_ModuleInit(void) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Error_ModuleInit"); return 0; } int GWEN_Error_ModuleFini(void) { return 0; } int GWEN_Error_ToString(int c, char *buffer, int bsize) { const char *s; assert(buffer); assert(bsize); s=GWEN_Error_SimpleToString(c); snprintf(buffer, bsize-1, "Error %d [%s]", c, s?s:"none"); /* make sure the string is NULL terminated */ buffer[bsize-1]=0; /* finished */ return 1; } const char *GWEN_Error_SimpleToString(int i) { const char *s; switch (i) { case GWEN_SUCCESS: s=I18N("Ok"); break; case GWEN_ERROR_GENERIC: s=I18N("Generic error"); break; case GWEN_ERROR_ABORTED: s=I18N("Aborted"); break; case GWEN_ERROR_NOT_AVAILABLE: s=I18N("Not available"); break; case GWEN_ERROR_BAD_SOCKETTYPE: s=I18N("Bad socket type"); break; case GWEN_ERROR_NOT_OPEN: s=I18N("Not open"); break; case GWEN_ERROR_TIMEOUT: s=I18N("Timeout"); break; case GWEN_ERROR_IN_PROGRESS: s=I18N("In Progress"); break; case GWEN_ERROR_STARTUP: s=I18N("Startup error"); break; case GWEN_ERROR_INTERRUPTED: s=I18N("Interrupted system call"); break; case GWEN_ERROR_NOT_SUPPORTED: s=I18N("Not supported"); break; case GWEN_ERROR_BROKEN_PIPE: s=I18N("Broken pipe"); break; case GWEN_ERROR_MEMORY_FULL: s=I18N("Memory full"); break; case GWEN_ERROR_BAD_ADDRESS: s=I18N("Bad address"); break; case GWEN_ERROR_BUFFER_OVERFLOW: s=I18N("Buffer overflow"); break; case GWEN_ERROR_HOST_NOT_FOUND: s=I18N("Host not found"); break; case GWEN_ERROR_NO_ADDRESS: s=I18N("No address"); break; case GWEN_ERROR_NO_RECOVERY: s=I18N("No recovery"); break; case GWEN_ERROR_TRY_AGAIN: s=I18N("Try again"); break; case GWEN_ERROR_UNKNOWN_DNS_ERROR: s=I18N("Unknown DNS error"); break; case GWEN_ERROR_BAD_ADDRESS_FAMILY: s=I18N("Bad address family"); break; case GWEN_ERROR_COULD_NOT_LOAD: s=I18N("Could not load"); break; case GWEN_ERROR_COULD_NOT_RESOLVE: s=I18N("Could not resolve a symbol"); break; case GWEN_ERROR_NOT_FOUND: s=I18N("Not found"); break; case GWEN_ERROR_READ: s=I18N("Could not read"); break; case GWEN_ERROR_WRITE: s=I18N("Could not write"); break; case GWEN_ERROR_CLOSE: s=I18N("Could not close"); break; case GWEN_ERROR_NO_DATA: s=I18N("No data"); break; case GWEN_ERROR_PARTIAL: s=I18N("Partial data"); break; case GWEN_ERROR_EOF: s=I18N("EOF met"); break; case GWEN_ERROR_ALREADY_REGISTERED: s=I18N("Already registered"); break; case GWEN_ERROR_NOT_REGISTERED: s=I18N("Not registered"); break; case GWEN_ERROR_BAD_SIZE: s=I18N("Bad size"); break; case GWEN_ERROR_ENCRYPT: s=I18N("Could not encrypt"); break; case GWEN_ERROR_DECRYPT: s=I18N("Could not decrypt"); break; case GWEN_ERROR_SIGN: s=I18N("Could not sign"); break; case GWEN_ERROR_VERIFY: s=I18N("Could not verify"); break; case GWEN_ERROR_SSL: s=I18N("Generic SSL error"); break; default: s="Unknown error"; } return s; } gwenhywfar-5.12.1/src/base/tree.h0000666000175000017500000004365313503750454013540 00000000000000/*************************************************************************** begin : Fri Jan 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #include #include #include #ifndef GWEN_DUMMY_EMPTY_ARG /** Necessary for MSVC compiler because it does not accept a left-out macro argument. */ # define GWEN_DUMMY_EMPTY_ARG #endif #ifndef GWEN_TREE_H #define GWEN_TREE_H #ifdef __cplusplus extern "C" { #endif /** @defgroup GWEN_MACRO_TREE Macros For Typesafe Tree Handling * * The macros of this group facilitates typesafe use of trees. * *

* Let's assume you have a structure type called MYSTRUCT and you want * to manage lists of them. Let's further assume that you want the * functions dealing with that struct have prefixes like MyStruct (as in * @b MyStruct_new) *

* The header file would look like this: * * @code * * / * mystruct.h * / * * #ifndef MYSTRUCT_H * #define MYSTRUCT_H * * typedef struct MYSTRUCT MYSTRUCT; * * GWEN_TREE_FUNCTION_DEFS(MYSTRUCT, MyStruct); * * struct MYSTRUCT { * GWEN_TREE_ELEMENT(MYSTRUCT); * int myData; * } * * * MYSTRUCT *MyStruct_new(int myData); * void MyStruct_free(MYSTRUCT *myStruct); * * #endif * @endcode *

* This defines all necessary data and function prototypes needed for * list management. *

* *

* The code file would look quite similar to the following: *

* * @code * * / * mystruct.c * / * * GWEN_TREE_FUNCTIONS(MYSTRUCT, MyStruct) * * MYSTRUCT *MyStruct_new(int myData) { * MYSTRUCT *pMyStruct; * * pMyStruct=(MYSTRUCT*)malloc(sizeof(MYSTRUCT)); * memset(pMyStruct, 0, sizeof(MYSTRUCT)); * * GWEN_TREE_INIT(MYSTRUCT, pMyStruct) * * pMyStruct->myData=myData; * return pMyStruct; * } * * void MyStruct_free(MYSTRUCT *pMyStruct) { * if (pMyStruct) { * pMyStruct->myData=0; * * GWEN_TREE_FINI(MYSTRUCT, pMyStruct) * * free(pMyStruct); * } * } * * @endcode * Please note the three macros used in the code file: *
    *
  • @ref GWEN_TREE_FUNCTIONS creates the functions for the list * management
  • *
  • @ref GWEN_TREE_INIT initializes the list data inside your * struct to defined values
  • *
  • @ref GWEN_TREE_FINI frees all ressources occupied by the list * management code. Please note that this macro should be the last * statement inside the destructor function before @b free()
  • *
* *

Note: When writing these macro code lines, the original ISO * C89 standard for the C language does not allow terminating the * macro statement with a semicolon ';'. Any recent compiler will * probably silently ignore such an extra ';', but you should be * aware that this can cause problems once one of your users tries * to compile this with a different compiler. Therefore these code * lines should end directly with the closing parentheses.

* *

* The list management code assumes that there is a function called * (in this example) @b MyStruct_free() (or generally: TYPEPREFIX_free). * This is used when destroying a list of MYSTRUCT elements. In this case * all elements still enlisted are destroyed upon destruction of the list. *

*/ /*@{*/ /** @name Internal Functions * * All functions and structs within this group should be considered * internal. They just implement the functionality behind the typesafe list * macros (see @ref GWEN_TREE_FUNCTION_LIB_DEFS and following). */ /*@{*/ typedef struct GWEN_TREE GWEN_TREE; typedef struct GWEN_TREE_ELEMENT GWEN_TREE_ELEMENT; /** Allocate (create) a new empty list. */ GWENHYWFAR_API GWEN_TREE *GWEN_Tree_new(void); /** Free (delete) an existing list. The list elements are * untouched by this function; they need to be freed * beforehand. */ GWENHYWFAR_API void GWEN_Tree_free(GWEN_TREE *l); /** Returns the number of elements in this list. This value is * cached in the list structure, so this function is a cheap * function. */ GWENHYWFAR_API int GWEN_Tree_GetCount(const GWEN_TREE *l); /** Adds (appends) a toplevel tree element. (This * operation is also called "append" or "push_back" elsewhere.) */ GWENHYWFAR_API void GWEN_Tree_Add(GWEN_TREE *l, GWEN_TREE_ELEMENT *el); /** Inserts (prepends) a toplevel tree element at the beginning of the * list. (This operation is also called "prepend" or "push_front" * elsewhere.) */ GWENHYWFAR_API void GWEN_Tree_Insert(GWEN_TREE *l, GWEN_TREE_ELEMENT *el); /** Deletes (removes) a tree element from the tree it used to * belong to. The tree element is not free'd or anything, it is * only removed from the list it used to belong to. (This * operation is also called "remove" or "unlink" elsewhere.) */ GWENHYWFAR_API void GWEN_Tree_Del(GWEN_TREE_ELEMENT *el); /** Replaces a tree element with another one, so the replacement takes the place of the given element. * The given element to replace is unlinked in the process and can be free'd. * The replacement MUST NOT be part of any tree. */ GWENHYWFAR_API void GWEN_Tree_Replace(GWEN_TREE_ELEMENT *elToReplace, GWEN_TREE_ELEMENT *elReplacement); /** Adds (appends) the second list to the end of the first * list. (This operation is also called "append" or "concatenate" * elsewhere.) * The second list will be empty upon return. */ GWENHYWFAR_API void GWEN_Tree_AddList(GWEN_TREE *dest, GWEN_TREE *l); /** Add a child below the given element. */ GWENHYWFAR_API void GWEN_Tree_AddChild(GWEN_TREE_ELEMENT *where, GWEN_TREE_ELEMENT *el); /** Insert a child below the given element. */ GWENHYWFAR_API void GWEN_Tree_InsertChild(GWEN_TREE_ELEMENT *where, GWEN_TREE_ELEMENT *el); /** Returns the data pointer of the first list element. */ GWENHYWFAR_API void *GWEN_Tree_GetFirst(const GWEN_TREE *l); /** Returns the data pointer of the last list element. */ GWENHYWFAR_API void *GWEN_Tree_GetLast(const GWEN_TREE *l); /** Allocate (create) a new list element structure. */ GWENHYWFAR_API GWEN_TREE_ELEMENT *GWEN_TreeElement_new(void *d); /** Free (delete) a list element structure. */ GWENHYWFAR_API void GWEN_TreeElement_free(GWEN_TREE_ELEMENT *el); /** Returns the data pointer of the list element that is the * previous (predecessor) to the given one in its list. If there * is no such prepending list element, returns NULL. */ GWENHYWFAR_API void *GWEN_TreeElement_GetPrevious(const GWEN_TREE_ELEMENT *el); /** Returns the data pointer of the list element that is the next * one (successor) to the given one in its list. If there is no * such prepending list element, returns NULL. */ GWENHYWFAR_API void *GWEN_TreeElement_GetNext(const GWEN_TREE_ELEMENT *el); /** Returns the element which is logically below the given one. * The order of search is this: *
    *
  • first child of the given element
  • *
  • next neighbour of the given element
  • *
  • loop for every parent: check next neighbour of the given element's parent (if any)
  • *
*/ GWENHYWFAR_API void *GWEN_TreeElement_GetBelow(const GWEN_TREE_ELEMENT *el); /** Returns the first child of the given element. */ GWENHYWFAR_API void *GWEN_TreeElement_GetFirstChild(const GWEN_TREE_ELEMENT *el); /** Returns the last child of the given element. */ GWENHYWFAR_API void *GWEN_TreeElement_GetLastChild(const GWEN_TREE_ELEMENT *el); GWENHYWFAR_API void *GWEN_TreeElement_GetParent(const GWEN_TREE_ELEMENT *el); /** Returns the number of children of the given element */ GWENHYWFAR_API uint32_t GWEN_TreeElement_GetChildrenCount(const GWEN_TREE_ELEMENT *el); /*@}*/ /** @name Typesafe Macros * */ /*@{*/ /** * Use this inside the declaration of a struct for which you want to create * lists. */ #define GWEN_TREE_ELEMENT(t) \ GWEN_TREE_ELEMENT *_tree_element; /** * Use this macro in your public header files to export only list functions * which do not modify a list. This allows your code to return lists which can * not be modified by callers. It also prevents callers from creating their * own lists (this is sometimes needed). */ #define GWEN_TREE_FUNCTION_LIB_DEFS_CONST(t, pr, decl) \ typedef GWEN_TREE t##_TREE; \ \ decl t* pr##_Tree_GetFirst(const t##_TREE *l); \ decl t* pr##_Tree_GetLast(const t##_TREE *l); \ decl t* pr##_Tree_GetNext(const t *element); \ decl t* pr##_Tree_GetPrevious(const t *element); \ decl t* pr##_Tree_GetBelow(const t *element); \ decl uint32_t pr##_Tree_GetCount(const t##_TREE *l); \ decl int pr##_Tree_HasElement(const t##_TREE *l, const t *element); \ decl t* pr##_Tree_GetFirstChild(const t *element); \ decl t* pr##_Tree_GetLastChild(const t *element); \ decl uint32_t pr##_Tree_GetChildrenCount(const t *element); \ decl t* pr##_Tree_GetParent(const t *element); #define GWEN_TREE_FUNCTION_LIB_DEFS_NOCONST(t, pr, decl) \ typedef GWEN_TREE_ELEMENT t##_TREE_ELEMENT; \ \ decl void pr##_Tree_Clear(t##_TREE *l); \ decl t##_TREE* pr##_Tree_new(); \ decl void pr##_Tree_free(t##_TREE *l); \ decl void pr##_Tree_AddList(t##_TREE *dst, t##_TREE *l); \ decl void pr##_Tree_Add(t##_TREE *list, t *element); \ decl void pr##_Tree_Insert(t##_TREE *list, t *element); \ decl void pr##_Tree_Del(t *element); \ decl void pr##_Tree_Replace(t *elToReplace, t *elReplacement); \ \ decl void pr##_Tree_AddChild(t *where, t *element); \ decl void pr##_Tree_InsertChild(t *where, t *element); \ \ decl int pr##_Tree_HasChildElement(const t *who, const t *element); \ decl void pr##_Tree_ClearChildren(t *element); \ #define GWEN_TREE_FUNCTION_DEFS_CONST(t, pr) \ GWEN_TREE_FUNCTION_LIB_DEFS_CONST(t, pr, GWEN_DUMMY_EMPTY_ARG) #define GWEN_TREE_FUNCTION_DEFS_NOCONST(t, pr) \ GWEN_TREE_FUNCTION_LIB_DEFS_NOCONST(t, pr, GWEN_DUMMY_EMPTY_ARG) /** * Use this in public header files to define some prototypes for list * functions. * Let's assume the type of your list elements is "MYTYPE" and you want to * use the prefix "MyType_" for the list functions. * The following function prototypes will then be created: *
    *
  • * void MyType_Tree_Add(MYTYPE *element, MYTYPE_TREE *list);
    * Adds (appends) a MYTYPE struct at the end of the given * list. (We apologize for the unusual argument order here.) *
  • *
  • * void MyType_Tree_Del(MYTYPE *element);
    * Removes a MyType struct from the list it is enlisted to. *
  • *
  • * MYTYPE *MyType_Tree_First(MYTYPE *element);
    * Returns the first element of the given list. *
  • *
  • * MYTYPE* MyType_Tree_Next(const MYTYPE *element);
    * Returns the next list element to the given one (the * successor) in its list. *
  • *
  • * MYTYPE* MyType_Tree_Previous(const MYTYPE *element);
    * Returns the previous list element to the given one (the * predecessor) in its list. *
  • *
  • * void MyType_Tree_Clear(MYTYPE *element);
    * Frees all entries of the given list. * This function assumes that there is a function Mytype_free(). *
  • *
  • * MYTYPE_TREE *MyType_Tree_new();
    * Creates a new list of elements of MYTYPE type. *
  • *
  • * void MyType_Tree_free(MYTYPE_TREE *l);
    * Clears and frees a list of elements of MYTYPE type. * All objects inside the list are freed. *
  • *
* */ #define GWEN_TREE_FUNCTION_LIB_DEFS(t, pr, decl) \ GWEN_TREE_FUNCTION_LIB_DEFS_CONST(t, pr, decl) \ GWEN_TREE_FUNCTION_LIB_DEFS_NOCONST(t, pr, decl) /** * This macro should be used in applications, not in libraries. In * libraries please use the macro @ref GWEN_TREE_FUNCTION_LIB_DEFS. */ #define GWEN_TREE_FUNCTION_DEFS(t, pr) \ GWEN_TREE_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG) /** * Use this inside your code files (*.c). * Actually implements the functions for which the prototypes have been * defined via @ref GWEN_TREE_FUNCTION_DEFS. */ #define GWEN_TREE_FUNCTIONS(t, pr) \ \ void pr##_Tree_Add(t##_TREE *l, t *element) { \ assert(element); \ assert(element->_tree_element);\ GWEN_Tree_Add(l, element->_tree_element); \ } \ \ void pr##_Tree_AddList(t##_TREE *dst, t##_TREE *l) { \ GWEN_Tree_AddList(dst, l); \ } \ \ void pr##_Tree_Insert(t##_TREE *l, t *element) { \ assert(element); \ assert(element->_tree_element);\ GWEN_Tree_Insert(l, element->_tree_element); \ } \ \ void pr##_Tree_Del(t *element){ \ assert(element); \ assert(element->_tree_element);\ GWEN_Tree_Del(element->_tree_element); \ }\ \ void pr##_Tree_Replace(t *elToReplace, t *elReplacement) { \ assert(elToReplace); \ assert(elToReplace->_tree_element);\ assert(elReplacement); \ assert(elReplacement->_tree_element);\ GWEN_Tree_Replace(elToReplace->_tree_element, elReplacement->_tree_element); \ } \ \ t* pr##_Tree_GetFirst(const t##_TREE *l) { \ if (l) return (t*)GWEN_Tree_GetFirst(l);\ else return 0; \ } \ \ t* pr##_Tree_GetLast(const t##_TREE *l) { \ if (l) return (t*) GWEN_Tree_GetLast(l);\ else return 0; \ } \ \ void pr##_Tree_Clear(t##_TREE *l) { \ t* el; \ while( (el=GWEN_Tree_GetFirst(l)) ) {\ pr##_Tree_Del(el);\ pr##_Tree_ClearChildren(el); \ pr##_free(el);\ } /* while */ \ } \ \ int pr##_Tree_HasElement(const t##_TREE *l, const t *element) { \ const t* el; \ el=(t*)GWEN_Tree_GetFirst(l); \ while(el) {\ if (el==element) \ return 1; \ el=(const t*)GWEN_TreeElement_GetBelow(el->_tree_element); \ } /* while */ \ return 0; \ } \ \ t##_TREE* pr##_Tree_new(){\ return (t##_TREE*)GWEN_Tree_new(); \ }\ \ void pr##_Tree_free(t##_TREE *l) {\ if (l) { \ pr##_Tree_Clear(l);\ GWEN_Tree_free(l); \ }\ } \ \ t* pr##_Tree_GetNext(const t *element) { \ assert(element); \ assert(element->_tree_element);\ return (t*)GWEN_TreeElement_GetNext(element->_tree_element);\ } \ \ t* pr##_Tree_GetPrevious(const t *element) { \ assert(element); \ assert(element->_tree_element);\ return (t*)GWEN_TreeElement_GetPrevious(element->_tree_element);\ } \ \ t* pr##_Tree_GetBelow(const t *element) { \ assert(element); \ assert(element->_tree_element);\ return (t*)GWEN_TreeElement_GetBelow(element->_tree_element);\ } \ \ uint32_t pr##_Tree_GetCount(const t##_TREE *l){\ return GWEN_Tree_GetCount(l);\ } \ \ int pr##_Tree_HasChildElement(const t *who, const t *element) { \ const t* el; \ el=(const t*)GWEN_TreeElement_GetFirstChild(who->_tree_element); \ while(el) {\ if (el==element) \ return 1; \ el=(const t*)GWEN_TreeElement_GetNext(el->_tree_element); \ } /* while */ \ return 0; \ } \ \ void pr##_Tree_AddChild(t *where, t *element) { \ assert(where); \ assert(where->_tree_element);\ assert(element); \ assert(element->_tree_element);\ GWEN_Tree_AddChild(where->_tree_element, element->_tree_element); \ } \ \ void pr##_Tree_InsertChild(t *where, t *element) { \ assert(where); \ assert(where->_tree_element);\ assert(element); \ assert(element->_tree_element);\ GWEN_Tree_InsertChild(where->_tree_element, element->_tree_element); \ } \ \ void pr##_Tree_ClearChildren(t *element) { \ t* c; \ while( (c=GWEN_TreeElement_GetFirstChild(element->_tree_element)) ) {\ pr##_Tree_ClearChildren(c);\ pr##_Tree_Del(c);\ pr##_free(c);\ } /* while */ \ } \ \ t* pr##_Tree_GetFirstChild(const t *element) { \ assert(element); \ assert(element->_tree_element);\ return (t*)GWEN_TreeElement_GetFirstChild(element->_tree_element);\ } \ \ t* pr##_Tree_GetLastChild(const t *element) { \ assert(element); \ assert(element->_tree_element);\ return (t*)GWEN_TreeElement_GetLastChild(element->_tree_element);\ } \ \ uint32_t pr##_Tree_GetChildrenCount(const t *element){\ return GWEN_TreeElement_GetChildrenCount(element->_tree_element);\ } \ \ t* pr##_Tree_GetParent(const t *element) { \ assert(element); \ assert(element->_tree_element);\ return (t*)GWEN_TreeElement_GetParent(element->_tree_element);\ } \ \ /** * Use this in your code file (*.c) inside the init code for the struct * you want to use in lists (in GWEN these are the functions which end with * "_new". */ #define GWEN_TREE_INIT(t, element) \ element->_tree_element=GWEN_TreeElement_new(element); /** * Use this in your code file (*.c) inside the fini code for the struct * you want to use in lists (in GWEN these are the functions which end with * "_free". */ #define GWEN_TREE_FINI(t, element) \ if (element && element->_tree_element) { \ GWEN_TreeElement_free(element->_tree_element); \ element->_tree_element=0; \ } /*@}*/ /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/memory.h0000666000175000017500000000452613542714122014100 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_MEMORY_H #define GWENHYWFAR_MEMORY_H #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API void *GWEN_Memory_malloc(size_t dsize); GWENHYWFAR_API void GWEN_Memory_dealloc(void *p); GWENHYWFAR_API void *GWEN_Memory_realloc(void *oldp, size_t nsize); GWENHYWFAR_API char *GWEN_Memory_strdup(const char *s); #define GWEN_MEM_NEW(typ, memptr) \ memptr=(typ*)GWEN_Memory_malloc(sizeof(typ)); #define GWEN_MEM_FREE(varname) \ GWEN_Memory_dealloc((void*)varname); #define GWEN_NEW_OBJECT(typ, varname)\ {\ varname=(typ*)GWEN_Memory_malloc(sizeof(typ)); \ memset(varname, 0, sizeof(typ));\ } #define GWEN_FREE_OBJECT(varname) \ GWEN_Memory_dealloc((void*)varname); #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_MEMORY_H */ gwenhywfar-5.12.1/src/base/buffer.h0000664000175000017500000004342614144206312014035 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_BUFFER_H #define GWENHYWFAR_BUFFER_H #include #ifdef __cplusplus extern "C" { #endif /** * @brief A dynamically resizeable text buffer. * * @ingroup MOD_BUFFER */ typedef struct GWEN_BUFFER GWEN_BUFFER; #ifdef __cplusplus } #endif #include //#include #include /* This is needed for PalmOS, because it define some functions needed */ #include #ifdef __cplusplus extern "C" { #endif /** @defgroup MOD_BUFFER Buffer Management * @ingroup MOD_BASE * * @brief This file contains the definition of a GWEN_BUFFER, a * dynamically resizeable text buffer. * */ /*@{*/ #define GWEN_BUFFER_MAX_BOOKMARKS 64 #define GWEN_BUFFER_MODE_DYNAMIC 0x0001 #define GWEN_BUFFER_MODE_ABORT_ON_MEMFULL 0x0002 #define GWEN_BUFFER_MODE_READONLY 0x0020 #define GWEN_BUFFER_MODE_DEFAULT \ (\ GWEN_BUFFER_MODE_DYNAMIC | \ GWEN_BUFFER_MODE_ABORT_ON_MEMFULL\ ) /** * Creates a new GWEN_BUFFER, which is a dynamically resizeable * text buffer. * * @param buffer If non-NULL, then this buffer will be used as * actual storage space. Otherwise a new buffer will be allocated * (with @c size bytes) * * @param size If @c buffer was non-NULL, then this argument * must specifiy the size of that buffer. If @c buffer was * NULL, then this argument specifies the number of bytes that * will be allocated. * * @param used Number of bytes of the buffer actually used. This is * interesting when reading from a buffer. * * @param take_ownership If @c buffer was non-NULL and this * argument is nonzero, then the new GWEN_BUFFER object takes over * the ownership of the given @c buffer so that it will be freed * on GWEN_Buffer_free(). If this argument is zero, the given @c * buffer will not be freed. If @c buffer was NULL, this argument * has no effect. */ GWENHYWFAR_API GWEN_BUFFER *GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take_ownership); /** * Increases the internal reference counter. It is decreased by * @ref GWEN_Buffer_free(). */ GWENHYWFAR_API void GWEN_Buffer_Attach(GWEN_BUFFER *bf); /** Frees the given buffer. * * If the internal storage was allocated for this new buffer, then * it will freed here. If the internal storage is used from a * different @c buffer, then it will only be freed if the argument * @c take_ownership of GWEN_Buffer_new() was nonzero. */ GWENHYWFAR_API void GWEN_Buffer_free(GWEN_BUFFER *bf); /** Create a new copy as a duplicate of the buffer @c bf. */ GWENHYWFAR_API GWEN_BUFFER *GWEN_Buffer_dup(GWEN_BUFFER *bf); /** This function relinquishes ownership of the internal buffer * if possible. It returns an error if this object does not own the * buffer (it can't give you what it doesn't possess) or if the * internal pointer to the memory allocated does not match the internal * pointer to the current start of the buffer (this can be the case * when @ref GWEN_Buffer_ReserveBytes() of @ref GWEN_Buffer_Crop() * have been called). */ GWENHYWFAR_API int GWEN_Buffer_Relinquish(GWEN_BUFFER *bf); /** * Returns the current mode of the buffer * (such as @ref GWEN_BUFFER_MODE_DYNAMIC). */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetMode(GWEN_BUFFER *bf); /** * Changes the current mode of the buffer * (such as @ref GWEN_BUFFER_MODE_DYNAMIC). */ GWENHYWFAR_API void GWEN_Buffer_SetMode(GWEN_BUFFER *bf, uint32_t mode); /** * Adds the give mode to the current mode of the buffer * (such as @ref GWEN_BUFFER_MODE_DYNAMIC). */ GWENHYWFAR_API void GWEN_Buffer_AddMode(GWEN_BUFFER *bf, uint32_t mode); /** * Removes the give mode from the current mode of the buffer * (such as @ref GWEN_BUFFER_MODE_DYNAMIC). */ GWENHYWFAR_API void GWEN_Buffer_SubMode(GWEN_BUFFER *bf, uint32_t mode); /** * Returns the hard limit. This is the maximum size of a GWEN_BUFFER in * dynamic mode. */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetHardLimit(GWEN_BUFFER *bf); /** * Changes the hard limit. This is the maximum size of a GWEN_BUFFER in * dynamic mode. */ GWENHYWFAR_API void GWEN_Buffer_SetHardLimit(GWEN_BUFFER *bf, uint32_t l); /** * In dynamic mode, whenever there is new data to allocate then this value * specifies how much data to allocate in addition. * The allocated data in total for this buffer will be aligned to this value. */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetStep(GWEN_BUFFER *bf); /** * In dynamic mode, whenever there is new data to allocate then this value * specifies how much data to allocate in addition. * The allocated data in total for this buffer will be aligned to this value. * 1024 is a reasonable value. This value NEEDS to be aligned 2^n (i.e. * only ONE bit must be set !) */ GWENHYWFAR_API void GWEN_Buffer_SetStep(GWEN_BUFFER *bf, uint32_t step); /** * Reserves the given amount of bytes at the beginning of the buffer. * Please note that this most likely results in a shift of the current * position inside the buffer, so after this call all pointers obtained * from this module (e.g. via @ref GWEN_Buffer_GetStart) are invalid ! * You can use this function to save some memory copy actions when * inserting bytes at the beginning of the buffer. */ GWENHYWFAR_API int GWEN_Buffer_ReserveBytes(GWEN_BUFFER *bf, uint32_t res); /** * Returns the start of the buffer. You can use the function * @ref GWEN_Buffer_GetPos to navigate within the buffer. */ GWENHYWFAR_API char *GWEN_Buffer_GetStart(const GWEN_BUFFER *bf); /** * Returns the size of the buffer (i.e. the number of bytes allocated). */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetSize(const GWEN_BUFFER *bf); /** * Returns the current position within the buffer. This pointer is adjusted * by the various read and write functions. */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetPos(const GWEN_BUFFER *bf); /** * @return 0 if ok, !=0 on error */ GWENHYWFAR_API int GWEN_Buffer_SetPos(GWEN_BUFFER *bf, uint32_t i); /** */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetUsedBytes(const GWEN_BUFFER *bf); /** * Returns the given bookmark */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetBookmark(const GWEN_BUFFER *bf, unsigned int idx); /** * Set a bookmark. These bookmarks are not used by the GWEN_BUFFER functions, * but may be usefull for an application. */ GWENHYWFAR_API void GWEN_Buffer_SetBookmark(GWEN_BUFFER *bf, unsigned int idx, uint32_t v); /** * Copies the contents of the given buffer to this GWEN_BUFFER, if there is * enough room. * The position pointer is adjusted accordingly. * @return 0 if ok, !=0 on error */ GWENHYWFAR_API int GWEN_Buffer_AppendBytes(GWEN_BUFFER *bf, const char *buffer, uint32_t size); /** * Append strings to buffer with a sprintf()-like argument list. * * @return 0 if okay, error code otherwise * @param bf buffer to append data to * @param fmt format string like that for sprintf(). */ GWENHYWFAR_API GWEN_FORMAT(printf, 2, 3) int GWEN_Buffer_AppendArgs(GWEN_BUFFER *bf, const char *fmt, ...); GWENHYWFAR_API int GWEN_Buffer_FillWithBytes(GWEN_BUFFER *bf, unsigned char c, uint32_t size); GWENHYWFAR_API int GWEN_Buffer_FillLeftWithBytes(GWEN_BUFFER *bf, unsigned char c, uint32_t size); /** * Appends a string to the buffer (without the trailing null char!) * The position pointer is adjusted accordingly. * @return 0 if ok, !=0 on error */ GWENHYWFAR_API int GWEN_Buffer_AppendString(GWEN_BUFFER *bf, const char *buffer); /** * Appends a single byte to this GWEN_BUFFER, if there is * enough room. * The position pointer is adjusted accordingly. * @return 0 if ok, !=0 on error */ GWENHYWFAR_API int GWEN_Buffer_AppendByte(GWEN_BUFFER *bf, char c); /** * Inserts multiple bytes at the current position. * If the current position is 0 and there is reserved space at the beginning * of the buffer then that space will be used. * Otherwise the data at the current position will be moved out of the way * and the new bytes inserted. * The position pointer will not be altered, but all pointers obtained from * this module (e.g. via @ref GWEN_Buffer_GetStart) become invalid ! */ GWENHYWFAR_API int GWEN_Buffer_InsertBytes(GWEN_BUFFER *bf, const char *buffer, uint32_t size); /** * This function makes room for the given number of bytes at the current * buffer position. It moves any existing data at the current position * out of the way. * The position pointer will not be altered, but after calling this function * at that position there is the begin of the newly inserted room. * All pointers obtained from this module (e.g. via * @ref GWEN_Buffer_GetStart) become invalid ! * This function updates the bookmarks accordingly. */ GWENHYWFAR_API int GWEN_Buffer_InsertRoom(GWEN_BUFFER *bf, uint32_t size); /** * This function removes the given number of bytes at the current * buffer position. It moves any existing bytes behind the area to be removed * to the current position. * The position pointer will not be altered, but after calling this function * at that position there is the begin of the data behind the removed area. * All pointers obtained from this module (e.g. via * @ref GWEN_Buffer_GetStart) become invalid ! * This function updates the bookmarks accordingly. */ GWENHYWFAR_API int GWEN_Buffer_RemoveRoom(GWEN_BUFFER *bf, uint32_t size); /** * This function remplaces the given number of bytes at the current * buffer position with some new bytes. If the number of bytes to be replaced * does not equal the number of replacement bytes then the buffer is resized * accordingly (e.g. shrunk or extended). * The position pointer will not be altered. * All pointers obtained from this module (e.g. via * @ref GWEN_Buffer_GetStart) become invalid ! * This function updates the bookmarks accordingly. */ GWENHYWFAR_API int GWEN_Buffer_ReplaceBytes(GWEN_BUFFER *bf, uint32_t rsize, const char *buffer, uint32_t size); /** * Inserts the given string at the current position (without the trailing * null byte) * The position pointer will not be altered, but after calling this function * at that position there is the begin of the newly inserted string. * All pointers obtained from this module (e.g. via * @ref GWEN_Buffer_GetStart) become invalid ! * This function updates the bookmarks accordingly. */ GWENHYWFAR_API int GWEN_Buffer_InsertString(GWEN_BUFFER *bf, const char *buffer); /** * Inserts a byte at the current position. * If the current position is 0 and there is reserved space at the beginning * of the buffer then that space will be used. * Otherwise the data at the current position will be moved out of the way * and the new byte inserted. * The position pointer will not be altered, but after calling this function * at that position there is the begin of the newly inserted byte. * All pointers obtained from this module (e.g. via * @ref GWEN_Buffer_GetStart) become invalid ! * This function updates the bookmarks accordingly. */ GWENHYWFAR_API int GWEN_Buffer_InsertByte(GWEN_BUFFER *bf, char c); /** * Returns the byte from the current position. * The position pointer is adjusted accordingly. * @return -1 on error, read char otherwise (in low byte) */ GWENHYWFAR_API int GWEN_Buffer_ReadByte(GWEN_BUFFER *bf); /** * Returns the bytes from the current position. * The position pointer is adjusted accordingly. * @return -1 on error, 0 if ok */ GWENHYWFAR_API int GWEN_Buffer_ReadBytes(GWEN_BUFFER *bf, char *buffer, uint32_t *size); /** * Returns the byte from the current position without changing the * position pointer. So multiple calls to this function will result * in returning the same character. * @return -1 on error, read char otherwise (in low byte) */ GWENHYWFAR_API int GWEN_Buffer_PeekByte(GWEN_BUFFER *bf); /** Move the position pointer forward by the given number @c i. */ GWENHYWFAR_API int GWEN_Buffer_IncrementPos(GWEN_BUFFER *bf, uint32_t i); /** Move the position pointer backward by the given number @c i. */ GWENHYWFAR_API int GWEN_Buffer_DecrementPos(GWEN_BUFFER *bf, uint32_t i); /** * The functions @ref GWEN_Buffer_IncrementPos and @ref GWEN_Buffer_DecrementPos * only modify the internal position pointer. * This function here adjusts the number of used bytes to just before the internal * position pointer. This is often used to avoid copying, like in the following * example: * @code * * char *p; * int i; * * for (i=0; i<100; i++) { * GWEN_Buffer_AllocRoom(buffer, 512); * p=GWEN_Buffer_GetPosPtr(buffer); * READ_512_BYTES_TO_P; * GWEN_Buffer_IncrementPos(buffer, 512); * GWEN_Buffer_AdjustUsedBytes(buffer); * } * * @endcode * */ GWENHYWFAR_API int GWEN_Buffer_AdjustUsedBytes(GWEN_BUFFER *bf); /** Insert the content of the buffer @c sf into the buffer @c bf * at the position of its current position pointer. The size of @c * bf will be increased accordingly. Returns zero on success or * nonzero if this failed (e.g. because of out of memory * error). */ GWENHYWFAR_API int GWEN_Buffer_InsertBuffer(GWEN_BUFFER *bf, GWEN_BUFFER *sf); /** Append the content of the buffer @c sf at the end of the * buffer @c bf. The size of @c bf will be increased * accordingly. Returns zero on success or nonzero if this failed * (e.g. because of out of memory error). */ GWENHYWFAR_API int GWEN_Buffer_AppendBuffer(GWEN_BUFFER *bf, GWEN_BUFFER *sf); /** * Returns the maximum number of bytes which can be written to the buffer * at once (i.e. without reallocation). */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetMaxUnsegmentedWrite(GWEN_BUFFER *bf); /** * Returns the number of bytes from pos to the end of the used area. */ GWENHYWFAR_API uint32_t GWEN_Buffer_GetBytesLeft(GWEN_BUFFER *bf); /** * Returns a pointer to the current position within the buffer. */ GWENHYWFAR_API char *GWEN_Buffer_GetPosPointer(const GWEN_BUFFER *bf); /** * Resets the position pointer and the byte counter. */ GWENHYWFAR_API void GWEN_Buffer_Reset(GWEN_BUFFER *bf); /** * Resets the pos pointer */ GWENHYWFAR_API void GWEN_Buffer_Rewind(GWEN_BUFFER *bf); /** * Make sure that the buffer has enough room for the given bytes. */ GWENHYWFAR_API int GWEN_Buffer_AllocRoom(GWEN_BUFFER *bf, uint32_t size); /* crops the buffer to the specified bytes */ GWENHYWFAR_API int GWEN_Buffer_Crop(GWEN_BUFFER *bf, uint32_t pos, uint32_t l); /* Overwrite complete buffer with a given value. * This does not only overwrite the used bytes but all the memory held * by this object. */ GWENHYWFAR_API void GWEN_Buffer_OverwriteContent(GWEN_BUFFER *bf, int c); /** * Look for the openingString and the closingString in the buffer, if they exist * remove all outside those strings, in some cases including the opening/closing string. * * @return 0 if okay, error code otherwise * @param bf buffer to operate on * @param openingString string which starts the area you are interested in * @param closingString string which ends the area you are interested in * @param onlyBetween if !=0 the opening/closing string are also removed from the buffer */ GWENHYWFAR_API int GWEN_Buffer_KeepTextBetweenStrings(GWEN_BUFFER *bf, const char *openingString, const char *closingString, int onlyBetween); /** Print the current content of buffer @c bf into the file @c f. */ GWENHYWFAR_API void GWEN_Buffer_Dump(GWEN_BUFFER *bf, unsigned int insert); /** * This is a callback function to be used by GWEN_MULTICACHE (and only for that). * It internally calls @ref GWEN_Buffer_Attach(). */ GWENHYWFAR_API int GWENHYWFAR_CB GWEN_Buffer_CacheFn_Attach(void *ptr); /** * This is a callback function to be used by GWEN_MULTICACHE (and only for that). * It internally calls @ref GWEN_Buffer_free(). */ GWENHYWFAR_API int GWENHYWFAR_CB GWEN_Buffer_CacheFn_Free(void *ptr); /*@}*/ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/i18n.c0000666000175000017500000001544713550706616013356 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "i18n_l.h" #include #include #include #include #include #include #include #include #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_I18N # include # include #endif static GWEN_STRINGLIST *gwen_i18n__localelist=0; static char *gwen_i18n__currentlocale=0; #ifdef OS_WIN32 # ifdef HAVE_I18N struct gwen_i18n_tabletype { const char *win_name; const char *nls_name; }; static struct gwen_i18n_tabletype gwen_i18n___localetable[]= { { "German_Germany", "de_DE" }, { "English_UK", "en_GB" }, { "English_US", "en_US" }, { "French_France", "fr_FR" }, { NULL, NULL } }; static const char *gwen_i18n_transwinlocale(const char *s) { char *cs; char *p; struct gwen_i18n_tabletype *tt; cs=strdup(s); /* find complete */ tt=gwen_i18n___localetable; while (tt->win_name) { if (strcasecmp(tt->win_name, cs)==0) { free(cs); return tt->nls_name; } tt++; } p=strrchr(cs, '.'); if (p) { *p=0; /* find partial string */ tt=gwen_i18n___localetable; while (tt->win_name) { if (strcasecmp(tt->win_name, cs)==0) { free(cs); return tt->nls_name; } tt++; } } p=strrchr(cs, '_'); if (p) { *p=0; /* find partial string */ tt=gwen_i18n___localetable; while (tt->win_name) { if (strcasecmp(tt->win_name, cs)==0) { free(cs); return tt->nls_name; } tt++; } } free(cs); DBG_ERROR(GWEN_LOGDOMAIN, "No translation found for WIN32 locale [%s]", s); return s; } # endif #endif int GWEN_I18N_ModuleInit(void) { const char *localedir; GWEN_STRINGLIST *slist; gwen_i18n__localelist=GWEN_StringList_new(); slist=GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_LOCALEDIR); if (slist) { if (GWEN_StringList_Count(slist) > 0) { int rv; localedir=GWEN_StringList_FirstString(slist); rv=GWEN_I18N_BindTextDomain_Dir(PACKAGE, localedir); if (rv) { DBG_WARN(GWEN_LOGDOMAIN, "Could not bind textdomain (%d)", rv); } else { rv=GWEN_I18N_BindTextDomain_Codeset(PACKAGE, "UTF-8"); if (rv) { DBG_WARN(GWEN_LOGDOMAIN, "Could not set codeset (%d)", rv); } } /* set locale */ if (GWEN_I18N_SetLocale("")) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not set locale"); } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Empty locale path list"); } GWEN_StringList_free(slist); } else { DBG_ERROR(GWEN_LOGDOMAIN, "No locale path list"); } return 0; } int GWEN_I18N_ModuleFini(void) { GWEN_StringList_free(gwen_i18n__localelist); free(gwen_i18n__currentlocale); return 0; } int GWEN_I18N_SetLocale(const char *s) { const char *realLocale; char *p; char *cs; assert(s); #ifdef HAVE_I18N realLocale=setlocale(LC_ALL, s); if (realLocale==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Unable to set locale [%s]", s); realLocale=s; } else { #ifdef OS_WIN32 const char *t; t=gwen_i18n_transwinlocale(realLocale); DBG_INFO(GWEN_LOGDOMAIN, "Real locale is [%s] (from [%s])", t, realLocale); realLocale=t; #else DBG_INFO(GWEN_LOGDOMAIN, "Real locale is [%s]", realLocale); #endif } #else realLocale=s; #endif cs=strdup(realLocale); GWEN_StringList_Clear(gwen_i18n__localelist); GWEN_StringList_AppendString(gwen_i18n__localelist, cs, 0, 1); p=strrchr(cs, '@'); if (p) { *p=0; GWEN_StringList_AppendString(gwen_i18n__localelist, cs, 0, 1); } p=strrchr(cs, '.'); if (p) { *p=0; GWEN_StringList_AppendString(gwen_i18n__localelist, cs, 0, 1); } p=strrchr(cs, '_'); if (p) { *p=0; GWEN_StringList_AppendString(gwen_i18n__localelist, cs, 0, 1); } free(cs); free(gwen_i18n__currentlocale); gwen_i18n__currentlocale=strdup(realLocale); return 0; } GWEN_STRINGLIST *GWEN_I18N_GetCurrentLocaleList(void) { return gwen_i18n__localelist; } const char *GWEN_I18N_GetCurrentLocale(void) { return gwen_i18n__currentlocale; } const char *GWEN_I18N_Translate(const char *txtdom, const char *text) { #ifdef HAVE_I18N const char *p; p=strchr(text, '|'); if (p) { const char *s; s=dgettext(txtdom, text); if (strcmp(s, text)==0) return ++p; else return s; } else return dgettext(txtdom, text); #else const char *p; p=strchr(text, '|'); if (p) return ++p; return text; #endif } int GWEN_I18N_BindTextDomain_Dir(const char *txtdom, const char *folder) { #ifdef HAVE_I18N if (NULL==bindtextdomain(txtdom, folder)) { DBG_INFO(GWEN_LOGDOMAIN, "bindtextdomain(): %s", strerror(errno)); return GWEN_ERROR_GENERIC; } return 0; #else return GWEN_ERROR_NOT_SUPPORTED; #endif } int GWEN_I18N_BindTextDomain_Codeset(const char *txtdom, const char *cs) { #ifdef HAVE_I18N if (NULL==bind_textdomain_codeset(txtdom, cs)) { DBG_INFO(GWEN_LOGDOMAIN, "bind_textdomain_codeset(): %s", strerror(errno)); return GWEN_ERROR_GENERIC; } return 0; #else return GWEN_ERROR_NOT_SUPPORTED; #endif } gwenhywfar-5.12.1/src/base/idmap.h0000666000175000017500000002402313473346361013665 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_IDMAP_H #define GWENHYWFAR_IDMAP_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_IDMAP GWEN_IDMAP; typedef enum { GWEN_IdMapResult_Ok=0, GWEN_IdMapResult_NoFit, GWEN_IdMapResult_NotFound } GWEN_IDMAP_RESULT; typedef enum { GWEN_IdMapAlgo_Unknown=0, GWEN_IdMapAlgo_Hex4 } GWEN_IDMAP_ALGO; /** @name Macros for Typesafe ID maps * */ /*@{*/ #ifndef GWEN_DUMMY_EMPTY_ARG /** Necessary for MSVC compiler because it does not accept a left-out macro argument. */ # define GWEN_DUMMY_EMPTY_ARG #endif #define GWEN_IDMAP_FUNCTION_LIB_DEFS(t, pr, decl) \ typedef GWEN_IDMAP t##_IDMAP; \ \ decl t##_IDMAP *pr##_IdMap_new(GWEN_IDMAP_ALGO algo); \ decl void pr##_IdMap_free(t##_IDMAP *l); \ decl void pr##_IdMap_freeAll(t##_IDMAP *l); \ decl void pr##_IdMap_FreeItems(t##_IDMAP *l); \ decl GWEN_IDMAP_RESULT pr##_IdMap_Insert(t##_IDMAP *l, \ uint32_t id, \ t* ptr); \ decl GWEN_IDMAP_RESULT pr##_IdMap_Remove(t##_IDMAP *l, \ uint32_t id); \ decl t* pr##_IdMap_Find(t##_IDMAP *l, uint32_t id); \ decl GWEN_IDMAP_RESULT pr##_IdMap_GetFirst(const t##_IDMAP *map, \ uint32_t *pid); \ decl GWEN_IDMAP_RESULT pr##_IdMap_GetNext(const t##_IDMAP *map, \ uint32_t *pid); \ decl uint32_t pr##_IdMap_GetSize(const GWEN_IDMAP *map); \ decl void pr##_IdMap_Clear(GWEN_IDMAP *l); #define GWEN_IDMAP_FUNCTION_DEFS(t, pr) \ GWEN_IDMAP_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG) #define GWEN_IDMAP_FUNCTIONS(t, pr) \ t##_IDMAP *pr##_IdMap_new(GWEN_IDMAP_ALGO algo) { \ return (t##_IDMAP*)GWEN_IdMap_new(algo); \ } \ \ void pr##_IdMap_free(t##_IDMAP *l) { \ GWEN_IdMap_free((GWEN_IDMAP*)l); \ } \ \ void pr##_IdMap_freeAll(t##_IDMAP *l) { \ GWEN_IDMAP_RESULT res; \ uint32_t id; \ \ res=pr##_IdMap_GetFirst(l, &id); \ while(res==GWEN_IdMapResult_Ok) { \ uint32_t nextId; \ t *ptr; \ \ nextId=id; \ res=pr##_IdMap_GetNext(l, &nextId); \ ptr=pr##_IdMap_Find(l, id); \ if (ptr) \ pr##_free(ptr); \ id=nextId; \ } \ pr##_IdMap_free(l); \ } \ \ void pr##_IdMap_FreeItems(t##_IDMAP *l) { \ GWEN_IDMAP_RESULT res; \ uint32_t id; \ \ res=pr##_IdMap_GetFirst(l, &id); \ while(res==GWEN_IdMapResult_Ok) { \ uint32_t nextId; \ t *ptr; \ \ nextId=id; \ res=pr##_IdMap_GetNext(l, &nextId); \ ptr=pr##_IdMap_Find(l, id); \ if (ptr) \ pr##_free(ptr); \ pr##_IdMap_Remove(l, id); \ id=nextId; \ } \ } \ \ GWEN_IDMAP_RESULT pr##_IdMap_Insert(t##_IDMAP *l, \ uint32_t id, \ t* ptr) { \ return GWEN_IdMap_Insert((GWEN_IDMAP*)l, id, (void*) ptr); \ } \ \ GWEN_IDMAP_RESULT pr##_IdMap_Remove(t##_IDMAP *l, \ uint32_t id){ \ return GWEN_IdMap_Remove((GWEN_IDMAP*)l, id); \ } \ \ t* pr##_IdMap_Find(t##_IDMAP *l, uint32_t id) { \ return GWEN_IdMap_Find((GWEN_IDMAP*)l, id); \ } \ \ GWEN_IDMAP_RESULT pr##_IdMap_GetFirst(const t##_IDMAP *l, \ uint32_t *pid) { \ return GWEN_IdMap_GetFirst((const GWEN_IDMAP*)l, pid); \ } \ \ GWEN_IDMAP_RESULT pr##_IdMap_GetNext(const t##_IDMAP *l, \ uint32_t *pid) { \ return GWEN_IdMap_GetNext((const GWEN_IDMAP*)l, pid); \ } \ \ uint32_t pr##_IdMap_GetSize(const GWEN_IDMAP *l) { \ return GWEN_IdMap_GetSize((const GWEN_IDMAP*)l); \ } \ \ void pr##_IdMap_Clear(GWEN_IDMAP *l) { \ GWEN_IdMap_Clear((GWEN_IDMAP*)l); \ } /*@}*/ GWENHYWFAR_API GWEN_IDMAP *GWEN_IdMap_new(GWEN_IDMAP_ALGO algo); GWENHYWFAR_API void GWEN_IdMap_free(GWEN_IDMAP *map); GWENHYWFAR_API GWEN_IDMAP_RESULT GWEN_IdMap_Insert(GWEN_IDMAP *map, uint32_t id, void *ptr); GWENHYWFAR_API GWEN_IDMAP_RESULT GWEN_IdMap_Remove(GWEN_IDMAP *map, uint32_t id); GWENHYWFAR_API void *GWEN_IdMap_Find(GWEN_IDMAP *map, uint32_t id); /** * Return the first id in the map. * @param map map to browse * @param pid pointer to a variable to receive the first id in the map. * Upon return this variable will be updated to the first id in the map if * the result is @ref GWEN_IdMapResult_Ok. */ GWENHYWFAR_API GWEN_IDMAP_RESULT GWEN_IdMap_GetFirst(const GWEN_IDMAP *map, uint32_t *pid); /** * Return the next id in the map. * @param map map to browse * @param pid pointer to the id retrieved via @ref GWEN_IdMap_GetFirst. * Upon return this variable will be updated to the next id in the map if * the result is @ref GWEN_IdMapResult_Ok. */ GWENHYWFAR_API GWEN_IDMAP_RESULT GWEN_IdMap_GetNext(const GWEN_IDMAP *map, uint32_t *pid); GWENHYWFAR_API uint32_t GWEN_IdMap_GetSize(const GWEN_IDMAP *map); GWENHYWFAR_API void GWEN_IdMap_Clear(GWEN_IDMAP *map); GWENHYWFAR_API void GWEN_IdMap_Dump(GWEN_IDMAP *map, FILE *f, int indent); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/ringbuffer_p.h0000644000175000017500000000375513142134463015237 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 25 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_RINGBUFFER_P_H #define GWEN_RINGBUFFER_P_H #include struct GWEN_RINGBUFFER { char *ptr; uint32_t bufferSize; uint32_t readPos; uint32_t writePos; uint32_t bytesUsed; uint32_t maxBytesUsed; uint32_t emptyCounter; uint32_t fullCounter; uint32_t throughput; }; #endif /* GWEN_RINGBUFFER_P_H */ gwenhywfar-5.12.1/src/base/pathmanager_p.h0000644000175000017500000000351613142134463015370 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PATHMANAGER_P_H #define GWENHYWFAR_PATHMANAGER_P_H #include "pathmanager_l.h" #include #include #endif /* GWENHYWFAR_PATHMANAGER_P_H */ gwenhywfar-5.12.1/src/base/simpleptrlist-t.c0000666000175000017500000007170613642701350015743 00000000000000/*************************************************************************** begin : Fri Dec 06 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* This file is included by "simpleptrlist.c" */ #include #include "simpleptrlist-t.h" #ifdef GWENHYWFAR_ENABLE_TESTCODE #include #include /* ------------------------------------------------------------------------------------------------ * type definitions * ------------------------------------------------------------------------------------------------ */ typedef struct TEST_TYPE TEST_TYPE; GWEN_LIST_FUNCTION_DEFS(TEST_TYPE, TestType) struct TEST_TYPE { GWEN_LIST_ELEMENT(TEST_TYPE) int _refCounter; int testPosition; char *testStringPtr; uint8_t testHash[20]; }; /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static TEST_TYPE *TestType_new(const char *s, int pos); static void TestType_Attach(TEST_TYPE *tt); static void TestType_free(TEST_TYPE *tt); static int TestType_CalcHash(TEST_TYPE *tt); static int TestType_TestHash(const TEST_TYPE *tt); static GWENHYWFAR_CB void _attachToTestType(GWEN_SIMPLEPTRLIST *pl, void *p); static GWENHYWFAR_CB void _detachFromTestType(GWEN_SIMPLEPTRLIST *pl, void *p); static int GWENHYWFAR_CB test1(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test2(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test3(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test4(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test5(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test6(GWEN_TEST_MODULE *mod); static TEST_TYPE *createTestType(int num); static void dumpTestTypeList(TEST_TYPE_LIST *ttList); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ int GWEN_SimplePtrList_AddTests(GWEN_TEST_MODULE *mod) { GWEN_TEST_MODULE *newMod; newMod=GWEN_Test_Module_AddModule(mod, "GWEN_SimplePtrList", NULL); GWEN_Test_Module_AddTest(newMod, "test1", test1, NULL); GWEN_Test_Module_AddTest(newMod, "test2", test2, NULL); GWEN_Test_Module_AddTest(newMod, "test3", test3, NULL); GWEN_Test_Module_AddTest(newMod, "test4", test4, NULL); GWEN_Test_Module_AddTest(newMod, "test5", test5, NULL); GWEN_Test_Module_AddTest(newMod, "test6", test6, NULL); return 0; } GWEN_LIST_FUNCTIONS(TEST_TYPE, TestType) TEST_TYPE *TestType_new(const char *s, int pos) { TEST_TYPE *tt; GWEN_NEW_OBJECT(TEST_TYPE, tt); tt->_refCounter=1; GWEN_LIST_INIT(TEST_TYPE, tt); if (s) tt->testStringPtr=strdup(s); tt->testPosition=pos; return tt; } void TestType_Attach(TEST_TYPE *tt) { assert(tt); assert(tt->_refCounter); if (tt && tt->_refCounter) { tt->_refCounter++; /*DBG_ERROR(GWEN_LOGDOMAIN, "Attached (%d: refcount=%d)", tt->testPosition, tt->_refCounter);*/ } else { DBG_ERROR(GWEN_LOGDOMAIN, "NULL pointer or already freed"); } } void TestType_free(TEST_TYPE *tt) { if (tt && tt->_refCounter) { /*DBG_ERROR(GWEN_LOGDOMAIN, "Detaching (%d: refcount=%d)", tt->testPosition, tt->_refCounter);*/ if (tt->_refCounter==1) { GWEN_LIST_FINI(TEST_TYPE, tt); if (tt->testStringPtr) free(tt->testStringPtr); tt->_refCounter=0; GWEN_FREE_OBJECT(tt); } else tt->_refCounter--; } } int TestType_CalcHash(TEST_TYPE *tt) { if (tt->testStringPtr && *(tt->testStringPtr)) { GWEN_MDIGEST *md; int rv; md=GWEN_MDigest_Rmd160_new(); rv=GWEN_MDigest_Digest(md, (const uint8_t *)tt->testStringPtr, strlen(tt->testStringPtr), tt->testHash, sizeof(tt->testHash)); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_MDigest_Begin: %s (%d)", GWEN_Error_SimpleToString(rv), rv); GWEN_MDigest_free(md); return rv; } GWEN_MDigest_free(md); } return 0; } int TestType_TestHash(const TEST_TYPE *tt) { if (tt->testStringPtr && *(tt->testStringPtr)) { GWEN_MDIGEST *md; uint8_t hash[20]; int rv; md=GWEN_MDigest_Rmd160_new(); rv=GWEN_MDigest_Digest(md, (const uint8_t *)tt->testStringPtr, strlen(tt->testStringPtr), hash, sizeof(hash)); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_MDigest_Digest: %s (%d)", GWEN_Error_SimpleToString(rv), rv); GWEN_MDigest_free(md); return rv; } GWEN_MDigest_free(md); if (memcmp(hash, tt->testHash, sizeof(hash))!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid hash, object was modified."); return GWEN_ERROR_GENERIC; } } return 0; } TEST_TYPE *createTestType(int num) { TEST_TYPE *tt; char testString[256]; int rv; snprintf(testString, sizeof(testString), "This is test string number %d", num); tt=TestType_new(testString, num); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not create test object %d", num); return NULL; } rv=TestType_CalcHash(tt); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); TestType_free(tt); return NULL; } return tt; } void _attachToTestType(GWEN_UNUSED GWEN_SIMPLEPTRLIST *pl, void *p) { TEST_TYPE *tt; tt=(TEST_TYPE *) p; TestType_Attach(tt); } void _detachFromTestType(GWEN_UNUSED GWEN_SIMPLEPTRLIST *pl, void *p) { TEST_TYPE *tt; tt=(TEST_TYPE *) p; TestType_free(tt); } void dumpTestTypeList(TEST_TYPE_LIST *ttList) { TEST_TYPE *tt; tt=TestType_List_First(ttList); while (tt) { fprintf(stderr, "%5d: %3d: %s\n", tt->testPosition, tt->_refCounter, tt->testStringPtr); tt=TestType_List_Next(tt); } } /* ------------------------------------------------------------------------------------------------ * test 1: test struct members after construction * ------------------------------------------------------------------------------------------------ */ int test1(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_SIMPLEPTRLIST *pl; int i; pl=GWEN_SimplePtrList_new(128, 128); if (pl==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not create pointer list"); return GWEN_ERROR_GENERIC; } if (pl->refCount!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: refCounter"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->maxEntries!=128) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: maxEntries"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->usedEntries!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: usedEntries"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->steps!=128) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: steps"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->entryList->refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid internal object field: refCounter"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->entryList->storedEntries!=128) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid internal object field: storedEntries"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } for (i=0; i<128; i++) { if (pl->entryList->entries[i]!=NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object entry: idx %d is not NULL", i); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } GWEN_SimplePtrList_free(pl); return 0; } /* ------------------------------------------------------------------------------------------------ * test 2: test adding pointers * ------------------------------------------------------------------------------------------------ */ int test2(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_SIMPLEPTRLIST *pl; int i; pl=GWEN_SimplePtrList_new(128, 128); for (i=0; i<1024; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); idx=GWEN_SimplePtrList_AddPtr(pl, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ if (pl->maxEntries!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: maxEntries"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->usedEntries!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: usedEntries"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } for (i=0; i<1024; i++) { TEST_TYPE *tt; int rv; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(pl, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } rv=TestType_TestHash(tt); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error testing hash of object %d: %s (%d)", i, GWEN_Error_SimpleToString(rv), rv); GWEN_SimplePtrList_free(pl); return rv; } } /* for */ /* free all objects */ for (i=0; i<1024; i++) { TEST_TYPE *tt; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(pl, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } GWEN_SimplePtrList_SetPtrAt(pl, i, NULL); TestType_free(tt); } /* for */ GWEN_SimplePtrList_free(pl); return 0; } /* ------------------------------------------------------------------------------------------------ * test 3: test lazy copying * ------------------------------------------------------------------------------------------------ */ int test3(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_SIMPLEPTRLIST *pl; GWEN_SIMPLEPTRLIST *plCopy; int i; pl=GWEN_SimplePtrList_new(128, 128); for (i=0; i<1000; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); idx=GWEN_SimplePtrList_AddPtr(pl, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ plCopy=GWEN_SimplePtrList_LazyCopy(pl); if (plCopy==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not copy pointer list"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_INVALID; } if (!(plCopy->flags & GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: flags"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (!(pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field in old list: flags"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (plCopy->entryList != pl->entryList) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: entryList (should be the same after lazy copy)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->entryList->refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid internal object field: refCounter (should be 2)"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } for (i=1000; i<1024; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); idx=GWEN_SimplePtrList_AddPtr(plCopy, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ if (plCopy->flags & GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: flags (should have cleared GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (!(pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field in old list: flags (should not have cleared GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (plCopy->entryList == pl->entryList) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: entryList (should have changed)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->entryList->refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid internal object field: refCounter (should be back to 1)"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (plCopy->entryList->refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid internal object field: refCounter (should be 1)"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (plCopy->maxEntries!=1024+128) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: maxEntries (should be 1152)"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (plCopy->usedEntries!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: usedEntries"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->maxEntries!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: maxEntries (should still be 1024)"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (pl->usedEntries!=1000) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field: usedEntries (should still be 1000)"); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } for (i=0; i<1024; i++) { TEST_TYPE *tt; int rv; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(plCopy, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } rv=TestType_TestHash(tt); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error testing hash of object %d: %s (%d)", i, GWEN_Error_SimpleToString(rv), rv); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return rv; } } /* for */ /* free all objects */ for (i=0; i<1024; i++) { TEST_TYPE *tt; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(plCopy, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } GWEN_SimplePtrList_SetPtrAt(plCopy, i, NULL); TestType_free(tt); } /* for */ GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return 0; } /* ------------------------------------------------------------------------------------------------ * test 4: test adding pointers with attach/detach * ------------------------------------------------------------------------------------------------ */ int test4(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_SIMPLEPTRLIST *pl; TEST_TYPE_LIST *ttList; int i; pl=GWEN_SimplePtrList_new(128, 128); GWEN_SimplePtrList_SetAttachObjectFn(pl, _attachToTestType); GWEN_SimplePtrList_SetFreeObjectFn(pl, _detachFromTestType); GWEN_SimplePtrList_AddFlags(pl, GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS); GWEN_SimplePtrList_AddFlags(pl, GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS); ttList=TestType_List_new(); for (i=0; i<1024; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); TestType_List_Add(tt, ttList); idx=GWEN_SimplePtrList_AddPtr(pl, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ if (1) { TEST_TYPE *tt; int cnt=0; tt=TestType_List_First(ttList); while (tt) { if (tt->_refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object is not 2"); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } cnt++; tt=TestType_List_Next(tt); } if (cnt!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Too few objects in list (%d instead of %d)", cnt, 1024); } } for (i=0; i<1024; i++) { TEST_TYPE *tt; int rv; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(pl, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } rv=TestType_TestHash(tt); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error testing hash of object %d: %s (%d)", i, GWEN_Error_SimpleToString(rv), rv); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return rv; } } /* for */ GWEN_SimplePtrList_free(pl); if (1) { TEST_TYPE *tt; int cnt=0; tt=TestType_List_First(ttList); while (tt) { if (tt->_refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object is not 1"); TestType_List_free(ttList); return GWEN_ERROR_GENERIC; } cnt++; tt=TestType_List_Next(tt); } if (cnt!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Too few objects in list (%d instead of %d)", cnt, 1024); } } TestType_List_free(ttList); return 0; } /* ------------------------------------------------------------------------------------------------ * test 5: test lazy copying with attach/detach * ------------------------------------------------------------------------------------------------ */ int test5(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_SIMPLEPTRLIST *pl; GWEN_SIMPLEPTRLIST *plCopy; TEST_TYPE_LIST *ttList; int i; pl=GWEN_SimplePtrList_new(128, 128); GWEN_SimplePtrList_SetAttachObjectFn(pl, _attachToTestType); GWEN_SimplePtrList_SetFreeObjectFn(pl, _detachFromTestType); GWEN_SimplePtrList_AddFlags(pl, GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS); GWEN_SimplePtrList_AddFlags(pl, GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS); ttList=TestType_List_new(); for (i=0; i<1000; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); TestType_List_Add(tt, ttList); idx=GWEN_SimplePtrList_AddPtr(pl, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ plCopy=GWEN_SimplePtrList_LazyCopy(pl); if (plCopy==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not copy pointer list"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_INVALID; } if (!(plCopy->flags & GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field in list: flags (should have set GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (!(plCopy->flags & GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field in list: flags (should have set GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } for (i=1000; i<1024; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); TestType_List_Add(tt, ttList); idx=GWEN_SimplePtrList_AddPtr(plCopy, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ for (i=0; i<1024; i++) { TEST_TYPE *tt; int rv; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(plCopy, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } rv=TestType_TestHash(tt); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error testing hash of object %d: %s (%d)", i, GWEN_Error_SimpleToString(rv), rv); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return rv; } } /* for */ if (1) { TEST_TYPE *tt; int cnt=0; tt=TestType_List_First(ttList); while (tt) { if (cnt<1000) { if (tt->_refCounter!=3) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object %d is not 3 (%d)", cnt, tt->_refCounter); dumpTestTypeList(ttList); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } else { if (tt->_refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object is not 2"); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } cnt++; tt=TestType_List_Next(tt); } if (cnt!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Too few objects in list (%d instead of %d)", cnt, 1024); } } GWEN_SimplePtrList_free(plCopy); if (1) { TEST_TYPE *tt; int cnt=0; tt=TestType_List_First(ttList); while (tt) { if (cnt<1000) { if (tt->_refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object is not 2"); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } else { if (tt->_refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object is not 1"); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } cnt++; tt=TestType_List_Next(tt); } if (cnt!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Too few objects in list (%d instead of %d)", cnt, 1024); } } GWEN_SimplePtrList_free(pl); if (1) { TEST_TYPE *tt; int cnt=0; tt=TestType_List_First(ttList); while (tt) { if (tt->_refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object is not 1"); TestType_List_free(ttList); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } cnt++; tt=TestType_List_Next(tt); } if (cnt!=1024) { DBG_ERROR(GWEN_LOGDOMAIN, "Too few objects in list (%d instead of %d)", cnt, 1024); } } TestType_List_free(ttList); return 0; } /* ------------------------------------------------------------------------------------------------ * test 6: test lazy copying with attach/detach and setPtr * ------------------------------------------------------------------------------------------------ */ int test6(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_SIMPLEPTRLIST *pl; GWEN_SIMPLEPTRLIST *plCopy; TEST_TYPE_LIST *ttList; int i; pl=GWEN_SimplePtrList_new(128, 128); GWEN_SimplePtrList_SetAttachObjectFn(pl, _attachToTestType); GWEN_SimplePtrList_SetFreeObjectFn(pl, _detachFromTestType); GWEN_SimplePtrList_AddFlags(pl, GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS); GWEN_SimplePtrList_AddFlags(pl, GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS); ttList=TestType_List_new(); for (i=0; i<1024; i++) { TEST_TYPE *tt; int64_t idx; tt=createTestType(i); TestType_List_Add(tt, ttList); idx=GWEN_SimplePtrList_AddPtr(pl, tt); if (idx<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding pointer %d to list: %s (%d)", i, GWEN_Error_SimpleToString((int)idx), (int)idx); GWEN_SimplePtrList_free(pl); return (int) idx; } } /* for */ plCopy=GWEN_SimplePtrList_LazyCopy(pl); if (plCopy==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not copy pointer list"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_INVALID; } if (!(plCopy->flags & GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field in list: flags (should have set GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (!(plCopy->flags & GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid object field in list: flags (should have set GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS)"); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (1) { TEST_TYPE *tt; int rv; tt=createTestType(1024); TestType_List_Add(tt, ttList); rv=GWEN_SimplePtrList_SetPtrAt(plCopy, 100, tt); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error setting pointer %d in list: %s (%d)", 100, GWEN_Error_SimpleToString(rv), rv); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return rv; } } for (i=0; i<1024; i++) { TEST_TYPE *tt; int rv; tt=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(plCopy, i); if (tt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No object at position %d", i); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } rv=TestType_TestHash(tt); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error testing hash of object %d: %s (%d)", i, GWEN_Error_SimpleToString(rv), rv); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return rv; } } /* for */ if (1) { TEST_TYPE *tt; int cnt=0; tt=TestType_List_First(ttList); while (tt) { if (cnt==1024 || cnt==100) { if (tt->_refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object %d is not 2 (%d)", cnt, tt->_refCounter); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } else { if (tt->_refCounter!=3) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter of object %d is not 3 (%d)", cnt, tt->_refCounter); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } cnt++; tt=TestType_List_Next(tt); } if (cnt!=1025) { DBG_ERROR(GWEN_LOGDOMAIN, "Too few objects in list (%d instead of %d)", cnt, 1024); } } if (1) { TEST_TYPE *tt1; TEST_TYPE *tt2; tt1=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(plCopy, 100); tt2=(TEST_TYPE *) GWEN_SimplePtrList_GetPtrAt(pl, 100); if (!(tt1 && tt2 && tt1!=tt2)) { DBG_ERROR(GWEN_LOGDOMAIN, "Pointers 100 are unexpectedly equal in both lists"); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } if (tt1->_refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Refcounter in copy list object 100 is not 2 (%d)", tt1->_refCounter); TestType_List_free(ttList); GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); return GWEN_ERROR_GENERIC; } } GWEN_SimplePtrList_free(plCopy); GWEN_SimplePtrList_free(pl); TestType_List_free(ttList); return 0; } #else int GWEN_SimplePtrList_AddTests(GWEN_TEST_MODULE *mod) { DBG_ERROR(GWEN_LOGDOMAIN, "Gwenhywfar was compiled without test code enabled."); return GWEN_ERROR_GENERIC; } #endif gwenhywfar-5.12.1/src/base/list1.h0000664000175000017500000003610114576403603013623 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #include #include #include #ifndef GWEN_DUMMY_EMPTY_ARG /** Necessary for MSVC compiler because it does not accept a left-out macro argument. */ # define GWEN_DUMMY_EMPTY_ARG #endif #ifndef GWEN_LIST1_H #define GWEN_LIST1_H #ifdef __cplusplus extern "C" { #endif /** @defgroup GWEN_MACRO_LIST Macros For Typesafe List Handling * * The macros of this group facilitates typesafe use of lists. * *

* Let's assume you have a structure type called MYSTRUCT and you want * to manage lists of them. Let's further assume that you want the * functions dealing with that struct have prefixes like MyStruct (as in * @b MyStruct_new) *

* The header file would look like this: * * @code * * / * mystruct.h * / * * #ifndef MYSTRUCT_H * #define MYSTRUCT_H * * typedef struct MYSTRUCT MYSTRUCT; * * GWEN_LIST_FUNCTION_DEFS(MYSTRUCT, MyStruct); * * struct MYSTRUCT { * GWEN_LIST_ELEMENT(MYSTRUCT); * int myData; * } * * * MYSTRUCT *MyStruct_new(int myData); * void MyStruct_free(MYSTRUCT *myStruct); * * #endif * @endcode *

* This defines all necessary data and function prototypes needed for * list management. *

* *

* The code file would look quite similar to the following: *

* * @code * * / * mystruct.c * / * * GWEN_LIST_FUNCTIONS(MYSTRUCT, MyStruct) * * MYSTRUCT *MyStruct_new(int myData) { * MYSTRUCT *pMyStruct; * * pMyStruct=(MYSTRUCT*)malloc(sizeof(MYSTRUCT)); * memset(pMyStruct, 0, sizeof(MYSTRUCT)); * * GWEN_LIST_INIT(MYSTRUCT, pMyStruct) * * pMyStruct->myData=myData; * return pMyStruct; * } * * void MyStruct_free(MYSTRUCT *pMyStruct) { * if (pMyStruct) { * pMyStruct->myData=0; * * GWEN_LIST_FINI(MYSTRUCT, pMyStruct) * * free(pMyStruct); * } * } * * @endcode * Please note the three macros used in the code file: *
    *
  • @ref GWEN_LIST_FUNCTIONS creates the functions for the list * management
  • *
  • @ref GWEN_LIST_INIT initializes the list data inside your * struct to defined values
  • *
  • @ref GWEN_LIST_FINI frees all ressources occupied by the list * management code. Please note that this macro should be the last * statement inside the destructor function before @b free()
  • *
* *

Note: When writing these macro code lines, the original ISO * C89 standard for the C language does not allow terminating the * macro statement with a semicolon ';'. Any recent compiler will * probably silently ignore such an extra ';', but you should be * aware that this can cause problems once one of your users tries * to compile this with a different compiler. Therefore these code * lines should end directly with the closing parentheses.

* *

* The list management code assumes that there is a function called * (in this example) @b MyStruct_free() (or generally: TYPEPREFIX_free). * This is used when destroying a list of MYSTRUCT elements. In this case * all elements still enlisted are destroyed upon destruction of the list. *

*/ /*@{*/ /** @name Internal Functions * * All functions and structs within this group should be considered * internal. They just implement the functionality behind the typesafe list * macros (see @ref GWEN_LIST_FUNCTION_LIB_DEFS and following). */ /*@{*/ typedef struct GWEN_LIST1 GWEN_LIST1; typedef struct GWEN_LIST1_ELEMENT GWEN_LIST1_ELEMENT; typedef int GWENHYWFAR_CB(*GWEN_LIST1_SORT_FN)(const void *a, const void *b, int ascending); /** Allocate (create) a new empty list. */ GWENHYWFAR_API GWEN_LIST1 *GWEN_List1_new(void); /** Free (delete) an existing list. The list elements are * untouched by this function; they need to be freed * beforehand. */ GWENHYWFAR_API void GWEN_List1_free(GWEN_LIST1 *l); /** Returns the number of elements in this list. This value is * cached in the list structure, so this function is a cheap * function. */ GWENHYWFAR_API int GWEN_List1_GetCount(const GWEN_LIST1 *l); /** Adds (appends) a list element at the end of the list. (This * operation is also called "append" or "push_back" elsewhere.) */ GWENHYWFAR_API int GWEN_List1_Add(GWEN_LIST1 *l, GWEN_LIST1_ELEMENT *el); /** Inserts (prepends) a list element at the beginning of the * list. (This operation is also called "prepend" or "push_front" * elsewhere.) */ GWENHYWFAR_API int GWEN_List1_Insert(GWEN_LIST1 *l, GWEN_LIST1_ELEMENT *el); /** Deletes (removes) a list element from the list it used to * belong to. The list element is not free'd or anything, it is * only removed from the list it used to belong to. (This * operation is also called "remove" or "unlink" elsewhere.) */ GWENHYWFAR_API int GWEN_List1_Del(GWEN_LIST1_ELEMENT *el); /** Adds (appends) the second list to the end of the first * list. (This operation is also called "append" or "concatenate" * elsewhere.) */ GWENHYWFAR_API int GWEN_List1_AddList(GWEN_LIST1 *dest, GWEN_LIST1 *l); /** Returns the data pointer of the first list element. */ GWENHYWFAR_API void *GWEN_List1_GetFirst(const GWEN_LIST1 *l); /** Returns the data pointer of the last list element. */ GWENHYWFAR_API void *GWEN_List1_GetLast(const GWEN_LIST1 *l); GWENHYWFAR_API GWEN_LIST1_SORT_FN GWEN_List1_SetSortFn(GWEN_LIST1 *l, GWEN_LIST1_SORT_FN fn); GWENHYWFAR_API void GWEN_List1_Sort(GWEN_LIST1 *l, int ascending); /** Allocate (create) a new list element structure. */ GWENHYWFAR_API GWEN_LIST1_ELEMENT *GWEN_List1Element_new(void *d); /** Free (delete) a list element structure. */ GWENHYWFAR_API void GWEN_List1Element_free(GWEN_LIST1_ELEMENT *el); /** Returns the data pointer of the given list element * structure. */ GWENHYWFAR_API void *GWEN_List1Element_GetData(const GWEN_LIST1_ELEMENT *el); /** Returns the data pointer of the list element that is the * previous (predecessor) to the given one in its list. If there * is no such prepending list element, returns NULL. */ GWENHYWFAR_API void *GWEN_List1Element_GetPrevious(const GWEN_LIST1_ELEMENT *el); /** Returns the data pointer of the list element that is the next * one (successor) to the given one in its list. If there is no * such prepending list element, returns NULL. */ GWENHYWFAR_API void *GWEN_List1Element_GetNext(const GWEN_LIST1_ELEMENT *el); /*@}*/ /** @name Typesafe Macros * */ /*@{*/ /** * Use this inside the declaration of a struct for which you want to create * lists. */ #define GWEN_LIST_ELEMENT(t) \ GWEN_LIST1_ELEMENT *_list1_element; /** * Use this macro in your public header files to export only list functions * which do not modify a list. This allows your code to return lists which can * not be modified by callers. It also prevents callers from creating their * own lists (this is sometimes needed). */ #define GWEN_LIST_FUNCTION_LIB_DEFS_CONST(t, pr, decl) \ /*typedef GWEN_LIST1 t##_LIST;*/ \ typedef struct t##_LIST t##_LIST; \ typedef int GWENHYWFAR_CB (*t##_LIST_SORT_FN)(const t *a, const t *b, int ascending); \ typedef t* (t##_LIST_FOREACH)(t *element, void *user_data); \ \ \ decl t* pr##_List_First(const t##_LIST *l); \ decl t* pr##_List_Last(const t##_LIST *l); \ decl t* pr##_List_Next(const t *element); \ decl t* pr##_List_Previous(const t *element); \ decl uint32_t pr##_List_GetCount(const t##_LIST *l); \ decl int pr##_List_HasElement(const t##_LIST *l, const t *element); \ decl t##_LIST_SORT_FN pr##_List_SetSortFn(t##_LIST *l, t##_LIST_SORT_FN fn); \ decl void pr##_List_Sort(t##_LIST *l, int ascending); \ decl t* pr##_List_ForEach(t##_LIST *l, t##_LIST_FOREACH fn, void *user_data); #define GWEN_LIST_FUNCTION_LIB_DEFS_NOCONST(t, pr, decl) \ typedef GWEN_LIST1_ELEMENT t##_LIST_ELEMENT; \ \ decl void pr##_List_Clear(t##_LIST *l); \ decl t##_LIST* pr##_List_new(); \ decl void pr##_List_free(t##_LIST *l); \ decl int pr##_List_AddList(t##_LIST *dst, t##_LIST *l); \ decl int pr##_List_Add(t *element, t##_LIST *list); \ decl int pr##_List_Insert(t *element, t##_LIST *list); \ decl int pr##_List_Del(t *element); #define GWEN_LIST_FUNCTION_DEFS_CONST(t, pr) \ GWEN_LIST_FUNCTION_LIB_DEFS_CONST(t, pr, GWEN_DUMMY_EMPTY_ARG) #define GWEN_LIST_FUNCTION_DEFS_NOCONST(t, pr) \ GWEN_LIST_FUNCTION_LIB_DEFS_NOCONST(t, pr, GWEN_DUMMY_EMPTY_ARG) /** * Use this in public header files to define some prototypes for list * functions. * Let's assume the type of your list elements is "MYTYPE" and you want to * use the prefix "MyType_" for the list functions. * The following function prototypes will then be created: *
    *
  • * void MyType_List_Add(MYTYPE *element, MYTYPE_LIST *list);
    * Adds (appends) a MYTYPE struct at the end of the given * list. (We apologize for the unusual argument order here.) *
  • *
  • * void MyType_List_Del(MYTYPE *element);
    * Removes a MyType struct from the list it is enlisted to. *
  • *
  • * MYTYPE *MyType_List_First(MYTYPE *element);
    * Returns the first element of the given list. *
  • *
  • * MYTYPE* MyType_List_Next(const MYTYPE *element);
    * Returns the next list element to the given one (the * successor) in its list. *
  • *
  • * MYTYPE* MyType_List_Previous(const MYTYPE *element);
    * Returns the previous list element to the given one (the * predecessor) in its list. *
  • *
  • * void MyType_List_Clear(MYTYPE *element);
    * Frees all entries of the given list. * This function assumes that there is a function Mytype_free(). *
  • *
  • * MYTYPE_LIST *MyType_List_new();
    * Creates a new list of elements of MYTYPE type. *
  • *
  • * void MyType_List_free(MYTYPE_LIST *l);
    * Clears and frees a list of elements of MYTYPE type. * All objects inside the list are freed. * This function assumes that there is a function Mytype_free(). *
  • *
* */ #define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl) \ GWEN_LIST_FUNCTION_LIB_DEFS_CONST(t, pr, decl) \ GWEN_LIST_FUNCTION_LIB_DEFS_NOCONST(t, pr, decl) /** * This macro should be used in applications, not in libraries. In * libraries please use the macro @ref GWEN_LIST_FUNCTION_LIB_DEFS. */ #define GWEN_LIST_FUNCTION_DEFS(t, pr) \ GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG) /** * Use this inside your code files (*.c). * Actually implements the functions for which the prototypes have been * defined via @ref GWEN_LIST_FUNCTION_DEFS. */ #define GWEN_LIST_FUNCTIONS(t, pr) \ \ int pr##_List_Add(t *element, t##_LIST *l) { \ return GWEN_List1_Add((GWEN_LIST1*)l, element->_list1_element); \ } \ \ int pr##_List_AddList(t##_LIST *dst, t##_LIST *l) { \ return GWEN_List1_AddList((GWEN_LIST1*)dst, (GWEN_LIST1*)l); \ } \ \ int pr##_List_Insert(t *element, t##_LIST *l) { \ return GWEN_List1_Insert((GWEN_LIST1*)l, element->_list1_element); \ } \ \ int pr##_List_Del(t *element){ \ return GWEN_List1_Del(element->_list1_element); \ }\ \ t* pr##_List_First(const t##_LIST *l) { \ if (l) return (t*)GWEN_List1_GetFirst((GWEN_LIST1*)l);\ else return 0; \ } \ \ t* pr##_List_Last(const t##_LIST *l) { \ if (l) return (t*) GWEN_List1_GetLast((GWEN_LIST1*)l);\ else return 0; \ } \ \ void pr##_List_Clear(t##_LIST *l) { \ t* el; \ while( (el=(t*) GWEN_List1_GetFirst((GWEN_LIST1*)l)) ) {\ pr##_List_Del(el);\ pr##_free(el);\ } /* while */ \ } \ \ int pr##_List_HasElement(const t##_LIST *l, const t *element) { \ const t* el; \ el=(t*)GWEN_List1_GetFirst((GWEN_LIST1*)l); \ while(el) {\ if (el==element) \ return 1; \ el=(const t*)GWEN_List1Element_GetNext(el->_list1_element); \ } /* while */ \ return 0; \ } \ \ t##_LIST* pr##_List_new(){\ return (t##_LIST*)GWEN_List1_new(); \ }\ \ void pr##_List_free(t##_LIST *l) {\ if (l) { \ pr##_List_Clear(l);\ GWEN_List1_free((GWEN_LIST1*)l); \ }\ } \ \ t* pr##_List_Next(const t *element) { \ return (t*)GWEN_List1Element_GetNext(element->_list1_element);\ } \ \ t* pr##_List_Previous(const t *element) { \ return (t*)GWEN_List1Element_GetPrevious(element->_list1_element);\ } \ \ uint32_t pr##_List_GetCount(const t##_LIST *l){\ return GWEN_List1_GetCount((GWEN_LIST1*)l);\ } \ \ t##_LIST_SORT_FN pr##_List_SetSortFn(t##_LIST *l, t##_LIST_SORT_FN fn) { \ return (t##_LIST_SORT_FN) GWEN_List1_SetSortFn((GWEN_LIST1*)l, (GWEN_LIST1_SORT_FN) fn); \ } \ \ void pr##_List_Sort(t##_LIST *l, int ascending){\ GWEN_List1_Sort((GWEN_LIST1*)l, ascending);\ }\ \ t* pr##_List_ForEach(t##_LIST *l, t##_LIST_FOREACH fn, void *user_data){ \ t *el; \ if (!l) return 0; \ \ el=pr##_List_First(l); \ while(el) { \ t *elReturned; \ elReturned=fn(el, user_data); \ if (elReturned) { \ return elReturned; \ } \ el=pr##_List_Next(el); \ } \ return 0; \ } /** * Use this in your code file (*.c) inside the init code for the struct * you want to use in lists (in GWEN these are the functions which end with * "_new". */ #define GWEN_LIST_INIT(t, element) \ element->_list1_element=GWEN_List1Element_new(element); /** * Use this in your code file (*.c) inside the fini code for the struct * you want to use in lists (in GWEN these are the functions which end with * "_free". */ #define GWEN_LIST_FINI(t, element) \ if (element && element->_list1_element) { \ GWEN_List1Element_free(element->_list1_element); \ element->_list1_element=0; \ } /*@}*/ /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/simpleptrlist_p.h0000666000175000017500000000450113605506277016025 00000000000000/*************************************************************************** begin : Fri Dec 06 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_SIMPLEPTRLIST_P_H #define GWENHYWFAR_SIMPLEPTRLIST_P_H #include #include #include #define GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE 0x80000000L typedef struct INTERNAL_PTRLIST INTERNAL_PTRLIST; struct INTERNAL_PTRLIST { int refCounter; uint64_t storedEntries; void *entries[0]; }; struct GWEN_SIMPLEPTRLIST { GWEN_INHERIT_ELEMENT(GWEN_SIMPLEPTRLIST) uint64_t maxEntries; uint64_t usedEntries; uint64_t steps; uint32_t flags; uint32_t refCount; int userIntData; uint64_t userCounter; INTERNAL_PTRLIST *entryList; GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN attachObjectFn; GWEN_SIMPLEPTRLIST_FREEOBJECT_FN freeObjectFn; }; #endif /* GWENHYWFAR_SIMPLEPTRLIST_P_H */ gwenhywfar-5.12.1/src/base/gwen_param.tm20000644000175000017500000000026513644653711015164 00000000000000 GWEN_PARAM GWEN_Param gwenhywfar-5.12.1/src/base/ringbuffer.c0000644000175000017500000001751413142134475014714 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 25 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "ringbuffer_p.h" #include #include #include GWEN_RINGBUFFER *GWEN_RingBuffer_new(unsigned int size) { GWEN_RINGBUFFER *rb; assert(size); GWEN_NEW_OBJECT(GWEN_RINGBUFFER, rb); DBG_MEM_INC("GWEN_RINGBUFFER", 0); rb->ptr=(char *)malloc(size); rb->bufferSize=size; return rb; } void GWEN_RingBuffer_free(GWEN_RINGBUFFER *rb) { if (rb) { DBG_MEM_DEC("GWEN_RINGBUFFER"); free(rb->ptr); GWEN_FREE_OBJECT(rb); } } int GWEN_RingBuffer_WriteBytes(GWEN_RINGBUFFER *rb, const char *buffer, uint32_t *size) { uint32_t psize; uint32_t bytesLeft; if ((rb->bufferSize-rb->bytesUsed)==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Buffer full"); rb->fullCounter++; return -1; } bytesLeft=*size; while (bytesLeft) { if ((rb->bufferSize-rb->bytesUsed)==0) break; if (rb->writePos>=rb->readPos) psize=rb->bufferSize-rb->writePos; else psize=rb->readPos-rb->writePos; if (psize>bytesLeft) psize=bytesLeft; memmove(rb->ptr+rb->writePos, buffer, psize); rb->writePos+=psize; if (rb->writePos>=rb->bufferSize) rb->writePos=0; rb->bytesUsed+=psize; buffer+=psize; bytesLeft-=psize; } /* while */ *size-=bytesLeft; if (rb->bytesUsed>rb->maxBytesUsed) rb->maxBytesUsed=rb->bytesUsed; return 0; } uint32_t GWEN_RingBuffer_GetMaxUnsegmentedRead(GWEN_RINGBUFFER *rb) { uint32_t psize; assert(rb); if (rb->bytesUsed==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Buffer empty"); rb->emptyCounter++; return 0; } if (rb->readPos>=rb->writePos) psize=rb->bufferSize-rb->readPos; else psize=rb->writePos-rb->readPos; return psize; } uint32_t GWEN_RingBuffer_GetMaxUnsegmentedWrite(GWEN_RINGBUFFER *rb) { uint32_t psize; assert(rb); if ((rb->bufferSize-rb->bytesUsed)==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Buffer full"); rb->fullCounter++; return 0; } if (rb->writePos>=rb->readPos) psize=rb->bufferSize-rb->writePos; else psize=rb->readPos-rb->writePos; return psize; } void GWEN_RingBuffer_SkipBytesRead(GWEN_RINGBUFFER *rb, uint32_t psize) { assert(rb); if (rb->bytesUsedreadPos+=psize; if (rb->readPos>=rb->bufferSize) rb->readPos=0; rb->bytesUsed-=psize; rb->throughput+=psize; } void GWEN_RingBuffer_SkipBytesWrite(GWEN_RINGBUFFER *rb, uint32_t psize) { assert(rb); if ((rb->bufferSize-rb->bytesUsed)writePos+=psize; if (rb->writePos>=rb->bufferSize) rb->writePos=0; rb->bytesUsed+=psize; if (rb->bytesUsed>rb->maxBytesUsed) rb->maxBytesUsed=rb->bytesUsed; } int GWEN_RingBuffer_ReadBytes(GWEN_RINGBUFFER *rb, char *buffer, uint32_t *size) { uint32_t psize; uint32_t bytesLeft; if (rb->bytesUsed==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Buffer empty"); rb->emptyCounter++; return -1; } bytesLeft=*size; while (bytesLeft) { if (rb->bytesUsed==0) break; if (rb->readPos>=rb->writePos) psize=rb->bufferSize-rb->readPos; else psize=rb->writePos-rb->readPos; if (psize>bytesLeft) psize=bytesLeft; memmove(buffer, rb->ptr+rb->readPos, psize); rb->readPos+=psize; if (rb->readPos>=rb->bufferSize) rb->readPos=0; rb->bytesUsed-=psize; buffer+=psize; bytesLeft-=psize; } /* while */ *size-=bytesLeft; rb->throughput+=*size; return 0; } uint32_t GWEN_RingBuffer_GetUsedBytes(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->bytesUsed; } uint32_t GWEN_RingBuffer_GetBytesLeft(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->bufferSize-rb->bytesUsed; } uint32_t GWEN_RingBuffer_GetBufferSize(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->bufferSize; } int GWEN_RingBuffer_WriteByte(GWEN_RINGBUFFER *rb, char c) { assert(rb); if ((rb->bufferSize-rb->bytesUsed)==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Buffer full"); rb->fullCounter++; return -1; } rb->ptr[rb->writePos]=c; rb->writePos++; if (rb->writePos>=rb->bufferSize) rb->writePos=0; rb->bytesUsed++; if (rb->bytesUsed>rb->maxBytesUsed) rb->maxBytesUsed=rb->bytesUsed; return 0; } int GWEN_RingBuffer_ReadByte(GWEN_RINGBUFFER *rb) { int c; assert(rb); if (rb->bytesUsed==0) { DBG_DEBUG(GWEN_LOGDOMAIN, "Buffer empty"); rb->emptyCounter++; return -1; } c=(unsigned char)rb->ptr[rb->readPos]; rb->readPos++; if (rb->readPos>=rb->bufferSize) rb->readPos=0; rb->bytesUsed--; rb->throughput++; return c; } uint32_t GWEN_RingBuffer_GetMaxUsedBytes(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->maxBytesUsed; } void GWEN_RingBuffer_ResetMaxUsedBytes(GWEN_RINGBUFFER *rb) { assert(rb); rb->maxBytesUsed=0; } uint32_t GWEN_RingBuffer_GetThroughput(GWEN_RINGBUFFER *rb) { assert(rb); return rb->throughput; } void GWEN_RingBuffer_ResetThroughput(GWEN_RINGBUFFER *rb) { assert(rb); rb->throughput=0; } uint32_t GWEN_RingBuffer_GetFullCounter(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->fullCounter; } void GWEN_RingBuffer_ResetFullCounter(GWEN_RINGBUFFER *rb) { assert(rb); rb->fullCounter=0; } uint32_t GWEN_RingBuffer_GetEmptyCounter(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->emptyCounter; } void GWEN_RingBuffer_ResetEmptyCounter(GWEN_RINGBUFFER *rb) { assert(rb); rb->emptyCounter=0; } const char *GWEN_RingBuffer_GetReadPointer(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->ptr+rb->readPos; } char *GWEN_RingBuffer_GetWritePointer(const GWEN_RINGBUFFER *rb) { assert(rb); return rb->ptr+rb->writePos; } void GWEN_RingBuffer_Reset(GWEN_RINGBUFFER *rb) { assert(rb); rb->readPos=0; rb->writePos=0; rb->bytesUsed=0; rb->maxBytesUsed=0; rb->emptyCounter=0; rb->fullCounter=0; rb->throughput=0; } gwenhywfar-5.12.1/src/base/logger.c0000644000175000017500000004400715024365333014037 00000000000000/*************************************************************************** begin : Sun Dec 05 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include "logger_p.h" #include #include #include #ifdef HAVE_SYSLOG_H # include #endif #include #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_TIME_H # include #endif #ifdef HAVE_UNISTD_H # include #endif static GWEN_LOGGER_DOMAIN *gwen_loggerdomains=0; int GWEN_Logger_ModuleInit(void) { const char *s; GWEN_LOGGER_LEVEL ll=GWEN_LoggerLevel_Warning; GWEN_Logger_Open(GWEN_LOGDOMAIN, "gwen", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User); s=getenv("GWEN_LOGLEVEL"); if (s) { ll=GWEN_Logger_Name2Level(s); if (ll==GWEN_LoggerLevel_Unknown) ll=GWEN_LoggerLevel_Warning; } GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, ll); return 0; } int GWEN_Logger_ModuleFini(void) { GWEN_LOGGER_DOMAIN *ld; while ((ld=gwen_loggerdomains)) { GWEN_LoggerDomain_Del(ld); GWEN_LoggerDomain_free(ld); } return 0; } GWEN_LOGGER_DOMAIN *GWEN_LoggerDomain_new(const char *name) { GWEN_LOGGER_DOMAIN *ld; assert(name); GWEN_NEW_OBJECT(GWEN_LOGGER_DOMAIN, ld); ld->name=strdup(name); return ld; } void GWEN_LoggerDomain_free(GWEN_LOGGER_DOMAIN *ld) { if (ld) { free(ld->name); GWEN_Logger_free(ld->logger); GWEN_FREE_OBJECT(ld); } } GWEN_LOGGER_DOMAIN *GWEN_LoggerDomain_Find(const char *name) { GWEN_LOGGER_DOMAIN *ld; assert(name); ld=gwen_loggerdomains; while (ld) { if (strcasecmp(ld->name, name)==0) break; ld=ld->next; } return ld; } void GWEN_LoggerDomain_Add(GWEN_LOGGER_DOMAIN *ld) { assert(ld); GWEN_LIST_INSERT(GWEN_LOGGER_DOMAIN, ld, &gwen_loggerdomains); } void GWEN_LoggerDomain_Del(GWEN_LOGGER_DOMAIN *ld) { assert(ld); GWEN_LIST_DEL(GWEN_LOGGER_DOMAIN, ld, &gwen_loggerdomains); } GWEN_LOGGER *GWEN_LoggerDomain_GetLogger(const char *name) { GWEN_LOGGER_DOMAIN *ld; if (!name) name="default"; ld=GWEN_LoggerDomain_Find(name); if (ld) { return ld->logger; } ld=GWEN_LoggerDomain_new(name); ld->logger=GWEN_Logger_new(ld); GWEN_LoggerDomain_Add(ld); return ld->logger; } GWEN_LOGGER *GWEN_Logger_new(GWEN_LOGGER_DOMAIN *domain) { GWEN_LOGGER *lg; GWEN_NEW_OBJECT(GWEN_LOGGER, lg); lg->usage=1; lg->enabled=1; lg->logType=GWEN_LoggerType_Console; lg->logLevel=GWEN_LoggerLevel_Error; lg->domain=domain; return lg; } void GWEN_Logger_free(GWEN_LOGGER *lg) { if (lg) { assert(lg->usage); if (--(lg->usage)==0) { free(lg->logFile); free(lg->logIdent); GWEN_FREE_OBJECT(lg); } } } void GWEN_Logger_Attach(GWEN_LOGGER *lg) { assert(lg); lg->usage++; } void GWEN_Logger_AddLogger(GWEN_LOGGER *oldLogger, GWEN_LOGGER *newLogger) { assert(newLogger); assert(oldLogger); GWEN_LIST_ADD(GWEN_LOGGER, newLogger, &(oldLogger->next)); } #ifndef NO_DEPRECATED_SYMBOLS void GWEN_Logger_SetDefaultLogger(GWEN_UNUSED GWEN_LOGGER *lg) { fprintf(stderr, "GWEN_Logger_SetDefaultLogger: Deprecated function\n"); } #endif // ifndef NO_DEPRECATED_SYMBOLS int GWEN_Logger_Open(const char *logDomain, const char *ident, const char *file, GWEN_LOGGER_LOGTYPE logtype, GWEN_LOGGER_FACILITY facility) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); if (lg->open) { GWEN_Logger_Log(logDomain, GWEN_LoggerLevel_Debug, "Already open"); return 0; } lg->logType=logtype; GWEN_Logger_SetIdent(logDomain, ident); GWEN_Logger_SetFilename(logDomain, file); if (logtype==GWEN_LoggerType_File) { /* logging to a file */ if (file==0) { lg->logType=GWEN_LoggerType_Console; lg->enabled=1; fprintf(stderr, "LOGGER: No filename given, will log to console.\n"); } else { lg->logType=GWEN_LoggerType_File; lg->enabled=1; } } #ifdef HAVE_SYSLOG_H else if (logtype==GWEN_LoggerType_Syslog) { /* caller wants to log via syslog */ int fac; switch (facility) { case GWEN_LoggerFacility_Auth: fac=LOG_AUTH; break; case GWEN_LoggerFacility_Daemon: fac=LOG_DAEMON; break; case GWEN_LoggerFacility_Mail: fac=LOG_MAIL; break; case GWEN_LoggerFacility_News: fac=LOG_NEWS; break; case GWEN_LoggerFacility_User: case GWEN_LoggerFacility_Unknown: default: fac=LOG_USER; break; } openlog(ident, LOG_CONS | LOG_PID, fac); lg->enabled=1; } /* if syslog */ #endif /* ifdef HAVE_SYSLOG_H */ else { /* console or function */ lg->enabled=1; } lg->open=1; GWEN_Logger_Log(logDomain, GWEN_LoggerLevel_Debug, "started"); return 0; } void GWEN_Logger_Close(const char *logDomain) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); GWEN_Logger_Log(logDomain, GWEN_LoggerLevel_Debug, "stopped"); lg->logType=GWEN_LoggerType_Console; lg->enabled=0; #ifdef HAVE_SYSLOG_H closelog(); #endif lg->open=0; /* remove logdomain after it has been closed */ GWEN_LoggerDomain_Del(lg->domain); GWEN_LoggerDomain_free(lg->domain); } int GWEN_Logger_IsOpen(const char *logDomain) { GWEN_LOGGER_DOMAIN *ld; if (!logDomain) logDomain="default"; ld=GWEN_LoggerDomain_Find(logDomain); if (ld) return ld->logger->open; return 0; } int GWEN_Logger__CreateMessage(GWEN_LOGGER *lg, GWEN_LOGGER_LEVEL priority, const char *s, GWEN_BUFFER *mbuf) { #ifdef HAVE_SNPRINTF unsigned int i; #endif /* HAVE_SNPRINTF */ #ifdef HAVE_TIME_H struct tm *t; time_t tt; #endif /* HAVE_TIME_H */ char buffer[256]; assert(lg); if (lg->logIdent) { if (strlen(lg->logIdent)+32>=sizeof(buffer)) { fprintf(stderr, " LOGGER: Logbuffer too small (1).\n"); return 1; } } #ifdef HAVE_TIME_H tt=time(0); t=localtime(&tt); # ifdef HAVE_SNPRINTF # ifdef HAVE_GETPID i=snprintf(buffer, sizeof(buffer)-1, "%d:%04d/%02d/%02d %02d-%02d-%02d:%s(%d):", priority, t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, lg->logIdent, (int)getpid()); # else i=snprintf(buffer, sizeof(buffer)-1, "%d:%04d/%02d/%02d %02d-%02d-%02d:%s:", priority, t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, lg->logIdent); # endif /* HAVE_GETPID */ if (i>=sizeof(buffer)) { fprintf(stderr, " LOGGER: Logbuffer too small (2).\n"); return 1; } # else /* HAVE_SNPRINTF */ # ifdef HAVE_GETPID sprintf(buffer, "%d:%04d/%02d/%02d %02d-%02d-%02d:%s(%d):", priority, t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, lg->logIdent, (int)getpid()); # else sprintf(buffer, "%d:%04d/%02d/%02d %02d-%02d-%02d:%s:", priority, t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, lg->logIdent); # endif /* HAVE_GETPID */ # endif /* HAVE_SNPRINTF */ #else /* HAVE_TIME_H */ # ifdef HAVE_SNPRINTF buffer[sizeof(buffer)-1]=0; i=snprintf(buffer, sizeof(buffer)-1, "%d:%s:", priority, lg->logIdent); if (i>=sizeof(buffer)) { fprintf(stderr, " LOGGER: Logbuffer too small (3).\n"); return 1; } # else /* HAVE_SNPRINTF */ sprintf(buffer, "%d:%s:", priority, lg->logIdent); # endif /* HAVE_SNPRINTF */ #endif /* HAVE_TIME_H */ GWEN_Buffer_AppendString(mbuf, buffer); GWEN_Buffer_AppendString(mbuf, s); GWEN_Buffer_AppendByte(mbuf, '\n'); return 0; } int GWEN_Logger_CreateLogMessage(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s, GWEN_BUFFER *mbuf) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); return GWEN_Logger__CreateMessage(lg, priority, s, mbuf); } int GWEN_Logger__Log(GWEN_LOGGER *lg, GWEN_LOGGER_LEVEL priority, const char *s) { while (lg) { FILE *f; #ifdef HAVE_SYSLOG_H int pri; #endif /* HAVE_SYSLOG_H */ GWEN_BUFFER *mbuf; int rv; assert(lg); if (priority>lg->logLevel) /* priority too low, don't log */ return 0; mbuf=GWEN_Buffer_new(0, 256, 0, 1); switch (lg->logType) { case GWEN_LoggerType_File: rv=GWEN_Logger__CreateMessage(lg, priority, s, mbuf); if (rv) { GWEN_Buffer_free(mbuf); return rv; } f=fopen(lg->logFile, "a+"); if (f==0) { fprintf(stderr, "LOGGER: Unable to open file \"%s\" (%s)\n", lg->logFile, strerror(errno)); lg->logType=GWEN_LoggerType_Console; GWEN_Buffer_free(mbuf); return 1; } if (fwrite(GWEN_Buffer_GetStart(mbuf), GWEN_Buffer_GetUsedBytes(mbuf), 1, f)!=1) { fprintf(stderr, "LOGGER: Unable to write to file \"%s\" (%s)\n", lg->logFile, strerror(errno)); fclose(f); lg->logType=GWEN_LoggerType_Console; GWEN_Buffer_free(mbuf); return 1; } if (fclose(f)) { fprintf(stderr, "LOGGER: Unable to close file \"%s\" (%s)\n", lg->logFile, strerror(errno)); lg->logType=GWEN_LoggerType_Console; GWEN_Buffer_free(mbuf); return 1; } break; #ifdef HAVE_SYSLOG_H case GWEN_LoggerType_Syslog: switch (priority) { case GWEN_LoggerLevel_Emergency: pri=LOG_EMERG; break; case GWEN_LoggerLevel_Alert: pri=LOG_ALERT; break; case GWEN_LoggerLevel_Critical: pri=LOG_CRIT; break; case GWEN_LoggerLevel_Error: pri=LOG_ERR; break; case GWEN_LoggerLevel_Warning: pri=LOG_WARNING; break; case GWEN_LoggerLevel_Notice: pri=LOG_NOTICE; break; case GWEN_LoggerLevel_Info: pri=LOG_NOTICE; break; case GWEN_LoggerLevel_Debug: case GWEN_LoggerLevel_Verbous: case GWEN_LoggerLevel_Unknown: default: pri=LOG_DEBUG; break; } /* switch */ syslog(pri, "%s", s); break; #endif /* HAVE_SYSLOG_H */ case GWEN_LoggerType_Function: if (lg->logFunction==0) { fprintf(stderr, "LOGGER: Logtype is \"Function\", but no function is set.\n"); GWEN_Buffer_free(mbuf); return 1; } rv=GWEN_Logger__CreateMessage(lg, priority, s, mbuf); if (rv) { GWEN_Buffer_free(mbuf); return rv; } (lg->logFunction)(GWEN_Buffer_GetStart(mbuf)); break; case GWEN_LoggerType_Console: case GWEN_LoggerType_Unknown: default: rv=GWEN_Logger__CreateMessage(lg, priority, s, mbuf); if (rv) { GWEN_Buffer_free(mbuf); return rv; } fprintf(stderr, "%s", GWEN_Buffer_GetStart(mbuf)); break; } /* switch */ lg=lg->next; GWEN_Buffer_free(mbuf); } /* while lg */ return 0; } void GWEN_Logger_Log(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s) { if (!GWEN_Gui_LogHook(logDomain, priority, s)) { const char *p; /*int rv;*/ unsigned int i; GWEN_BUFFER *mbuf; GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); if (!lg->enabled) return /*1*/; if (priority>lg->logLevel) /* priority too low, don't log */ return /*0*/; /* temporarily disable logging to avoid endless loops */ lg->enabled=0; /* copy buffer, exchange all newlines by 0 */ mbuf=GWEN_Buffer_new(0, strlen(s)+1, 0, 1); for (i=0; ienabled=1; return /*rv*/; } else return /*0*/; } void GWEN_Logger_Enable(const char *logDomain, int f) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); lg->enabled=f; } int GWEN_Logger_IsEnabled(const char *logDomain) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); return lg->enabled; } void GWEN_Logger_SetLevel(const char *logDomain, GWEN_LOGGER_LEVEL l) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); lg->logLevel=l; } int GWEN_Logger_GetLevel(const char *logDomain) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); return lg->logLevel; } void GWEN_Logger_SetIdent(const char *logDomain, const char *id) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); free(lg->logIdent); if (id) lg->logIdent=strdup(id); else lg->logIdent=strdup("No ident, please adjust your program"); } void GWEN_Logger_SetFilename(const char *logDomain, const char *name) { GWEN_LOGGER *lg; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); free(lg->logFile); if (name) lg->logFile=strdup(name); else lg->logFile=strdup(""); } GWEN_LOGGERFUNCTIONLOG GWEN_Logger_SetLogFunction(const char *logDomain, GWEN_LOGGERFUNCTIONLOG fn) { GWEN_LOGGER *lg; GWEN_LOGGERFUNCTIONLOG oldFn; lg=GWEN_LoggerDomain_GetLogger(logDomain); assert(lg); oldFn=lg->logFunction; lg->logFunction=fn; return oldFn; } GWEN_LOGGER_LEVEL GWEN_Logger_Name2Level(const char *name) { if (strcasecmp(name, "emergency")==0) return GWEN_LoggerLevel_Emergency; else if (strcasecmp(name, "alert")==0) return GWEN_LoggerLevel_Alert; else if (strcasecmp(name, "critical")==0) return GWEN_LoggerLevel_Critical; else if (strcasecmp(name, "error")==0) return GWEN_LoggerLevel_Error; else if (strcasecmp(name, "warning")==0) return GWEN_LoggerLevel_Warning; else if (strcasecmp(name, "notice")==0) return GWEN_LoggerLevel_Notice; else if (strcasecmp(name, "info")==0) return GWEN_LoggerLevel_Info; else if (strcasecmp(name, "debug")==0) return GWEN_LoggerLevel_Debug; else if (strcasecmp(name, "verbous")==0 || strcasecmp(name, "verbose")==0) return GWEN_LoggerLevel_Verbous; else { return GWEN_LoggerLevel_Unknown; } } const char *GWEN_Logger_Level2Name(GWEN_LOGGER_LEVEL level) { const char *s; switch (level) { case GWEN_LoggerLevel_Emergency: s="emergency"; break; case GWEN_LoggerLevel_Alert: s="alert"; break; case GWEN_LoggerLevel_Critical: s="critical"; break; case GWEN_LoggerLevel_Error: s="error"; break; case GWEN_LoggerLevel_Warning: s="warning"; break; case GWEN_LoggerLevel_Notice: s="notice"; break; case GWEN_LoggerLevel_Info: s="info"; break; case GWEN_LoggerLevel_Debug: s="debug"; break; case GWEN_LoggerLevel_Verbous: /* yes, we know the spelling is wrong. But it's a historic bug, fixing it would make Gwen incompatible with previous versions. */ s="verbous"; break; case GWEN_LoggerLevel_Unknown: default: s="unknown"; break; } /* switch */ return s; } GWEN_LOGGER_LOGTYPE GWEN_Logger_Name2Logtype(const char *name) { if (strcasecmp(name, "console")==0) return GWEN_LoggerType_Console; else if (strcasecmp(name, "file")==0) return GWEN_LoggerType_File; else if (strcasecmp(name, "syslog")==0) return GWEN_LoggerType_Syslog; else if (strcasecmp(name, "function")==0) return GWEN_LoggerType_Function; else { return GWEN_LoggerType_Unknown; } } const char *GWEN_Logger_Logtype2Name(GWEN_LOGGER_LOGTYPE lt) { const char *s; switch (lt) { case GWEN_LoggerType_Console: s="console"; break; case GWEN_LoggerType_File: s="file"; break; case GWEN_LoggerType_Syslog: s="syslog"; break; case GWEN_LoggerType_Function: s="function"; break; case GWEN_LoggerType_Unknown: default: s="unknown"; break; } /* switch */ return s; } int GWEN_Logger_Exists(const char *logDomain) { assert(logDomain); return (GWEN_LoggerDomain_Find(logDomain)!=0); } gwenhywfar-5.12.1/src/base/plugin_p.h0000664000175000017500000000420114460564441014400 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PLUGIN_P_H #define GWENHYWFAR_PLUGIN_P_H #include "plugin_l.h" #include #include struct GWEN_PLUGIN_MANAGER { GWEN_INHERIT_ELEMENT(GWEN_PLUGIN_MANAGER) GWEN_LIST_ELEMENT(GWEN_PLUGIN_MANAGER) char *name; char *destLib; GWEN_PLUGIN_LIST *plugins; }; struct GWEN_PLUGIN { GWEN_INHERIT_ELEMENT(GWEN_PLUGIN) GWEN_LIST_ELEMENT(GWEN_PLUGIN) GWEN_PLUGIN_MANAGER *manager; char *name; char *fileName; GWEN_LIBLOADER *libLoader; GWEN_PLUGIN_DESCRIPTION *pluginDescription; uint32_t refCount; }; #endif gwenhywfar-5.12.1/src/base/list.c0000644000175000017500000004360713142134475013540 00000000000000/*************************************************************************** begin : Sat Nov 15 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "list_p.h" #include #include GWEN_INHERIT_FUNCTIONS(GWEN_LIST) GWEN_LIST_ENTRY *GWEN_ListEntry_new(void) { GWEN_LIST_ENTRY *le; GWEN_NEW_OBJECT(GWEN_LIST_ENTRY, le); le->usage=1; return le; } void GWEN_ListEntry_free(GWEN_LIST_ENTRY *le) { if (le) { if (le->usage) { le->usage--; if (le->usage==0) { /* unlink */ le->previous=0; le->next=0; DBG_VERBOUS(GWEN_LOGDOMAIN, "Freeing entry"); GWEN_RefPtr_free(le->dataPtr); /* really free */ GWEN_FREE_OBJECT(le); } } } } GWEN__LISTPTR *GWEN__ListPtr_new(void) { GWEN__LISTPTR *lp; GWEN_NEW_OBJECT(GWEN__LISTPTR, lp); lp->refCount=1; return lp; } void GWEN__ListPtr_free(GWEN__LISTPTR *lp) { if (lp) { assert(lp->refCount); if (--(lp->refCount)==0) { GWEN__ListPtr_Clear(lp); GWEN_FREE_OBJECT(lp); } } } void GWEN__ListPtr_Attach(GWEN__LISTPTR *lp) { assert(lp); assert(lp->refCount); lp->refCount++; } void GWEN__ListPtr_Clear(GWEN__LISTPTR *lp) { GWEN_LIST_ENTRY *le; assert(lp); le=lp->first; while (le) { GWEN_LIST_ENTRY *nle; nle=le->next; GWEN_ListEntry_free(le); le=nle; } /* while */ lp->first=0; lp->last=0; lp->size=0; } GWEN__LISTPTR *GWEN__ListPtr_dup(GWEN__LISTPTR *lp) { GWEN__LISTPTR *nlp; GWEN_LIST_ENTRY *le; nlp=GWEN__ListPtr_new(); assert(lp); le=lp->first; while (le) { GWEN_LIST_ENTRY *nle; nle=GWEN_ListEntry_new(); if (le->dataPtr) nle->dataPtr=GWEN_RefPtr_dup(le->dataPtr); /* push back */ nle->previous=nlp->last; if (nlp->last) nlp->last->next=nle; nlp->last=nle; if (!(nlp->first)) nlp->first=nle; nlp->size++; nle->linkCount=le->linkCount; le=le->next; } /* while */ return nlp; } GWEN_LIST *GWEN_List_new(void) { GWEN_LIST *l; GWEN_NEW_OBJECT(GWEN_LIST, l); GWEN_INHERIT_INIT(GWEN_LIST, l); l->listPtr=GWEN__ListPtr_new(); return l; } void GWEN_List_free(GWEN_LIST *l) { if (l) { GWEN_INHERIT_FINI(GWEN_LIST, l); GWEN__ListPtr_free(l->listPtr); GWEN_RefPtrInfo_free(l->refPtrInfo); GWEN_FREE_OBJECT(l); } } GWEN_LIST *GWEN_List_dup(const GWEN_LIST *l) { GWEN_LIST *nl; assert(l); assert(l->listPtr); GWEN_NEW_OBJECT(GWEN_LIST, nl); GWEN_INHERIT_INIT(GWEN_LIST, nl); nl->listPtr=l->listPtr; GWEN__ListPtr_Attach(nl->listPtr); return nl; } GWEN_REFPTR_INFO *GWEN_List_GetRefPtrInfo(const GWEN_LIST *l) { assert(l); return l->refPtrInfo; } void GWEN_List_SetRefPtrInfo(GWEN_LIST *l, GWEN_REFPTR_INFO *rpi) { assert(l); if (rpi) GWEN_RefPtrInfo_Attach(rpi); GWEN_RefPtrInfo_free(l->refPtrInfo); l->refPtrInfo=rpi; } void GWEN_List_PushBackRefPtr(GWEN_LIST *l, GWEN_REFPTR *rp) { GWEN_LIST_ENTRY *le; GWEN__LISTPTR *lp; if (l->listPtr->refCount>1) { GWEN__LISTPTR *nlp; /* only copy the list if someone else is using it */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; } lp=l->listPtr; le=GWEN_ListEntry_new(); le->dataPtr=rp; le->previous=lp->last; if (lp->last) lp->last->next=le; lp->last=le; if (!(lp->first)) lp->first=le; lp->size++; le->linkCount=1; } void GWEN_List_PushBack(GWEN_LIST *l, void *p) { GWEN_List_PushBackRefPtr(l, GWEN_RefPtr_new(p, l->refPtrInfo)); } void GWEN_List_PushFrontRefPtr(GWEN_LIST *l, GWEN_REFPTR *rp) { GWEN_LIST_ENTRY *le; GWEN__LISTPTR *lp; if (l->listPtr->refCount>1) { GWEN__LISTPTR *nlp; /* only copy the list if someone else is using it */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; } lp=l->listPtr; le=GWEN_ListEntry_new(); le->dataPtr=rp; le->next=lp->first; if (lp->first) lp->first->previous=le; lp->first=le; if (!(lp->last)) lp->last=le; lp->size++; le->linkCount=1; } void GWEN_List_PushFront(GWEN_LIST *l, void *p) { GWEN_List_PushFrontRefPtr(l, GWEN_RefPtr_new(p, l->refPtrInfo)); } void *GWEN_List_GetFront(const GWEN_LIST *l) { assert(l); assert(l->listPtr); if (l->listPtr->first) return GWEN_RefPtr_GetData(l->listPtr->first->dataPtr); return 0; } GWEN_REFPTR *GWEN_List_GetFrontRefPtr(const GWEN_LIST *l) { assert(l); assert(l->listPtr); if (l->listPtr->first) return l->listPtr->first->dataPtr; return 0; } void *GWEN_List_GetBack(const GWEN_LIST *l) { assert(l); assert(l->listPtr); if (l->listPtr->last) return GWEN_RefPtr_GetData(l->listPtr->last->dataPtr); return 0; } GWEN_REFPTR *GWEN_List_GetBackRefPtr(const GWEN_LIST *l) { assert(l); assert(l->listPtr); if (l->listPtr->last) return l->listPtr->last->dataPtr; return 0; } unsigned int GWEN_List_GetSize(const GWEN_LIST *l) { assert(l); assert(l->listPtr); return l->listPtr->size; } int GWEN_List_IsEmpty(const GWEN_LIST *l) { return GWEN_List_GetSize(l) == 0; } void GWEN_List_PopBack(GWEN_LIST *l) { GWEN_LIST_ENTRY *le; GWEN__LISTPTR *lp; assert(l); assert(l->listPtr); if (l->listPtr->last==0) return; if (l->listPtr->refCount>1) { GWEN__LISTPTR *nlp; /* only copy the list if someone else is using it */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; } lp=l->listPtr; le=lp->last; if (le) { le->linkCount=0; lp->last=le->previous; if (le->previous) { le->previous->next=0; } else { lp->last=0; lp->first=0; } GWEN_ListEntry_free(le); lp->size--; } } void GWEN_List_PopFront(GWEN_LIST *l) { GWEN_LIST_ENTRY *le; GWEN__LISTPTR *lp; assert(l); assert(l->listPtr); if (l->listPtr->first==0) return; if (l->listPtr->refCount>1) { GWEN__LISTPTR *nlp; /* only copy the list if someone else is using it */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; } lp=l->listPtr; le=lp->first; if (le) { le->linkCount=0; lp->first=le->next; if (le->next) { le->next->previous=0; } else { lp->first=0; lp->last=0; } GWEN_ListEntry_free(le); lp->size--; } } void GWEN_List_Clear(GWEN_LIST *l) { /* GWEN__LISTPTR *lp; */ assert(l); if (l->listPtr->refCount>1) { GWEN__LISTPTR *nlp; /* only copy the list if someone else is using it */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; } else GWEN__ListPtr_Clear(l->listPtr); } void *GWEN_List_ForEach(GWEN_LIST *l, GWEN_LIST_FOREACH_CB fn, void *user_data) { GWEN_LIST_ITERATOR *it; void *el; assert(l); it=GWEN_List_First(l); if (!it) return 0; el=GWEN_ListIterator_Data(it); while (el) { el=fn(el, user_data); if (el) { GWEN_ListIterator_free(it); return el; } el=GWEN_ListIterator_Next(it); } GWEN_ListIterator_free(it); return 0; } void GWEN_List_Unshare(GWEN_LIST *l) { if (l->listPtr->refCount>1) { GWEN__LISTPTR *nlp; /* only copy the list if someone else is using it */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; } } void GWEN_List_Erase(GWEN_LIST *l, GWEN_LIST_ITERATOR *it) { GWEN_LIST_ENTRY *current; GWEN__LISTPTR *lp; assert(l); assert(l->listPtr); if (l->listPtr->refCount>1) { GWEN_LIST_ENTRY *tle; GWEN__LISTPTR *nlp; int i; /* find the position of the iterator within current list */ tle=it->current; assert(tle); i=0; while (tle->previous) { i++; tle=tle->previous; } /* copy the list */ nlp=GWEN__ListPtr_dup(l->listPtr); GWEN__ListPtr_free(l->listPtr); l->listPtr=nlp; /* seek and set the iterator position */ tle=l->listPtr->first; assert(tle); while (tle && i--) { tle=tle->next; } assert(tle); it->current=tle; } lp=l->listPtr; assert(it); if (it->current) { current=it->current; if (it->current->linkCount==1) { /* unlink from list */ if (lp->first==current) lp->first=current->next; if (lp->last==current) lp->last=current->previous; /* unlink from next */ if (current->next) { it->current=current->next; current->next->usage++; current->next->previous=current->previous; } else it->current=0; /* unlink from previous */ if (current->previous) current->previous->next=current->next; /* free */ current->usage--; GWEN_ListEntry_free(current); lp->size--; } else { /* move iterator forwards even if the current entry has not * been deleted. Thus making the return condition clear to the * caller. */ if (current->next) { it->current=current->next; current->next->usage++; } else it->current=0; current->usage--; it->current->linkCount--; } } } GWEN_LIST_ITERATOR *GWEN_List_FindIter(GWEN_LIST *l, const void *p) { GWEN_LIST_ITERATOR *li; li=GWEN_List_First(l); if (li) { void *d; d=GWEN_ListIterator_Data(li); while (d) { if (d==p) { return li; } d=GWEN_ListIterator_Next(li); } GWEN_ListIterator_free(li); } return 0; } const void *GWEN_List_Contains(GWEN_LIST *l, const void *p) { GWEN_LIST_ITERATOR *li; li = GWEN_List_FindIter(l, p); if (li) { GWEN_ListIterator_free(li); return p; } return 0; } void GWEN_List_Remove(GWEN_LIST *l, const void *p) { GWEN_LIST_ITERATOR *li; li = GWEN_List_FindIter(l, p); if (li) { GWEN_List_Erase(l, li); GWEN_ListIterator_free(li); } } GWEN_LIST_ITERATOR *GWEN_List_First(const GWEN_LIST *l) { GWEN_LIST_ITERATOR *li; assert(l); assert(l->listPtr); if (l->listPtr->first==0) return 0; li=GWEN_ListIterator_new(l); li->current=l->listPtr->first; if (li->current) { li->current->usage++; } return li; } GWEN_LIST_ITERATOR *GWEN_List_Last(const GWEN_LIST *l) { GWEN_LIST_ITERATOR *li; assert(l); assert(l->listPtr); if (l->listPtr->last==0) return 0; li=GWEN_ListIterator_new(l); li->current=l->listPtr->last; if (li->current) li->current->usage++; return li; } void GWEN_List_Dump(const GWEN_LIST *l, FILE *f, unsigned int indent) { GWEN_LIST_ENTRY *le; unsigned int i; fprintf(f, "List contains %d entries\n", l->listPtr->size); le=l->listPtr->first; while (le) { for (i=0; iusage); for (i=0; iprevious); for (i=0; inext); for (i=0; idataPtr)); le=le->next; } /* while */ } GWEN_LIST_ITERATOR *GWEN_ListIterator_new(const GWEN_LIST *l) { GWEN_LIST_ITERATOR *li; GWEN_NEW_OBJECT(GWEN_LIST_ITERATOR, li); li->list=l; return li; } void GWEN_ListIterator_free(GWEN_LIST_ITERATOR *li) { if (li) { if (li->current) GWEN_ListEntry_free(li->current); GWEN_FREE_OBJECT(li); } } void *GWEN_ListIterator_Previous(GWEN_LIST_ITERATOR *li) { GWEN_REFPTR *rp; assert(li); rp=GWEN_ListIterator_PreviousRefPtr(li); if (!rp) return 0; return GWEN_RefPtr_GetData(rp); } GWEN_REFPTR *GWEN_ListIterator_PreviousRefPtr(GWEN_LIST_ITERATOR *li) { GWEN_LIST_ENTRY *le; assert(li); le=li->current; if (le) le=le->previous; if (li->current) GWEN_ListEntry_free(li->current); li->current=le; if (le) { le->usage++; return le->dataPtr; } return 0; } void *GWEN_ListIterator_Next(GWEN_LIST_ITERATOR *li) { GWEN_REFPTR *rp; assert(li); rp=GWEN_ListIterator_NextRefPtr(li); if (!rp) return 0; return GWEN_RefPtr_GetData(rp); } GWEN_REFPTR *GWEN_ListIterator_NextRefPtr(GWEN_LIST_ITERATOR *li) { GWEN_LIST_ENTRY *le; assert(li); le=li->current; if (le) le=le->next; if (li->current) GWEN_ListEntry_free(li->current); li->current=le; if (le) { le->usage++; return le->dataPtr; } return 0; } void *GWEN_ListIterator_Data(GWEN_LIST_ITERATOR *li) { assert(li); if (li->current) return GWEN_RefPtr_GetData(li->current->dataPtr); return 0; } GWEN_REFPTR *GWEN_ListIterator_DataRefPtr(GWEN_LIST_ITERATOR *li) { assert(li); if (li->current) return li->current->dataPtr; return 0; } void GWEN_ListIterator_IncLinkCount(GWEN_LIST_ITERATOR *li) { assert(li); if (li->current) li->current->linkCount++; } unsigned int GWEN_ListIterator_GetLinkCount(const GWEN_LIST_ITERATOR *li) { assert(li); assert(li->current); return li->current->linkCount; } /* __________________________________________________________________________ * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * ConstList * YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY */ GWEN_CONSTLIST *GWEN_ConstList_new(void) { return GWEN_List_new(); } void GWEN_ConstList_free(GWEN_CONSTLIST *l) { GWEN_List_free(l); } void GWEN_ConstList_PushBack(GWEN_CONSTLIST *l, const void *p) { GWEN_List_PushBack(l, (void *)p); } void GWEN_ConstList_PushFront(GWEN_CONSTLIST *l, const void *p) { GWEN_List_PushFront(l, (void *)p); } const void *GWEN_ConstList_GetFront(const GWEN_CONSTLIST *l) { return GWEN_List_GetFront(l); } const void *GWEN_ConstList_GetBack(const GWEN_CONSTLIST *l) { return GWEN_List_GetBack(l); } unsigned int GWEN_ConstList_GetSize(const GWEN_CONSTLIST *l) { return GWEN_List_GetSize(l); } int GWEN_ConstList_IsEmpty(const GWEN_LIST *l) { return GWEN_ConstList_GetSize(l) == 0; } void GWEN_ConstList_PopBack(GWEN_CONSTLIST *l) { GWEN_List_PopBack(l); } void GWEN_ConstList_PopFront(GWEN_CONSTLIST *l) { GWEN_List_PopFront(l); } void GWEN_ConstList_Erase(GWEN_CONSTLIST *l, GWEN_CONSTLIST_ITERATOR *it) { GWEN_List_Erase(l, it); } void GWEN_ConstList_Clear(GWEN_CONSTLIST *l) { GWEN_List_Clear(l); } const void *GWEN_ConstList_ForEach(GWEN_CONSTLIST *l, GWEN_CONSTLIST_FOREACH_CB fn, void *user_data) { GWEN_LIST_ITERATOR *it; const void *el; assert(l); it = GWEN_List_First(l); if (!it) return 0; el = GWEN_ListIterator_Data(it); while (el) { el = fn(el, user_data); if (el) { GWEN_ListIterator_free(it); return el; } el = GWEN_ListIterator_Next(it); } GWEN_ListIterator_free(it); return 0; } GWEN_CONSTLIST_ITERATOR *GWEN_ConstList_FindIter(const GWEN_CONSTLIST *l, const void *p) { GWEN_CONSTLIST_ITERATOR *li; li=GWEN_ConstList_First(l); if (li) { const void *d; d=GWEN_ConstListIterator_Data(li); while (d) { if (d==p) { return li; } d=GWEN_ConstListIterator_Next(li); } GWEN_ConstListIterator_free(li); } return 0; } const void *GWEN_ConstList_Contains(const GWEN_CONSTLIST *l, const void *p) { GWEN_CONSTLIST_ITERATOR *li; li = GWEN_ConstList_FindIter(l, p); if (li) { GWEN_ConstListIterator_free(li); return p; } return 0; } void GWEN_ConstList_Remove(GWEN_CONSTLIST *l, const void *p) { GWEN_CONSTLIST_ITERATOR *li; li = GWEN_ConstList_FindIter(l, p); if (li) { GWEN_ConstList_Erase(l, li); } } GWEN_CONSTLIST_ITERATOR *GWEN_ConstList_First(const GWEN_CONSTLIST *l) { return GWEN_List_First(l); } GWEN_CONSTLIST_ITERATOR *GWEN_ConstList_Last(const GWEN_CONSTLIST *l) { return GWEN_List_Last(l); } GWEN_CONSTLIST_ITERATOR *GWEN_ConstListIterator_new(const GWEN_CONSTLIST *l) { return GWEN_ListIterator_new(l); } void GWEN_ConstListIterator_free(GWEN_CONSTLIST_ITERATOR *li) { GWEN_ListIterator_free(li); } const void *GWEN_ConstListIterator_Previous(GWEN_CONSTLIST_ITERATOR *li) { return GWEN_ListIterator_Previous(li); } const void *GWEN_ConstListIterator_Next(GWEN_CONSTLIST_ITERATOR *li) { return GWEN_ListIterator_Next(li); } const void *GWEN_ConstListIterator_Data(GWEN_CONSTLIST_ITERATOR *li) { return GWEN_ListIterator_Data(li); } gwenhywfar-5.12.1/src/base/refptr.c0000644000175000017500000001372113142134475014061 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 25 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "refptr_p.h" #include #include #include GWEN_REFPTR_POBJECT *GWEN_RefPtrObject_new(void *dp, GWEN_REFPTR_INFO *rpi) { GWEN_REFPTR_POBJECT *rpo; GWEN_NEW_OBJECT(GWEN_REFPTR_POBJECT, rpo); rpo->refCount=1; rpo->ptr=dp; rpo->infoPtr=rpi; if (rpi) GWEN_RefPtrInfo_Attach(rpi); return rpo; } void GWEN_RefPtrObject_free(GWEN_REFPTR_POBJECT *rpo) { if (rpo) { assert(rpo->refCount); if (--(rpo->refCount)==0) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Freeing GWEN_RefPtrObject"); if ((rpo->flags & GWEN_REFPTR_FLAGS_AUTODELETE) && rpo->infoPtr && rpo->ptr) { if (rpo->infoPtr->freeFn) rpo->infoPtr->freeFn(rpo->ptr); } GWEN_FREE_OBJECT(rpo); } } } void GWEN_RefPtrObject_Attach(GWEN_REFPTR_POBJECT *rpo) { assert(rpo); assert(rpo->refCount); rpo->refCount++; } uint32_t GWEN_RefPtrInfo_GetFlags(const GWEN_REFPTR_INFO *rpi) { assert(rpi); return rpi->flags; } void GWEN_RefPtrInfo_SetFlags(GWEN_REFPTR_INFO *rpi, uint32_t fl) { assert(rpi); rpi->flags=fl; } void GWEN_RefPtrInfo_AddFlags(GWEN_REFPTR_INFO *rpi, uint32_t fl) { assert(rpi); rpi->flags|=fl; } void GWEN_RefPtrInfo_DelFlags(GWEN_REFPTR_INFO *rpi, uint32_t fl) { assert(rpi); rpi->flags&=~fl; } GWEN_REFPTR_INFO *GWEN_RefPtrInfo_new(void) { GWEN_REFPTR_INFO *rpi; GWEN_NEW_OBJECT(GWEN_REFPTR_INFO, rpi); rpi->refCount=1; return rpi; } void GWEN_RefPtrInfo_free(GWEN_REFPTR_INFO *rpi) { if (rpi) { assert(rpi->refCount); if (--(rpi->refCount)==0) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Freeing GWEN_RefPtrInfo"); GWEN_FREE_OBJECT(rpi); } } } void GWEN_RefPtrInfo_Attach(GWEN_REFPTR_INFO *rpi) { assert(rpi); assert(rpi->refCount); rpi->refCount++; } void GWEN_RefPtrInfo_SetFreeFn(GWEN_REFPTR_INFO *rpi, GWEN_REFPTR_INFO_FREE_FN f) { assert(rpi); rpi->freeFn=f; } void GWEN_RefPtrInfo_SetDupFn(GWEN_REFPTR_INFO *rpi, GWEN_REFPTR_INFO_DUP_FN f) { assert(rpi); rpi->dupFn=f; } GWEN_REFPTR *GWEN_RefPtr_new(void *dp, GWEN_REFPTR_INFO *rpi) { GWEN_REFPTR *rp; GWEN_NEW_OBJECT(GWEN_REFPTR, rp); rp->objectPtr=GWEN_RefPtrObject_new(dp, rpi); if (rpi) rp->objectPtr->flags=rpi->flags; return rp; } void GWEN_RefPtr_free(GWEN_REFPTR *rp) { if (rp) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Freeing GWEN_RefPtr"); GWEN_RefPtrObject_free(rp->objectPtr); GWEN_FREE_OBJECT(rp); } } GWEN_REFPTR *GWEN_RefPtr_dup(const GWEN_REFPTR *rp) { GWEN_REFPTR *nrp; assert(rp); GWEN_NEW_OBJECT(GWEN_REFPTR, nrp); nrp->objectPtr=rp->objectPtr; GWEN_RefPtrObject_Attach(nrp->objectPtr); return nrp; } GWEN_REFPTR *GWEN_RefPtr_copy(const GWEN_REFPTR *rp) { GWEN_REFPTR *nrp; assert(rp); if (rp->objectPtr) { if (rp->objectPtr->ptr) { if (rp->objectPtr->infoPtr) { if (rp->objectPtr->infoPtr->dupFn) { void *p; p=rp->objectPtr->infoPtr->dupFn(rp->objectPtr->ptr); nrp=GWEN_RefPtr_new(p, rp->objectPtr->infoPtr); return nrp; } } } } return 0; } void *GWEN_RefPtr_GetData(const GWEN_REFPTR *rp) { if (!rp) return 0; if (rp->objectPtr) { return rp->objectPtr->ptr; } return 0; } void GWEN_RefPtr_SetData(GWEN_REFPTR *rp, void *dp, GWEN_REFPTR_INFO *rpi) { assert(rp); if (rp->objectPtr) { GWEN_RefPtrObject_free(rp->objectPtr); } rp->objectPtr=GWEN_RefPtrObject_new(dp, rpi); } uint32_t GWEN_RefPtr_GetFlags(const GWEN_REFPTR *rp) { assert(rp); if (rp->objectPtr) return rp->objectPtr->flags; DBG_INFO(GWEN_LOGDOMAIN, "No object in RefPtr"); return 0; } void GWEN_RefPtr_SetFlags(GWEN_REFPTR *rp, uint32_t fl) { assert(rp); if (rp->objectPtr) rp->objectPtr->flags=fl; else { DBG_INFO(GWEN_LOGDOMAIN, "No object in RefPtr"); } } void GWEN_RefPtr_AddFlags(GWEN_REFPTR *rp, uint32_t fl) { assert(rp); if (rp->objectPtr) rp->objectPtr->flags|=fl; else { DBG_INFO(GWEN_LOGDOMAIN, "No object in RefPtr"); } } void GWEN_RefPtr_DelFlags(GWEN_REFPTR *rp, uint32_t fl) { assert(rp); if (rp->objectPtr) rp->objectPtr->flags&=~fl; else { DBG_INFO(GWEN_LOGDOMAIN, "No object in RefPtr"); } } gwenhywfar-5.12.1/src/base/i18n_l.h0000644000175000017500000000371213142134463013652 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_I18N_L_H #define GWENHYWFAR_I18N_L_H /* Internationalization */ #ifdef ENABLE_NLS # include # include #endif #include int GWEN_I18N_ModuleInit(); int GWEN_I18N_ModuleFini(); #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) #define I18S(msg) msg #endif gwenhywfar-5.12.1/src/base/simpleptrlist.c0000666000175000017500000003607013605674333015506 00000000000000/*************************************************************************** begin : Fri Dec 06 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "simpleptrlist_p.h" #include #include #include #include /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static void _attachToObject(GWEN_SIMPLEPTRLIST *pl, void *p); static void _detachFromObject(GWEN_SIMPLEPTRLIST *pl, void *p); static void _attachToAllObjects(GWEN_SIMPLEPTRLIST *pl); static void _detachFromAllObjects(GWEN_SIMPLEPTRLIST *pl); static INTERNAL_PTRLIST *_mallocPtrList(uint64_t totalEntries); static void _attachToPtrList(INTERNAL_PTRLIST *entries); static void _freePtrList(INTERNAL_PTRLIST *entries); static INTERNAL_PTRLIST *_reallocPtrList(INTERNAL_PTRLIST *oldEntries, uint64_t totalEntries); static INTERNAL_PTRLIST *_copyPtrList(const INTERNAL_PTRLIST *oldEntries, uint64_t totalEntries); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ GWEN_INHERIT_FUNCTIONS(GWEN_SIMPLEPTRLIST) GWEN_SIMPLEPTRLIST *GWEN_SimplePtrList_new(uint64_t startEntries, uint64_t steps) { GWEN_SIMPLEPTRLIST *pl; GWEN_NEW_OBJECT(GWEN_SIMPLEPTRLIST, pl); pl->refCount=1; GWEN_INHERIT_INIT(GWEN_SIMPLEPTRLIST, pl); pl->entryList=_mallocPtrList(startEntries); pl->maxEntries=startEntries; pl->steps=steps; pl->usedEntries=0; return pl; } GWEN_SIMPLEPTRLIST *GWEN_SimplePtrList_LazyCopy(GWEN_SIMPLEPTRLIST *oldList) { GWEN_SIMPLEPTRLIST *pl; GWEN_NEW_OBJECT(GWEN_SIMPLEPTRLIST, pl); pl->refCount=1; GWEN_INHERIT_INIT(GWEN_SIMPLEPTRLIST, pl); pl->entryList=oldList->entryList; _attachToPtrList(pl->entryList); pl->maxEntries=oldList->maxEntries; pl->steps=oldList->steps; pl->usedEntries=oldList->usedEntries; pl->attachObjectFn=oldList->attachObjectFn; pl->freeObjectFn=oldList->freeObjectFn; pl->userIntData=oldList->userIntData; pl->flags=oldList->flags | GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE; /* set copyOnWrite flag also on old list to keep lists separate even when changes to old lists are made */ oldList->flags|=GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE; return pl; } void GWEN_SimplePtrList_Attach(GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); pl->refCount++; } void GWEN_SimplePtrList_free(GWEN_SIMPLEPTRLIST *pl) { if (pl) { assert(pl->refCount); if (pl->refCount==1) { GWEN_INHERIT_FINI(GWEN_SIMPLEPTRLIST, pl); if (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS && pl->entryList->refCounter==1) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Entries no longer needed, detaching from its objects"); _detachFromAllObjects(pl); } _freePtrList(pl->entryList); pl->entryList=NULL; pl->maxEntries=0; pl->refCount--; GWEN_FREE_OBJECT(pl); } else pl->refCount--; } } void GWEN_SimplePtrList_Clear(GWEN_SIMPLEPTRLIST *pl) { uint64_t i; void **ptr; assert(pl); assert(pl->refCount); if (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS) _detachFromAllObjects(pl); ptr=pl->entryList->entries; for (i=0; iusedEntries; i++) *(ptr++)=NULL; } int GWEN_SimplePtrList_GetUserIntData(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->userIntData; } void GWEN_SimplePtrList_SetUserIntData(GWEN_SIMPLEPTRLIST *pl, int i) { assert(pl); assert(pl->refCount); pl->userIntData=i; } void GWEN_SimplePtrList_SetUserCounter(GWEN_SIMPLEPTRLIST *pl, uint64_t i) { assert(pl); assert(pl->refCount); pl->userCounter=i; } uint64_t GWEN_SimplePtrList_GetUserCounter(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->userCounter; } void GWEN_SimplePtrList_IncUserCounter(GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); pl->userCounter++; } int GWEN_SimplePtrList_DecUserCounter(GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); if (pl->userCounter) { pl->userCounter--; return 0; } else return GWEN_ERROR_INVALID; /* counter already is 0 */ } void *GWEN_SimplePtrList_GetPtrAt(const GWEN_SIMPLEPTRLIST *pl, uint64_t idx) { assert(pl); assert(pl->refCount); if (idxusedEntries) { return pl->entryList->entries[idx]; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Index outside boundaries (%lu >= %lu)", (unsigned long) idx, (unsigned long)(pl->usedEntries)); } return NULL; } int GWEN_SimplePtrList_SetPtrAt(GWEN_SIMPLEPTRLIST *pl, uint64_t idx, void *p) { assert(pl); assert(pl->refCount); if (idxusedEntries) { int rv; void *oldPtr; /* copy on write, if needed */ rv=GWEN_SimplePtrList_EnsureWritability(pl); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } oldPtr=pl->entryList->entries[idx]; pl->entryList->entries[idx]=p; if (p && (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS)) _attachToObject(pl, p); if (oldPtr && (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS)) _detachFromObject(pl, oldPtr); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Bad index"); return GWEN_ERROR_BUFFER_OVERFLOW; } return 0; } int64_t GWEN_SimplePtrList_AddPtr(GWEN_SIMPLEPTRLIST *pl, void *p) { int rv; assert(pl); assert(pl->refCount); rv=GWEN_SimplePtrList_EnsureWritability(pl); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (pl->usedEntries >= pl->maxEntries) { uint64_t num; num=pl->maxEntries+pl->steps; if (num>pl->maxEntries) { INTERNAL_PTRLIST *entryList; /* resize current list */ entryList=_reallocPtrList(pl->entryList, num); if (entryList==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Memory full."); return GWEN_ERROR_MEMORY_FULL; } pl->entryList=entryList; pl->maxEntries=num; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Table full (step size==0)."); return GWEN_ERROR_MEMORY_FULL; } } /* add entry */ pl->entryList->entries[pl->usedEntries]=p; if (p && (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS)) _attachToObject(pl, p); pl->usedEntries++; return pl->usedEntries-1; } uint64_t GWEN_SimplePtrList_GetSteps(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->steps; } void GWEN_SimplePtrList_SetSteps(GWEN_SIMPLEPTRLIST *pl, uint64_t steps) { assert(pl); assert(pl->refCount); pl->steps=steps; } uint64_t GWEN_SimplePtrList_GetMaxEntries(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->maxEntries; } uint64_t GWEN_SimplePtrList_GetUsedEntries(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->usedEntries; } void *GWEN_SimplePtrList_GetEntries(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->entryList->entries; } uint32_t GWEN_SimplePtrList_GetFlags(const GWEN_SIMPLEPTRLIST *pl) { assert(pl); assert(pl->refCount); return pl->flags; } void GWEN_SimplePtrList_SetFlags(GWEN_SIMPLEPTRLIST *pl, uint32_t f) { assert(pl); assert(pl->refCount); pl->flags=f; } void GWEN_SimplePtrList_AddFlags(GWEN_SIMPLEPTRLIST *pl, uint32_t f) { assert(pl); assert(pl->refCount); pl->flags|=f; } void GWEN_SimplePtrList_SubFlags(GWEN_SIMPLEPTRLIST *pl, uint32_t f) { assert(pl); assert(pl->refCount); pl->flags&=~f; } GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN GWEN_SimplePtrList_SetAttachObjectFn(GWEN_SIMPLEPTRLIST *pl, GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN fn) { GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN oldFn; assert(pl); assert(pl->refCount); oldFn=pl->attachObjectFn; pl->attachObjectFn=fn; return oldFn; } GWEN_SIMPLEPTRLIST_FREEOBJECT_FN GWEN_SimplePtrList_SetFreeObjectFn(GWEN_SIMPLEPTRLIST *pl, GWEN_SIMPLEPTRLIST_FREEOBJECT_FN fn) { GWEN_SIMPLEPTRLIST_FREEOBJECT_FN oldFn; assert(pl); assert(pl->refCount); oldFn=pl->freeObjectFn; pl->freeObjectFn=fn; return oldFn; } void _attachToObject(GWEN_SIMPLEPTRLIST *pl, void *p) { if (pl->attachObjectFn) pl->attachObjectFn(pl, p); } void _detachFromObject(GWEN_SIMPLEPTRLIST *pl, void *p) { if (pl->freeObjectFn) pl->freeObjectFn(pl, p); } void _attachToAllObjects(GWEN_SIMPLEPTRLIST *pl) { if (pl->attachObjectFn) { uint64_t i; void **ptr; DBG_VERBOUS(GWEN_LOGDOMAIN, "Attaching to objects"); ptr=pl->entryList->entries; for (i=0; iusedEntries; i++) { if (*ptr!=NULL) _attachToObject(pl, *ptr); ptr++; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "No attachObjectFn set"); } } void _detachFromAllObjects(GWEN_SIMPLEPTRLIST *pl) { if (pl->freeObjectFn) { uint64_t i; void **ptr; DBG_VERBOUS(GWEN_LOGDOMAIN, "Detaching from objects"); ptr=pl->entryList->entries; for (i=0; iusedEntries; i++) { if (*ptr!=NULL) _detachFromObject(pl, *ptr); ptr++; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "No attachObjectFn set"); } } INTERNAL_PTRLIST *_mallocPtrList(uint64_t totalEntries) { INTERNAL_PTRLIST *entries; size_t objectSize; DBG_VERBOUS(GWEN_LOGDOMAIN, "Malloc entries"); objectSize=sizeof(INTERNAL_PTRLIST) + (totalEntries*sizeof(void *)); entries=(INTERNAL_PTRLIST *) malloc(objectSize); if (entries==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Memory full."); return NULL; } memset((void *)entries, 0, objectSize); entries->refCounter=1; entries->storedEntries=totalEntries; return entries; } void _attachToPtrList(INTERNAL_PTRLIST *entries) { assert(entries && entries->refCounter>0); if (entries && entries->refCounter>0) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Attaching to entries"); entries->refCounter++; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Null pointer or already freed"); } } void _freePtrList(INTERNAL_PTRLIST *entries) { if (entries && entries->refCounter>0) { if (entries->refCounter==1) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Freeing entries"); entries->refCounter=0; free(entries); } else { entries->refCounter--; } } } INTERNAL_PTRLIST *_reallocPtrList(INTERNAL_PTRLIST *entries, uint64_t totalEntries) { assert(entries && entries->refCounter>0); if (entries && entries->refCounter>0) { size_t newSize; uint64_t diffEntries; DBG_VERBOUS(GWEN_LOGDOMAIN, "Resizing entries"); if (totalEntriesstoredEntries) { DBG_INFO(GWEN_LOGDOMAIN, "Will not decrease size (for now)"); return entries; } diffEntries=totalEntries-(entries->storedEntries); newSize=sizeof(INTERNAL_PTRLIST)+totalEntries*sizeof(void *); entries=(INTERNAL_PTRLIST *) realloc(entries, newSize); if (entries==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Memory full."); return NULL; } /* preset new entries */ if (diffEntries) memset((void *) &(entries->entries[entries->storedEntries]), 0, diffEntries*sizeof(void *)); entries->storedEntries=totalEntries; return entries; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Null pointer or already freed"); return NULL; } } INTERNAL_PTRLIST *_copyPtrList(const INTERNAL_PTRLIST *oldEntries, uint64_t totalEntries) { assert(oldEntries && oldEntries->refCounter>0); if (oldEntries && oldEntries->refCounter>0) { INTERNAL_PTRLIST *entries; size_t oldSize; size_t newSize; uint64_t diffEntries; DBG_VERBOUS(GWEN_LOGDOMAIN, "Copying entries"); if (totalEntriesstoredEntries) totalEntries=oldEntries->storedEntries; diffEntries=totalEntries-(oldEntries->storedEntries); oldSize=sizeof(INTERNAL_PTRLIST)+((oldEntries->storedEntries)*sizeof(void *)); newSize=sizeof(INTERNAL_PTRLIST)+totalEntries*sizeof(void *); entries=(INTERNAL_PTRLIST *) malloc(newSize); if (entries==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Memory full."); return NULL; } /* copy old struct */ memmove(entries, oldEntries, oldSize); /* preset new entries */ if (diffEntries) memset((void *) &(entries->entries[entries->storedEntries]), 0, diffEntries*sizeof(void *)); /* setup rest of the fields */ entries->refCounter=1; entries->storedEntries=totalEntries; return entries; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Null pointer or already freed"); return NULL; } } int GWEN_SimplePtrList_EnsureWritability(GWEN_SIMPLEPTRLIST *pl) { assert(pl && pl->refCount); if (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE) { INTERNAL_PTRLIST *entryList; uint64_t num; num=pl->maxEntries+pl->steps; DBG_VERBOUS(GWEN_LOGDOMAIN, "Copying entries"); /* make new entries pointer a copy of the old one */ entryList=_copyPtrList(pl->entryList, num); if (entryList==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Memory full."); return GWEN_ERROR_MEMORY_FULL; } _freePtrList(pl->entryList); pl->entryList=entryList; pl->maxEntries=num; /* this is a copy, attach to objs */ if (pl->flags & GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Attaching to objects"); _attachToAllObjects(pl); } /* clear copy-on-write flag */ pl->flags&=~GWEN_SIMPLEPTRLIST_FLAGS_COPYONWRITE; } return 0; } /* include tests */ #include "simpleptrlist-t.c" gwenhywfar-5.12.1/src/base/stringlist2.c0000666000175000017500000002624613473347043015061 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include "stringlist2_p.h" #include "debug.h" #include #include #include #ifdef HAVE_STRINGS_H # include #endif GWEN_STRINGLIST2 *GWEN_StringList2_new(void) { GWEN_STRINGLIST2 *sl2; GWEN_REFPTR_INFO *rpi; GWEN_NEW_OBJECT(GWEN_STRINGLIST2, sl2); rpi=GWEN_RefPtrInfo_new(); GWEN_RefPtrInfo_SetFreeFn(rpi, (GWEN_REFPTR_INFO_FREE_FN)free); sl2->listPtr=GWEN_List_new(); GWEN_List_SetRefPtrInfo(sl2->listPtr, rpi); GWEN_RefPtrInfo_free(rpi); return sl2; } void GWEN_StringList2_free(GWEN_STRINGLIST2 *sl2) { if (sl2) { GWEN_List_free(sl2->listPtr); GWEN_FREE_OBJECT(sl2); } } GWEN_STRINGLIST2 *GWEN_StringList2_dup(GWEN_STRINGLIST2 *sl2) { GWEN_STRINGLIST2 *nsl2; GWEN_NEW_OBJECT(GWEN_STRINGLIST2, nsl2); nsl2->listPtr=GWEN_List_dup(sl2->listPtr); nsl2->senseCase=sl2->senseCase; return nsl2; } int GWEN_StringList2_toDb(GWEN_STRINGLIST2 *sl2, GWEN_DB_NODE *db, const char *name) { GWEN_DB_DeleteVar(db, name); if (sl2) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2_First(sl2); if (it) { const char *s; s=GWEN_StringList2Iterator_Data(it); while (s) { int rv; rv=GWEN_DB_SetCharValue(db, 0, name, s); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } s=GWEN_StringList2Iterator_Next(it); } GWEN_StringList2Iterator_free(it); } } return 0; } GWEN_STRINGLIST2 *GWEN_StringList2_fromDb(GWEN_DB_NODE *db, const char *name, GWEN_STRINGLIST2_INSERTMODE m) { GWEN_STRINGLIST2 *sl2; int i; sl2=GWEN_StringList2_new(); for (i=0; ; i++) { const char *s; s=GWEN_DB_GetCharValue(db, name, i, NULL); if (!s) break; GWEN_StringList2_AppendString(sl2, s, 0, m); } return sl2; } int GWEN_StringList2_toXml(GWEN_STRINGLIST2 *sl2, GWEN_XMLNODE *node) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2_First(sl2); if (it) { const char *s; s=GWEN_StringList2Iterator_Data(it); while (s) { GWEN_XMLNode_SetCharValue(node, "elem", s); s=GWEN_StringList2Iterator_Next(it); } GWEN_StringList2Iterator_free(it); } return 0; } GWEN_STRINGLIST2 *GWEN_StringList2_fromXml(GWEN_XMLNODE *node, GWEN_STRINGLIST2_INSERTMODE m) { GWEN_STRINGLIST2 *sl2; GWEN_XMLNODE *n; sl2=GWEN_StringList2_new(); n=GWEN_XMLNode_GetFirstTag(node); while (n) { GWEN_XMLNODE *dn; dn=GWEN_XMLNode_GetFirstData(n); if (dn) { const char *s; s=GWEN_XMLNode_GetData(dn); if (s) { GWEN_StringList2_AppendString(sl2, s, 0, m); } } n=GWEN_XMLNode_GetNextTag(n); } return sl2; } void GWEN_StringList2_SetSenseCase(GWEN_STRINGLIST2 *sl2, int i) { assert(sl2); sl2->senseCase=i; } int GWEN_StringList2_AppendString(GWEN_STRINGLIST2 *sl2, const char *s, int take, GWEN_STRINGLIST2_INSERTMODE m) { GWEN_REFPTR *rp; assert(sl2); assert(s); if (m!=GWEN_StringList2_IntertMode_AlwaysAdd) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2__GetString(sl2, s); if (it) { if (m==GWEN_StringList2_IntertMode_NoDouble) { if (take) free((void *)s); GWEN_StringList2Iterator_free(it); return 0; } if (m==GWEN_StringList2_IntertMode_Reuse) { GWEN_ListIterator_IncLinkCount((GWEN_LIST_ITERATOR *)it); if (take) free((void *)s); GWEN_StringList2Iterator_free(it); return 0; } GWEN_StringList2Iterator_free(it); } } if (take) rp=GWEN_RefPtr_new((void *)s, GWEN_List_GetRefPtrInfo(sl2->listPtr)); else rp=GWEN_RefPtr_new(strdup(s), GWEN_List_GetRefPtrInfo(sl2->listPtr)); GWEN_RefPtr_AddFlags(rp, GWEN_REFPTR_FLAGS_AUTODELETE); GWEN_List_PushBackRefPtr(sl2->listPtr, rp); return 1; } int GWEN_StringList2_InsertString(GWEN_STRINGLIST2 *sl2, const char *s, int take, GWEN_STRINGLIST2_INSERTMODE m) { GWEN_REFPTR *rp; assert(sl2); assert(s); if (m!=GWEN_StringList2_IntertMode_AlwaysAdd) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2__GetString(sl2, s); if (it) { if (m==GWEN_StringList2_IntertMode_NoDouble) { if (take) free((void *)s); GWEN_StringList2Iterator_free(it); return 0; } if (m==GWEN_StringList2_IntertMode_Reuse) { GWEN_ListIterator_IncLinkCount((GWEN_LIST_ITERATOR *)it); if (take) free((void *)s); GWEN_StringList2Iterator_free(it); return 0; } GWEN_StringList2Iterator_free(it); } } if (take) rp=GWEN_RefPtr_new((void *)s, GWEN_List_GetRefPtrInfo(sl2->listPtr)); else rp=GWEN_RefPtr_new(strdup(s), GWEN_List_GetRefPtrInfo(sl2->listPtr)); GWEN_RefPtr_AddFlags(rp, GWEN_REFPTR_FLAGS_AUTODELETE); GWEN_List_PushFrontRefPtr(sl2->listPtr, rp); return 1; } int GWEN_StringList2_RemoveString(GWEN_STRINGLIST2 *sl2, const char *s) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2__GetString(sl2, s); if (it) { int lc; lc=GWEN_ListIterator_GetLinkCount(it); GWEN_List_Erase(sl2->listPtr, it); GWEN_StringList2Iterator_free(it); if (lc<2) return 1; } return 0; } int GWEN_StringList2_HasString(const GWEN_STRINGLIST2 *sl2, const char *s) { GWEN_STRINGLIST2_ITERATOR *it; int gotIt; it=GWEN_StringList2_First(sl2); gotIt=0; if (it) { const char *t; t=GWEN_StringList2Iterator_Data(it); if (sl2->senseCase) { while (t) { if (strcmp(s, t)) { gotIt=1; break; } t=GWEN_StringList2Iterator_Next(it); } } else { while (t) { if (strcasecmp(s, t)) { gotIt=1; break; } t=GWEN_StringList2Iterator_Next(it); } } GWEN_StringList2Iterator_free(it); } return gotIt; } GWEN_STRINGLIST2_ITERATOR *GWEN_StringList2__GetString(const GWEN_STRINGLIST2 *sl2, const char *s) { GWEN_STRINGLIST2_ITERATOR *it; GWEN_REFPTR *rp; it=GWEN_StringList2_First(sl2); if (it) { rp=GWEN_ListIterator_DataRefPtr((GWEN_LIST_ITERATOR *)it); if (sl2->senseCase) { while (rp) { const char *t; t=(const char *)GWEN_RefPtr_GetData(rp); assert(t); if (strcmp(s, t)==0) return it; rp=GWEN_ListIterator_NextRefPtr((GWEN_LIST_ITERATOR *)it); } } else { while (rp) { const char *t; t=(const char *)GWEN_RefPtr_GetData(rp); assert(t); if (strcasecmp(s, t)==0) return it; rp=GWEN_ListIterator_NextRefPtr((GWEN_LIST_ITERATOR *)it); } } GWEN_StringList2Iterator_free(it); } return 0; } const char *GWEN_StringList2_GetStringAt(const GWEN_STRINGLIST2 *sl2, int idx) { GWEN_STRINGLIST2_ITERATOR *it; GWEN_REFPTR *rp; it=GWEN_StringList2_First(sl2); if (it) { rp=GWEN_ListIterator_DataRefPtr((GWEN_LIST_ITERATOR *)it); while (rp) { const char *t; t=(const char *)GWEN_RefPtr_GetData(rp); assert(t); if (idx--==0) { GWEN_StringList2Iterator_free(it); return t; } rp=GWEN_ListIterator_NextRefPtr((GWEN_LIST_ITERATOR *)it); } GWEN_StringList2Iterator_free(it); } return NULL; } GWEN_STRINGLIST2_ITERATOR *GWEN_StringList2_First(const GWEN_STRINGLIST2 *l) { assert(l); return (GWEN_STRINGLIST2_ITERATOR *) GWEN_List_First(l->listPtr); } GWEN_STRINGLIST2_ITERATOR *GWEN_StringList2_Last(const GWEN_STRINGLIST2 *l) { assert(l); return (GWEN_STRINGLIST2_ITERATOR *) GWEN_List_Last(l->listPtr); } void GWEN_StringList2Iterator_free(GWEN_STRINGLIST2_ITERATOR *li) { assert(li); GWEN_ListIterator_free((GWEN_LIST_ITERATOR *)li); } const char *GWEN_StringList2Iterator_Previous(GWEN_STRINGLIST2_ITERATOR *li) { assert(li); return (const char *) GWEN_ListIterator_Previous((GWEN_LIST_ITERATOR *)li); } const char *GWEN_StringList2Iterator_Next(GWEN_STRINGLIST2_ITERATOR *li) { assert(li); return (const char *) GWEN_ListIterator_Next((GWEN_LIST_ITERATOR *)li); } const char *GWEN_StringList2Iterator_Data(GWEN_STRINGLIST2_ITERATOR *li) { assert(li); return (const char *) GWEN_ListIterator_Data((GWEN_LIST_ITERATOR *)li); } GWEN_REFPTR *GWEN_StringList2Iterator_DataRefPtr(GWEN_STRINGLIST2_ITERATOR *li) { assert(li); return (GWEN_REFPTR *) GWEN_ListIterator_DataRefPtr((GWEN_LIST_ITERATOR *)li); } unsigned int GWEN_StringList2Iterator_GetLinkCount(const GWEN_STRINGLIST2_ITERATOR *li) { assert(li); return GWEN_ListIterator_GetLinkCount((const GWEN_LIST_ITERATOR *)li); } unsigned int GWEN_StringList2_GetCount(const GWEN_STRINGLIST2 *l) { assert(l); return GWEN_List_GetSize(l->listPtr); } void GWEN_StringList2_Dump(const GWEN_STRINGLIST2 *sl2) { GWEN_STRINGLIST2_ITERATOR *it; it=GWEN_StringList2_First(sl2); if (it) { const char *t; int i; t=GWEN_StringList2Iterator_Data(it); i=0; while (t) { fprintf(stderr, "String %d: \"%s\" [%d]\n", i, t, GWEN_StringList2Iterator_GetLinkCount(it)); t=GWEN_StringList2Iterator_Next(it); } GWEN_StringList2Iterator_free(it); } else { fprintf(stderr, "Empty string list.\n"); } } gwenhywfar-5.12.1/src/base/list_p.h0000644000175000017500000000615513552052525014061 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Nov 15 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_LIST_P_H #define GWENHYWFAR_LIST_P_H #include #include typedef struct GWEN_LIST_ENTRY GWEN_LIST_ENTRY; typedef struct GWEN_CONSTLIST_ENTRY GWEN_CONSTLIST_ENTRY; typedef struct GWEN__LISTPTR GWEN__LISTPTR; struct GWEN_LIST_ENTRY { GWEN_LIST_ENTRY *previous; GWEN_LIST_ENTRY *next; GWEN_REFPTR *dataPtr; unsigned int usage; unsigned int linkCount; }; static GWEN_LIST_ENTRY *GWEN_ListEntry_new(); static void GWEN_ListEntry_free(GWEN_LIST_ENTRY *le); struct GWEN_CONSTLIST_ENTRY { GWEN_CONSTLIST_ENTRY *previous; GWEN_CONSTLIST_ENTRY *next; const void *data; unsigned int usage; }; struct GWEN__LISTPTR { uint32_t refCount; GWEN_LIST_ENTRY *first; GWEN_LIST_ENTRY *last; unsigned int size; GWEN_REFPTR_INFO *refPtrInfo; }; static GWEN__LISTPTR *GWEN__ListPtr_new(); static void GWEN__ListPtr_free(GWEN__LISTPTR *lp); static void GWEN__ListPtr_Attach(GWEN__LISTPTR *lp); static void GWEN__ListPtr_Clear(GWEN__LISTPTR *lp); static GWEN__LISTPTR *GWEN__ListPtr_dup(GWEN__LISTPTR *lp); struct GWEN_LIST { GWEN_INHERIT_ELEMENT(GWEN_LIST) GWEN__LISTPTR *listPtr; GWEN_REFPTR_INFO *refPtrInfo; }; struct GWEN_CONSTLIST { GWEN_CONSTLIST_ENTRY *first; GWEN_CONSTLIST_ENTRY *last; unsigned int size; }; struct GWEN_LIST_ITERATOR { const GWEN_LIST *list; GWEN_LIST_ENTRY *current; }; struct GWEN_CONSTLIST_ITERATOR { const GWEN_CONSTLIST *list; GWEN_CONSTLIST_ENTRY *current; }; #endif gwenhywfar-5.12.1/src/base/param_p.h0000644000175000017500000000317213644653711014210 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "param.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef GWEN_PARAM_PARAM_P_H #define GWEN_PARAM_PARAM_P_H #include "./param.h" #ifdef __cplusplus extern "C" { #endif struct GWEN_PARAM { GWEN_LIST_ELEMENT(GWEN_PARAM) GWEN_TREE_ELEMENT(GWEN_PARAM) int _refCount; char *name; uint32_t flags; GWEN_PARAM_TYPE type; GWEN_PARAM_DATATYPE dataType; char *shortDescription; char *longDescription; char *currentValue; char *defaultValue; GWEN_STRINGLIST2 *choices; int internalIntValue; /* volatile */ double internalFloatValue; /* volatile */ uint32_t runtimeFlags; /* volatile */ }; /** Getter. * Use this function to get the member "internalIntValue" (see @ref GWEN_PARAM_internalIntValue) */ int GWEN_Param_GetInternalIntValue(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "internalFloatValue" (see @ref GWEN_PARAM_internalFloatValue) */ double GWEN_Param_GetInternalFloatValue(const GWEN_PARAM *p_struct); /** Setter. * Use this function to set the member "internalIntValue" (see @ref GWEN_PARAM_internalIntValue) */ void GWEN_Param_SetInternalIntValue(GWEN_PARAM *p_struct, int p_src); /** Setter. * Use this function to set the member "internalFloatValue" (see @ref GWEN_PARAM_internalFloatValue) */ void GWEN_Param_SetInternalFloatValue(GWEN_PARAM *p_struct, double p_src); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/stringlist2_p.h0000644000175000017500000000403213142134475015362 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_STRINGLIST2_P_H #define GWENHYWFAR_STRINGLIST2_P_H #include #include #include #include #include struct GWEN_STRINGLIST2 { int senseCase; GWEN_LIST *listPtr; }; GWEN_STRINGLIST2_ITERATOR * GWEN_StringList2__GetString(const GWEN_STRINGLIST2 *sl2, const char *s); #endif gwenhywfar-5.12.1/src/base/plugindescr.c0000664000175000017500000003677514460564441015122 00000000000000/*************************************************************************** begin : Thu Apr 03 2003 copyright : (C) 2022 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "plugindescr_p.h" #include "i18n_l.h" #include #include #include #include GWEN_LIST_FUNCTIONS(GWEN_PLUGIN_DESCRIPTION, GWEN_PluginDescription) GWEN_LIST2_FUNCTIONS(GWEN_PLUGIN_DESCRIPTION, GWEN_PluginDescription) static GWEN_PLUGIN_DESCRIPTION *_pdList2_freeAll_cb(GWEN_PLUGIN_DESCRIPTION *pd, void *); static int _getLongDescrByFormat(const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf); static GWEN_PLUGIN_DESCRIPTION *_readPluginDescriptionFromFile(const char *folder, const char *fullFileName, const char *pluginType); static GWEN_XMLNODE *_getLocalOrMainPluginNode(GWEN_XMLNODE *pluginDescrNode); GWEN_PLUGIN_DESCRIPTION *GWEN_PluginDescription_new(void) { GWEN_PLUGIN_DESCRIPTION *pd; GWEN_NEW_OBJECT(GWEN_PLUGIN_DESCRIPTION, pd); pd->refCount=1; DBG_MEM_INC("GWEN_PLUGIN_DESCRIPTION", 0); GWEN_LIST_INIT(GWEN_PLUGIN_DESCRIPTION, pd); return pd; } GWEN_PLUGIN_DESCRIPTION *GWEN_PluginDescription_fromXml(GWEN_XMLNODE *node) { GWEN_PLUGIN_DESCRIPTION *pd; const char *p; pd=GWEN_PluginDescription_new(); p=GWEN_XMLNode_GetProperty(node, "name", 0); if (!p) { DBG_ERROR(GWEN_LOGDOMAIN, "Unnamed plugin"); GWEN_PluginDescription_free(pd); return 0; } pd->name=strdup(p); pd->xmlNode=GWEN_XMLNode_dup(node); p=GWEN_XMLNode_GetProperty(node, "i18n", NULL); if (!p) { DBG_NOTICE(GWEN_LOGDOMAIN, "Plugin has no I18N domain, using GWEN"); p="gwenhywfar"; } pd->langDomain=strdup(p); p=GWEN_XMLNode_GetProperty(node, "type", 0); if (!p) { DBG_ERROR(GWEN_LOGDOMAIN, "Plugin has no type"); GWEN_PluginDescription_free(pd); return 0; } pd->type=strdup(p); p=GWEN_XMLNode_GetCharValue(node, "version", 0); if (p) pd->version=strdup(p); p=GWEN_XMLNode_GetCharValue(node, "author", 0); if (p) pd->author=strdup(p); p=GWEN_XMLNode_GetCharValue(node, "short", 0); if (p) pd->shortDescr=strdup(p); p=GWEN_XMLNode_GetCharValue(node, "descr", 0); if (p) pd->longDescr=strdup(p); return pd; } void GWEN_PluginDescription_free(GWEN_PLUGIN_DESCRIPTION *pd) { if (pd) { assert(pd->refCount); if (pd->refCount==1) { DBG_MEM_DEC("GWEN_PLUGIN_DESCRIPTION"); GWEN_LIST_FINI(GWEN_PLUGIN_DESCRIPTION, pd); free(pd->path); GWEN_XMLNode_free(pd->xmlNode); free(pd->fileName); free(pd->longDescr); free(pd->shortDescr); free(pd->author); free(pd->version); free(pd->langDomain); free(pd->type); free(pd->name); pd->refCount=0; GWEN_FREE_OBJECT(pd); } else pd->refCount--; } } void GWEN_PluginDescription_Attach(GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); assert(pd->refCount); pd->refCount++; } GWEN_PLUGIN_DESCRIPTION *GWEN_PluginDescription_dup(const GWEN_PLUGIN_DESCRIPTION *pd) { GWEN_PLUGIN_DESCRIPTION *np; const char *s; assert(pd); GWEN_NEW_OBJECT(GWEN_PLUGIN_DESCRIPTION, np); np->refCount=1; DBG_MEM_INC("GWEN_PLUGIN_DESCRIPTION", 0); GWEN_LIST_INIT(GWEN_PLUGIN_DESCRIPTION, np); s=pd->fileName; if (s) np->fileName=strdup(s); s=pd->path; if (s) np->path=strdup(s); s=pd->name; if (s) np->name=strdup(s); s=pd->type; if (s) np->type=strdup(s); s=pd->langDomain; if (s) np->langDomain=strdup(s); s=pd->shortDescr; if (s) np->shortDescr=strdup(s); s=pd->author; if (s) np->author=strdup(s); s=pd->version; if (s) np->version=strdup(s); s=pd->longDescr; if (s) np->longDescr=strdup(s); np->isActive=pd->isActive; if (pd->xmlNode) np->xmlNode=GWEN_XMLNode_dup(pd->xmlNode); return np; } GWEN_PLUGIN_DESCRIPTION *_pdList2_freeAll_cb(GWEN_PLUGIN_DESCRIPTION *pd, GWEN_UNUSED void *user_data) { GWEN_PluginDescription_free(pd); return 0; } void GWEN_PluginDescription_List2_freeAll(GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl) { GWEN_PluginDescription_List2_ForEach(pdl, _pdList2_freeAll_cb, 0); GWEN_PluginDescription_List2_free(pdl); } const char *GWEN_PluginDescription_GetPath(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->path; } void GWEN_PluginDescription_SetPath(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->path); if (s) pd->path=strdup(s); else pd->path=0; } const char *GWEN_PluginDescription_GetName(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->name; } void GWEN_PluginDescription_SetName(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->name); pd->name=s?strdup(s):NULL; } const char *GWEN_PluginDescription_GetType(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->type; } void GWEN_PluginDescription_SetType(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->type); pd->type=s?strdup(s):NULL; } const char *GWEN_PluginDescription_GetShortDescr(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return GWEN_I18N_Translate(pd->langDomain, pd->shortDescr); } void GWEN_PluginDescription_SetShortDescr(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->shortDescr); pd->shortDescr=s?strdup(s):NULL; } const char *GWEN_PluginDescription_GetAuthor(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->author; } void GWEN_PluginDescription_SetAuthor(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->author); pd->author=s?strdup(s):NULL; } const char *GWEN_PluginDescription_GetVersion(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->version; } void GWEN_PluginDescription_SetVersion(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->version); pd->version=s?strdup(s):NULL; } const char *GWEN_PluginDescription_GetLongDescr(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return GWEN_I18N_Translate(pd->langDomain, pd->longDescr); } void GWEN_PluginDescription_SetLongDescr(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->longDescr); pd->longDescr=s?strdup(s):NULL; } int _getLongDescrByFormat(const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf) { assert(pd); if (pd->xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(pd->xmlNode, "descr", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "text", "format", s); while (n) { if (0==GWEN_XMLNode_GetProperty(n, "lang", 0)) { int rv; rv=GWEN_XMLNode_toBuffer(n, buf, GWEN_XML_FLAGS_TOLERANT_ENDTAGS); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } n=GWEN_XMLNode_FindNextTag(n, "text", "format", s); } /* while */ } } return GWEN_ERROR_GENERIC; } #ifndef NO_DEPRECATED_SYMBOLS static int _getLocalizedLongDescrByFormat(const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, const char *lang, GWEN_BUFFER *buf) { assert(pd); if (pd->xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(pd->xmlNode, "descr", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "text", "lang", lang); while (n) { const char *fmt; fmt=GWEN_XMLNode_GetProperty(n, "format", 0); if (fmt && strcasecmp(fmt, s)==0) { int rv; rv=GWEN_XMLNode_toBuffer(n, buf, GWEN_XML_FLAGS_TOLERANT_ENDTAGS); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } n=GWEN_XMLNode_FindNextTag(n, "text", "lang", lang); } /* while */ } } return GWEN_ERROR_GENERIC; } int GWEN_PluginDescription_GetLongDescrByFormat(const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf) { GWEN_STRINGLIST *langl; int rv; langl=GWEN_I18N_GetCurrentLocaleList(); if (langl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(langl); while (se) { const char *l; l=GWEN_StringListEntry_Data(se); DBG_NOTICE(GWEN_LOGDOMAIN, "Trying locale \"%s\"", l); assert(l); rv=_getLocalizedLongDescrByFormat(pd, s, l, buf); if (rv==0) return rv; se=GWEN_StringListEntry_Next(se); } /* while */ } /* if language list available */ /* no localized version found, return text for default language */ rv=_getLongDescrByFormat(pd, s, buf); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } #endif // ifndef NO_DEPRECATED_SYMBOLS const char *GWEN_PluginDescription_GetFileName(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->fileName; } void GWEN_PluginDescription_SetFileName(GWEN_PLUGIN_DESCRIPTION *pd, const char *s) { assert(pd); free(pd->fileName); if (s) pd->fileName=strdup(s); else pd->fileName=0; } GWEN_XMLNODE *GWEN_PluginDescription_GetXmlNode(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->xmlNode; } GWEN_PLUGIN_DESCRIPTION_LIST2 *GWEN_LoadPluginDescrs(const char *path) { GWEN_PLUGIN_DESCRIPTION_LIST2 *pl; pl=GWEN_PluginDescription_List2_new(); GWEN_LoadPluginDescrsByType(path, 0, pl); if (GWEN_PluginDescription_List2_GetSize(pl)==0) { GWEN_PluginDescription_List2_free(pl); return 0; } return pl; } int GWEN_PluginDescription_IsActive(const GWEN_PLUGIN_DESCRIPTION *pd) { assert(pd); return pd->isActive; } void GWEN_PluginDescription_SetIsActive(GWEN_PLUGIN_DESCRIPTION *pd, int i) { assert(pd); pd->isActive=i; } int GWEN_LoadPluginDescrsByType(const char *folder, const char *pluginType, GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl) { GWEN_STRINGLIST *fileNameList; int rv; fileNameList=GWEN_StringList_new(); rv=GWEN_Directory_GetFileEntries(folder?folder:"", fileNameList, "*.xml"); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "No matching files found in %s", folder?folder:""); GWEN_StringList_free(fileNameList); return rv; } if (GWEN_StringList_Count(fileNameList)) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(fileNameList); if (se) { GWEN_BUFFER *nbuf; unsigned int pathLen; nbuf=GWEN_Buffer_new(0, 256, 0, 1); if (folder && *folder) { GWEN_Buffer_AppendString(nbuf, folder); GWEN_Buffer_AppendString(nbuf, GWEN_DIR_SEPARATOR_S); } pathLen=GWEN_Buffer_GetUsedBytes(nbuf); while(se) { const char *fileName; fileName=GWEN_StringListEntry_Data(se); DBG_INFO(GWEN_LOGDOMAIN, "Checking entry \"%s\" (%s)\n", fileName, GWEN_Buffer_GetStart(nbuf)); if (fileName && *fileName) { GWEN_PLUGIN_DESCRIPTION *pd; GWEN_Buffer_AppendString(nbuf, fileName); pd=_readPluginDescriptionFromFile(folder, GWEN_Buffer_GetStart(nbuf), pluginType); if (pd) { DBG_INFO(GWEN_LOGDOMAIN, "Adding loaded plugin description %s/%s (%s)", pluginType, GWEN_PluginDescription_GetName(pd), GWEN_Buffer_GetStart(nbuf)); GWEN_PluginDescription_List2_PushBack(pdl, pd); } else { DBG_INFO(GWEN_LOGDOMAIN, "Could not read description from \"%s\"\n", fileName); } GWEN_Buffer_Crop(nbuf, 0, pathLen); GWEN_Buffer_SetPos(nbuf, pathLen); } se=GWEN_StringListEntry_Next(se); } /* while(se) */ GWEN_Buffer_free(nbuf); } /* if (se) */ } /* if stringlist not empty */ else { DBG_INFO(GWEN_LOGDOMAIN, "Not matching files in \"%s\"\n", folder); } GWEN_StringList_free(fileNameList); return 0; } GWEN_PLUGIN_DESCRIPTION *_readPluginDescriptionFromFile(const char *folder, const char *fullFileName, const char *pluginType) { GWEN_XMLNODE *fileNode; fileNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); if (GWEN_XML_ReadFile(fileNode, fullFileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_HANDLE_HEADERS | GWEN_XML_FLAGS_HANDLE_OPEN_HTMLTAGS)) { DBG_WARN(GWEN_LOGDOMAIN, "Bad file \"%s\"", fullFileName); } else { GWEN_XMLNODE *pluginDescrNode; GWEN_XMLNODE *pluginNode=NULL; pluginDescrNode=GWEN_XMLNode_FindFirstTag(fileNode, "PluginDescr", NULL, NULL); if (!pluginDescrNode) pluginDescrNode=fileNode; pluginNode=_getLocalOrMainPluginNode(pluginDescrNode); if (pluginNode) { GWEN_PLUGIN_DESCRIPTION *pd; int typeMatches=1; if (pluginType) { const char *ft; ft=GWEN_XMLNode_GetProperty(pluginNode, "type", NULL); if (!ft) typeMatches=0; else if (strcasecmp(ft, pluginType)!=0) { typeMatches=0; } } /* if pluginType specified */ if (typeMatches) { pd=GWEN_PluginDescription_fromXml(pluginNode); if (!pd) { DBG_WARN(GWEN_LOGDOMAIN, "Bad plugin description"); } else { GWEN_PluginDescription_SetFileName(pd, fullFileName); GWEN_PluginDescription_SetPath(pd, folder); GWEN_XMLNode_free(fileNode); return pd; } } /* if typeMatches */ else { DBG_INFO(GWEN_LOGDOMAIN, "Ignoring file \"%s\" (bad/missing pluginType)", fullFileName); } } else { DBG_WARN(GWEN_LOGDOMAIN, "File \"%s\" does not contain a plugin description", fullFileName); } } GWEN_XMLNode_free(fileNode); return NULL; } GWEN_XMLNODE *_getLocalOrMainPluginNode(GWEN_XMLNODE *pluginDescrNode) { GWEN_XMLNODE *n=NULL; GWEN_STRINGLIST *languageList; languageList=GWEN_I18N_GetCurrentLocaleList(); if (languageList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(languageList); while (se) { const char *l; l=GWEN_StringListEntry_Data(se); DBG_DEBUG(GWEN_LOGDOMAIN, "Trying locale \"%s\"", l); assert(l); n=GWEN_XMLNode_FindFirstTag(pluginDescrNode, "plugin", "lang", l); if (n) break; se=GWEN_StringListEntry_Next(se); } /* while */ } /* if language list available */ if (!n) n=GWEN_XMLNode_FindFirstTag(pluginDescrNode, "plugin", 0, 0); return n; } gwenhywfar-5.12.1/src/base/refptr_p.h0000644000175000017500000000442613142134463014404 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 25 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_REFPTR_P_H #define GWEN_REFPTR_P_H #include typedef struct GWEN_REFPTR_POBJECT GWEN_REFPTR_POBJECT; struct GWEN_REFPTR_INFO { uint32_t refCount; uint32_t flags; GWEN_REFPTR_INFO_FREE_FN freeFn; GWEN_REFPTR_INFO_DUP_FN dupFn; }; struct GWEN_REFPTR_POBJECT { uint32_t refCount; uint32_t flags; GWEN_REFPTR_INFO *infoPtr; void *ptr; }; struct GWEN_REFPTR { GWEN_REFPTR_POBJECT *objectPtr; }; GWEN_REFPTR_POBJECT *GWEN_RefPtrObject_new(void *dp, GWEN_REFPTR_INFO *rpi); void GWEN_RefPtrObject_free(GWEN_REFPTR_POBJECT *rpo); void GWEN_RefPtrObject_Attach(GWEN_REFPTR_POBJECT *rpo); #endif gwenhywfar-5.12.1/src/base/param.xml0000644000175000017500000001047013142134463014230 00000000000000 GWEN_PARAM GWEN_Param param with_db with_xml with_tree with_list1 with_list2 with_refcount
gwenhywfar/gwenhywfarapi.h
gwenhywfar/stringlist2.h
gwenhywfar/param_fns.h
param_fns.c
NULL NULL public own with_getbymember const dup const 0 0 with_flags public GWEN_Param_Type_Unknown GWEN_Param_Type_Unknown enum public GWEN_Param_DataType_Unknown GWEN_Param_DataType_Unknown enum public NULL NULL public own const dup const NULL NULL public own const dup const NULL NULL public own const dup const NULL NULL public own const dup const NULL NULL own assign none const public 0 0 volatile private 0 0 volatile private 0 0 volatile with_flags public
gwenhywfar-5.12.1/src/base/gwensignal.h0000644000175000017500000001337613142134475014730 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: stringlist_p.h 786 2005-07-09 13:38:17Z aquamaniac $ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_SIGNAL_H #define GWENHYWFAR_SIGNAL_H #include #include #include #ifdef __cplusplus extern "C" { #endif /** * @defgroup MOD_SIGNALSLOT Module for Signals and Slots * @ingroup MOD_BASE * @short Basic signal handling. * * This module introduces a simple signal-slot framework. * Signals have a fixed list of arguments: *
    *
  • a void* pointer
  • *
  • 1st integer argument
  • *
  • 2nd integer argument
  • *
* The actual type of the void pointer is defined by the signal and * corresponding slot(s): Gwen checks the type at runtime and refuses to * connect signals with slots which define this pointer to be of a different * type. * Any signal can be connected to any number of matching slots. * * The central object in this framework is @ref GWEN_SIGNALOBJECT. It holds * a list of signals and slots for a given object. * * */ /*@{*/ typedef struct GWEN_SIGNALOBJECT GWEN_SIGNALOBJECT; typedef struct GWEN_SIGNAL GWEN_SIGNAL; typedef struct GWEN_SLOT GWEN_SLOT; /** * This is the prototype for the slot function. If there is a problem in the * function it should return 1, otherwise 0. */ typedef int GWENHYWFAR_CB(*GWEN_SLOT_FUNCTION)(GWEN_SLOT *slot, void *userData, void *pArg1, void *pArg2, int iArg3, int iArg4); /** @name SignalObject * */ /*@{*/ GWENHYWFAR_API GWEN_SIGNALOBJECT *GWEN_SignalObject_new(void); GWENHYWFAR_API void GWEN_SignalObject_free(GWEN_SIGNALOBJECT *so); GWENHYWFAR_API GWEN_SIGNAL *GWEN_SignalObject_FindSignal(const GWEN_SIGNALOBJECT *so, const char *name, const char *typeOfArg1, const char *typeOfArg2); GWENHYWFAR_API GWEN_SLOT *GWEN_SignalObject_FindSlot(const GWEN_SIGNALOBJECT *so, const char *name, const char *typeOfArg1, const char *typeOfArg2); /** * This function removes all signals and slots for the given derived * type. This function can be used from within the FREEDATA function * of the GWEN_INHERIT framework. */ GWENHYWFAR_API void GWEN_SignalObject_RemoveForDerivedType(GWEN_SIGNALOBJECT *so, const char *derivedType); /** * @defgroup MOD_SIGNALSLOT_SIGNAL Signals * @short Signals * */ /*@{*/ GWENHYWFAR_API GWEN_SIGNAL *GWEN_Signal_new(GWEN_SIGNALOBJECT *so, const char *derivedType, const char *name, const char *typeOfArg1, const char *typeOfArg2); GWENHYWFAR_API void GWEN_Signal_free(GWEN_SIGNAL *sig); GWENHYWFAR_API GWEN_SIGNALOBJECT *GWEN_Signal_GetSignalObject(const GWEN_SIGNAL *sig); GWENHYWFAR_API int GWEN_Signal_Connect(GWEN_SIGNAL *sig, GWEN_SLOT *slot); GWENHYWFAR_API int GWEN_Signal_Disconnect(GWEN_SIGNAL *sig, GWEN_SLOT *slot); /** * This function calls the slot function of all connected slots. * If any of the slot functions called returns with code 1 then * this function will return 1, too. Otherwise 0 is returned. * This means that this function will only return 0 if every called slot * function returns 0. */ GWENHYWFAR_API int GWEN_Signal_Emit(GWEN_SIGNAL *sig, void *pArg1, void *pArg2, int iArg3, int iArg4); /*@}*/ /** * @defgroup MOD_SIGNALSLOT_SLOT Slots * @short Slots * */ /*@{*/ GWENHYWFAR_API GWEN_SLOT *GWEN_Slot_new(GWEN_SIGNALOBJECT *so, const char *derivedType, const char *name, const char *typeOfArg1, const char *typeOfArg2, GWEN_SLOT_FUNCTION fn, void *userData); GWENHYWFAR_API void GWEN_Slot_free(GWEN_SLOT *slot); GWENHYWFAR_API GWEN_SIGNALOBJECT *GWEN_Slot_GetSignalObject(const GWEN_SLOT *slot); /*@}*/ /* defgroup */ /*@}*/ /* defgroup */ #ifdef __cplusplus } /* extern C */ #endif #endif gwenhywfar-5.12.1/src/base/param_fns.c0000664000175000017500000001330413265727205014531 00000000000000/*************************************************************************** begin : Wed Sep 17 2014 copyright : (C) 2014 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #include #include int GWEN_Param_GetCurrentValueAsInt(const GWEN_PARAM *param) { const char *s; assert(param); s=param->currentValue; if (s && *s) { int b; int v; b=sscanf(s, "%i", &v); if (b==1) return v; /* fall through */ } s=param->defaultValue; if (s && *s) { int b; int v; b=sscanf(s, "%i", &v); if (b==1) return v; /* fall through */ } return 0; } void GWEN_Param_SetCurrentValueAsInt(GWEN_PARAM *param, int v) { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "%i", v); numbuf[sizeof(numbuf)-1]=0; GWEN_Param_SetCurrentValue(param, numbuf); } double GWEN_Param_GetCurrentValueAsDouble(const GWEN_PARAM *param) { const char *s; assert(param); s=param->currentValue; if (s && *s) { double v; int b; b=GWEN_Text_StringToDouble(s, &v); if (b>=0) return v; /* fall through */ } s=param->defaultValue; if (s && *s) { double v; int b; b=GWEN_Text_StringToDouble(s, &v); if (b>=0) return v; /* fall through */ } return 0.0; } void GWEN_Param_SetCurrentValueAsDouble(GWEN_PARAM *param, double v) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 64, 0, 1); GWEN_Text_DoubleToBuffer(v, tbuf); GWEN_Param_SetCurrentValue(param, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int GWEN_Param_List_GetCurrentValueAsInt(const GWEN_PARAM_LIST *pl, const char *name, int defVal) { GWEN_PARAM *p; p=GWEN_Param_List_GetByName(pl, name); if (p) return GWEN_Param_GetCurrentValueAsInt(p); return defVal; } void GWEN_Param_List_SetCurrentValueAsInt(GWEN_PARAM_LIST *pl, const char *name, int v) { GWEN_PARAM *p; p=GWEN_Param_List_GetByName(pl, name); if (p) GWEN_Param_SetCurrentValueAsInt(p, v); } double GWEN_Param_List_GetCurrentValueAsDouble(const GWEN_PARAM_LIST *pl, const char *name, double defVal) { GWEN_PARAM *p; p=GWEN_Param_List_GetByName(pl, name); if (p) return GWEN_Param_GetCurrentValueAsDouble(p); return defVal; } void GWEN_Param_List_SetCurrentValueAsDouble(GWEN_PARAM_LIST *pl, const char *name, double v) { GWEN_PARAM *p; p=GWEN_Param_List_GetByName(pl, name); if (p) GWEN_Param_SetCurrentValueAsDouble(p, v); } void GWEN_Param_List_WriteXml(const GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) { const GWEN_PARAM *p; p=GWEN_Param_List_First(pl); while (p) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "param"); GWEN_Param_WriteXml(p, n); GWEN_XMLNode_AddChild(xn, n); /* next */ p=GWEN_Param_List_Next(p); } } void GWEN_Param_List_ReadXml(GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(xn, "param", NULL, NULL); while (n) { GWEN_PARAM *p; p=GWEN_Param_fromXml(n); if (p) GWEN_Param_List_Add(p, pl); n=GWEN_XMLNode_FindNextTag(n, "param", NULL, NULL); } } void GWEN_Param_List_WriteValuesToXml(const GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) { const GWEN_PARAM *p; p=GWEN_Param_List_First(pl); while (p) { const char *sName; const char *sValue; sName=GWEN_Param_GetName(p); sValue=GWEN_Param_GetCurrentValue(p); if (sName && *sName && sValue && *sValue) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "param"); GWEN_XMLNode_SetProperty(n, "name", sName); GWEN_XMLNode_SetCharValue(n, NULL, sValue); GWEN_XMLNode_AddChild(xn, n); } /* next */ p=GWEN_Param_List_Next(p); } } void GWEN_Param_List_ReadValuesFromXml(GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(xn, "param", NULL, NULL); while (n) { const char *sName; const char *sValue; sName=GWEN_XMLNode_GetProperty(n, "name", NULL); sValue=GWEN_XMLNode_GetCharValue(n, NULL, NULL); if (sName && *sName) { GWEN_PARAM *p; p=GWEN_Param_List_GetByName(pl, sName); if (p) { GWEN_Param_SetCurrentValue(p, sValue); } else { DBG_WARN(GWEN_LOGDOMAIN, "Param \"%s\" not found, ignoring", sName); } } n=GWEN_XMLNode_FindNextTag(n, "param", NULL, NULL); } } gwenhywfar-5.12.1/src/base/multicache.h0000666000175000017500000001414013642701350014677 00000000000000/*************************************************************************** begin : Wed May 08 2013 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_MULTICACHE_H #define GWENHYWFAR_MULTICACHE_H #include #include #include #ifdef __cplusplus extern "C" { #endif /** @defgroup MOD_MULTICACHE Multi Cache Module * @ingroup MOD_BASE * * @brief This file contains the definition of a GWEN_MULTICACHE, a * cache for multiple types of data. * * The idea behind this is to make it easier to handle multiple types of objects * by a single central cache object. You only set the maximum total size the central * cache object is allowed to provide and that object will use this sum of memory to * provide a caching mechanism for multiple different types. * * You'll have to create a single central cache object (GWEN_MULTICACHE). Then you can * create a GWEN_MULTICACHE_TYPE object for each kind of data you want to have managed. * For the GWEN_MULTICACHE_TYPE object you need to provide functions which will increase * and decrease the reference counter of the object cached. * */ /*@{*/ typedef struct GWEN_MULTICACHE GWEN_MULTICACHE; typedef struct GWEN_MULTICACHE_TYPE GWEN_MULTICACHE_TYPE; typedef int GWENHYWFAR_CB(*GWEN_MULTICACHE_TYPE_ATTACH_FN)(void *p); typedef int GWENHYWFAR_CB(*GWEN_MULTICACHE_TYPE_FREE_FN)(void *p); typedef int GWENHYWFAR_CB(*GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN)(const GWEN_MULTICACHE_TYPE *ct, void *p); typedef int GWENHYWFAR_CB(*GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN)(const GWEN_MULTICACHE_TYPE *ct, void *p); /** @name Per-type Cache Objects * * This object describes one of the data types which can be managed by a central * cache object. */ /*@{*/ GWENHYWFAR_API GWEN_MULTICACHE_TYPE *GWEN_MultiCache_Type_new(GWEN_MULTICACHE *mc); GWENHYWFAR_API void GWEN_MultiCache_Type_free(GWEN_MULTICACHE_TYPE *ct); GWENHYWFAR_API void *GWEN_MultiCache_Type_GetData(const GWEN_MULTICACHE_TYPE *ct, uint32_t id); GWENHYWFAR_API void *GWEN_MultiCache_Type_GetDataWithParams(const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4); GWENHYWFAR_API void *GWEN_MultiCache_Type_GetDataWithParams5(const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5); GWENHYWFAR_API void GWEN_MultiCache_Type_SetData(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size); GWENHYWFAR_API void GWEN_MultiCache_Type_SetDataWithParams(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4); GWENHYWFAR_API void GWEN_MultiCache_Type_SetDataWithParams5(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5); GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeData(GWEN_MULTICACHE_TYPE *ct, uint32_t id); GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeAll(GWEN_MULTICACHE_TYPE *ct); GWENHYWFAR_API GWEN_IDLIST64 *GWEN_MultiCache_Type_GetIdsInCache(const GWEN_MULTICACHE_TYPE *ct); GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_FN fn); GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_FN fn); GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachObjectFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN fn); GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeObjectFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN fn); /*@}*/ /** @name Central Cache Object * * This is the central cache object which can hold multiple types of data. */ /*@{*/ GWENHYWFAR_API GWEN_MULTICACHE *GWEN_MultiCache_new(uint64_t maxSize); GWENHYWFAR_API void GWEN_MultiCache_free(GWEN_MULTICACHE *mc); GWENHYWFAR_API uint64_t GWEN_MultiCache_GetMaxSizeUsed(const GWEN_MULTICACHE *mc); GWENHYWFAR_API int GWEN_MultiCache_GetUsageString(const GWEN_MULTICACHE *mc, char *ptrBuffer, int lenBuffer); /*@}*/ /*@}*/ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/funcs.h0000664000175000017500000001037614203160557013706 00000000000000/*************************************************************************** begin : Wed Feb 15 2022 copyright : (C) 2022 by Ralf Habacker email : ralf.habacker@freenet.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_Funcs_H #define GWENHYWFAR_Funcs_H #include #include #ifdef __cplusplus extern "C" { #endif /** * This is one of the very few structs inside Gwenhywfar whose * contents are available for direct access to the the program. * Developer's note: Please note that any change within this struct will * make it necessary to increment the SO_VERSION of the library ! */ typedef struct { const char *name; int (*func1)(void); int (*func2)(int, char**); int (*func3)(GWEN_DB_NODE*, int, char**); const char *description; } GWEN_FUNCS; /* Defines a command without parameters but with description */ #define GWEN_FUNCS_ENTRY_HELP(a,b,c) { a, b, NULL, NULL, c } /* Defines a command with argc/argv parameter and description */ #define GWEN_FUNNCS_ENTRY_ARGS_HELP(a,b,c) { a, 0, b, NULL, c } /* Defines a command with DB_NODE type and argc/argv parameter and description */ #define GWEN_FUNCS_ENTRY_DB_NODE_ARGS_HELP(a,b,c) { a, NULL, NULL, b, c } /* Defines the end of the command table */ #define GWEN_FUNCS_ENTRY_END() { NULL, NULL, NULL, NULL, NULL } /* Defines one of the above commands without description */ #define GWEN_FUNCS_ENTRY(a,b) { a, b, NULL, NULL, NULL } #define GWEN_FUNCS_ENTRY_ARGS(a,b) { a, 0, b, NULL, NULL } #define GWEN_FUNCS_ENTRY_DB_NODE_ARGS(a,b) { a, NULL, NULL, b, NULL } /* Shortcuts */ #define GWEN_FE_DAH GWEN_FUNCS_ENTRY_DB_NODE_ARGS_HELP #define GWEN_FE_DA GWEN_FUNCS_ENTRY_DB_NODE_ARGS #define GWEN_FE_D GWEN_FUNCS_ENTRY_DB_NODE #define GWEN_FE_END GWEN_FUNCS_ENTRY_END /* Checks if a command variant exists */ GWENHYWFAR_API int GWEN_Funcs_Has_Call(const GWEN_FUNCS *func); GWENHYWFAR_API int GWEN_Funcs_Has_Call_Args(const GWEN_FUNCS *func); GWENHYWFAR_API int GWEN_Funcs_Has_Call_DB_NODE_Args(const GWEN_FUNCS *func); /* Functions to call a specified command */ GWENHYWFAR_API int GWEN_Funcs_Call(const GWEN_FUNCS *func); GWENHYWFAR_API int GWEN_Funcs_Call_Args(const GWEN_FUNCS *func, int argc, char **argv); GWENHYWFAR_API int GWEN_Funcs_Call_DB_NODE_Args(const GWEN_FUNCS *func, GWEN_DB_NODE *node, int argc, char **argv); /** * This function prints out a space separated list of all defined functions * without description. */ GWENHYWFAR_API void GWEN_Funcs_Usage(const GWEN_FUNCS* funcs); /** * This function outputs a list of all defined functions including the description */ GWENHYWFAR_API void GWEN_Funcs_Usage_With_Help(const GWEN_FUNCS* funcs); /** * This function returns a pointer to the function described by \p name * or NULL if the function was not found. */ GWENHYWFAR_API const GWEN_FUNCS* GWEN_Funcs_Find(const GWEN_FUNCS* funcs, const char *name); #ifdef __cplusplus } #endif #endif /* GWENHYWFAR_Funcs_H */ gwenhywfar-5.12.1/src/base/plugin.h0000664000175000017500000001735114460564441014073 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2022 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_PLUGIN_H #define GWENHYWFAR_PLUGIN_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_PLUGIN GWEN_PLUGIN; typedef struct GWEN_PLUGIN_MANAGER GWEN_PLUGIN_MANAGER; GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN, GWENHYWFAR_API) GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN_MANAGER, GWENHYWFAR_API) #ifdef __cplusplus } #endif #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif typedef GWEN_PLUGIN *(*GWEN_PLUGIN_FACTORYFN)(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName); GWENHYWFAR_API GWEN_PLUGIN *GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName); GWENHYWFAR_API void GWEN_Plugin_free(GWEN_PLUGIN *p); GWENHYWFAR_API GWEN_PLUGIN_MANAGER *GWEN_Plugin_GetManager(const GWEN_PLUGIN *p); GWENHYWFAR_API const char *GWEN_Plugin_GetName(const GWEN_PLUGIN *p); GWENHYWFAR_API const char *GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p); GWENHYWFAR_API GWEN_LIBLOADER *GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p); GWENHYWFAR_API const GWEN_PLUGIN_DESCRIPTION *GWEN_Plugin_GetPluginDescription(const GWEN_PLUGIN *p); GWENHYWFAR_API void GWEN_Plugin_SetPluginDescription(GWEN_PLUGIN *p, GWEN_PLUGIN_DESCRIPTION *pd); /** * @param destLib The name of the library that this plugin is supposed to * belong to. */ GWENHYWFAR_API GWEN_PLUGIN_MANAGER *GWEN_PluginManager_new(const char *name, const char *destLib); GWENHYWFAR_API void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm); GWENHYWFAR_API const char *GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm); /** Add a directory path to lookup plugins from. * The plugin manager must already be registered with Gwen (using * @ref GWEN_PluginManager_Register) otherwise the path can not be * added */ GWENHYWFAR_API int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *path); GWENHYWFAR_API int GWEN_PluginManager_AddRelPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *relpath, GWEN_PATHMANAGER_RELMODE rm); /** Insert a directory path to lookup plugins from. * The plugin manager must already be registered with Gwen (using * @ref GWEN_PluginManager_Register) otherwise the path can not be * added. */ GWENHYWFAR_API int GWEN_PluginManager_InsertPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *path); /** Insert a directory path to lookup plugins from. * The plugin manager must already be registered with Gwen (using * @ref GWEN_PluginManager_Register) otherwise the path can not be * added. This function uses relative paths. */ GWENHYWFAR_API int GWEN_PluginManager_InsertRelPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *relpath, GWEN_PATHMANAGER_RELMODE rm); GWENHYWFAR_API int GWEN_PluginManager_RemovePath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *path); /** Add a directory path from the windows registry HKEY_LOCAL_MACHINE, * to lookup plugins from. On Non-Windows systems, this function does * nothing and returns zero. * * Note: Gwenhywfar-2.6.0 and older used to lookup the paths under * HKEY_CURRENT_USER, but with gwen-2.6.1 this was changed to * HKEY_LOCAL_MACHINE because we're talking about installation paths * as opposed to per-user configuration settings. * * The plugin manager must already be registered with Gwen (using * @ref GWEN_PluginManager_Register) otherwise the path can not be * added. * * @return Zero on success, and non-zero on error. * * @param pm The PluginManager * * @param keypath The path to the registry key, * e.g. "Software\\MySoftware\\Whatever" * * @param varname The key name (variable name?) inside the given * registry key, e.g. "myvariable". */ GWENHYWFAR_API int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *keypath, const char *varname); /** Returns the list of all search paths of the given * PluginManager. */ GWENHYWFAR_API GWEN_STRINGLIST *GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm); GWENHYWFAR_API GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm, const char *modName); GWENHYWFAR_API GWEN_PLUGIN *GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm, const char *modName, const char *fname); GWENHYWFAR_API GWEN_PLUGIN *GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm, const char *s); /** * Add a plugin to this plugin manager. Normally plugins are loaded upon * @ref GWEN_PluginManager_GetPlugin. This function allows for plugins * that are created by other means (e.g. by static linking) */ GWENHYWFAR_API void GWEN_PluginManager_AddPlugin(GWEN_PLUGIN_MANAGER *pm, GWEN_PLUGIN *p); GWENHYWFAR_API int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm); GWENHYWFAR_API int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm); GWENHYWFAR_API GWEN_PLUGIN_MANAGER *GWEN_PluginManager_FindPluginManager(const char *s); GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2 * GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm); GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION * GWEN_PluginManager_GetPluginDescr(GWEN_PLUGIN_MANAGER *pm, const char *modName); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/stringlist.h0000664000175000017500000002372514465013116014772 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_STRINGLIST_H #define GWENHYWFAR_STRINGLIST_H #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { /** case-insensitive, i.e. using strcasecmp(3). */ GWEN_StringList_SortModeNoCase=0, /** case-sensitive, i.e. using strcmp(3). */ GWEN_StringList_SortModeCase, /** handle string list entries as integers (-> correct sorting of ASCII * coded values like "10", "1") */ GWEN_StringList_SortModeInt } GWEN_STRINGLIST_SORT_MODE; typedef struct GWEN_STRINGLISTENTRYSTRUCT GWEN_STRINGLISTENTRY; typedef struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST; GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_new(void); GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_fromTabString(const char *s, int checkDup); GWENHYWFAR_API int GWEN_StringList_toBuffer(const GWEN_STRINGLIST *sl, const char *delimiter, GWEN_BUFFER *outBuffer); GWENHYWFAR_API void GWEN_StringList_free(GWEN_STRINGLIST *sl); GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_dup(const GWEN_STRINGLIST *sl); GWENHYWFAR_API void GWEN_StringList_Clear(GWEN_STRINGLIST *sl); /** Returns the number of elements in this list. */ GWENHYWFAR_API unsigned int GWEN_StringList_Count(const GWEN_STRINGLIST *sl); GWENHYWFAR_API GWEN_STRINGLISTENTRY *GWEN_StringListEntry_new(const char *s, int take); GWENHYWFAR_API void GWEN_StringListEntry_ReplaceString(GWEN_STRINGLISTENTRY *e, const char *s, int take); GWENHYWFAR_API void GWEN_StringListEntry_free(GWEN_STRINGLISTENTRY *sl); GWENHYWFAR_API void GWEN_StringList_AppendEntry(GWEN_STRINGLIST *sl, GWEN_STRINGLISTENTRY *se); GWENHYWFAR_API void GWEN_StringList_RemoveEntry(GWEN_STRINGLIST *sl, GWEN_STRINGLISTENTRY *se); GWENHYWFAR_API GWEN_STRINGLISTENTRY *GWEN_StringList_FirstEntry(const GWEN_STRINGLIST *sl); GWENHYWFAR_API GWEN_STRINGLISTENTRY *GWEN_StringListEntry_Next(const GWEN_STRINGLISTENTRY *se); GWENHYWFAR_API const char *GWEN_StringListEntry_Data(const GWEN_STRINGLISTENTRY *se); GWENHYWFAR_API void GWEN_StringListEntry_SetData(GWEN_STRINGLISTENTRY *se, const char *s); /** * Normally this group of functions ignores cases when comparing two strings. * You can change this behaviour here. * @param sl string list * @param i if 0 then cases are ignored */ GWENHYWFAR_API void GWEN_StringList_SetSenseCase(GWEN_STRINGLIST *sl, int i); /** * Normally this group of functions ignores reference counters on stringlist * entries when removing a string via @ref GWEN_StringList_RemoveString. * You can change this behaviour here. * @param sl string list * @param i if 0 then reference counters are honoured */ GWENHYWFAR_API void GWEN_StringList_SetIgnoreRefCount(GWEN_STRINGLIST *sl, int i); /** * Appends a string. * @return 0 if not appended, !=0 if appended * @param take if true then the StringList takes over ownership of the string * @param checkDouble if true the the string will only be appended if it * does not already exist */ GWENHYWFAR_API int GWEN_StringList_AppendString(GWEN_STRINGLIST *sl, const char *s, int take, int checkDouble); /** * Inserts a string. * @return 0 if not inserted, !=0 if inserted * @param take if true then the StringList takes over ownership of the string * @param checkDouble if true the the string will only be appended if it * does not already exist */ GWENHYWFAR_API int GWEN_StringList_InsertString(GWEN_STRINGLIST *sl, const char *s, int take, int checkDouble); /** * Removes a given string from the stringlist. * @return 0 if not found, !=0 if found and removed */ GWENHYWFAR_API int GWEN_StringList_RemoveString(GWEN_STRINGLIST *sl, const char *s); /** * Removes the first string from the stringlist (if any). */ GWENHYWFAR_API void GWEN_StringList_RemoveFirstString(GWEN_STRINGLIST *sl); /** * Append duplicates of the entries in the source list to the destination list. * The source list is not modified. */ GWENHYWFAR_API void GWEN_StringList_AppendStringList(GWEN_STRINGLIST *slDest, const GWEN_STRINGLIST *slSource, int checkDouble); /** * Checks whether the given string already exists within in the * string list. * @return !=0 if found, 0 otherwise */ GWENHYWFAR_API int GWEN_StringList_HasString(const GWEN_STRINGLIST *sl, const char *s); /** * Returns the position of the given string within the stringlist. * * @return position, -1 if not found */ GWENHYWFAR_API int GWEN_StringList_GetStringPos(const GWEN_STRINGLIST *sl, const char *s); /** * Returns the first stringlist entry which contains the given string * @return string list entry containing the given string, NULL otherwise */ GWENHYWFAR_API GWEN_STRINGLISTENTRY *GWEN_StringList_FindStringEntry(const GWEN_STRINGLIST *sl, const char *s); /** Traverses the list, calling the callback function 'func' on * each list element. Traversal will stop when 'func' returns a * non-NULL value, and the routine will return with that * value. Otherwise the routine will return NULL. * @param l The list to traverse. * @param func The function to be called with each list element. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. */ GWENHYWFAR_API void *GWEN_StringList_ForEach(const GWEN_STRINGLIST *l, void *(*func)(const char *s, void *u), void *user_data); /** Returns the first string in this list. */ GWENHYWFAR_API const char *GWEN_StringList_FirstString(const GWEN_STRINGLIST *l); GWENHYWFAR_API const char *GWEN_StringList_StringAt(const GWEN_STRINGLIST *l, int idx); GWENHYWFAR_API int GWEN_StringList_StringAsIntAt(const GWEN_STRINGLIST *l, int idx, int defaultValue); /** Sorts this list. Internally this uses qsort(3), so the sorting * should be reasonably fast even for large lists. * * @param l The list to sort. * * @param ascending If non-zero, the list is sorted ascending, * i.e. smallest string first, according to strcmp(3) rules. If zero, * the list is sorted descending. * * @param sortMode See @ref GWEN_StringList_SortModeNoCase and following */ GWENHYWFAR_API void GWEN_StringList_Sort(GWEN_STRINGLIST *l, int ascending, GWEN_STRINGLIST_SORT_MODE sortMode); GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_fromString(const char *str, const char *delimiters, int checkDouble); /** * Create a stringlist from a given complex string. * * In addition to @ref GWEN_StringList_fromString() this version allows to modify the behavior of the function * by adding some flags (see @ref GWEN_TEXT_FLAGS_CHECK_BACKSLASH and following). * Typically used flags are: * - @ref GWEN_TEXT_FLAGS_DEL_QUOTES (delete quotes around single words) * - @ref GWEN_TEXT_FLAGS_CHECK_BACKSLASH (handle backslashes as escape characters) * * @return stringlist object (contains at least one entry) or NULL if no entries/empty string * @param str string to dissect * @param delimiters word delimiters * @param checkDouble if !=0 only add unique strings to the resulting list * @param flags (see @ref GWEN_TEXT_FLAGS_DEL_QUOTES and others) */ GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_fromString2(const char *str, const char *delimiters, int checkDouble, uint32_t flags); /** * Remove first equal entries from both lists. * * If stringlist 1 contains "A", "B", "C", "D" and * stringlist 2 contains "A", "B", "X" then after this function the lists are changed to this: * stringlist 1 contains "C", "D" * stringlist 2 contains "X" */ GWENHYWFAR_API void GWEN_StringList_RemoveCommonFirstEntries(GWEN_STRINGLIST *sl1, GWEN_STRINGLIST *sl2); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/logger_l.h0000644000175000017500000000347013142134463014353 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Dec 05 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_LOGGER_L_H #define GWEN_LOGGER_L_H #include int GWEN_Logger_ModuleInit(void); int GWEN_Logger_ModuleFini(void); #endif /* GWEN_LOGGER_L_H */ gwenhywfar-5.12.1/src/base/Makefile.in0000644000175000017500000010522115032533614014453 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/base ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_typedata_DATA) \ $(iheader_HEADERS) $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbase_la_LIBADD = am_libbase_la_OBJECTS = args.lo buffer.lo debug.lo error.lo funcs.lo \ gwensignal.lo i18n.lo idlist64.lo inherit.lo list.lo list1.lo \ logger.lo memory.lo pathmanager.lo plugin.lo plugindescr.lo \ refptr.lo ringbuffer.lo stringlist.lo stringlist2.lo idmap.lo \ fastbuffer.lo memcache.lo tree.lo tree2.lo simpleptrlist.lo \ multicache.lo param.lo libbase_la_OBJECTS = $(am_libbase_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/args.Plo ./$(DEPDIR)/buffer.Plo \ ./$(DEPDIR)/debug.Plo ./$(DEPDIR)/error.Plo \ ./$(DEPDIR)/fastbuffer.Plo ./$(DEPDIR)/funcs.Plo \ ./$(DEPDIR)/gwensignal.Plo ./$(DEPDIR)/i18n.Plo \ ./$(DEPDIR)/idlist64.Plo ./$(DEPDIR)/idmap.Plo \ ./$(DEPDIR)/inherit.Plo ./$(DEPDIR)/list.Plo \ ./$(DEPDIR)/list1.Plo ./$(DEPDIR)/logger.Plo \ ./$(DEPDIR)/memcache.Plo ./$(DEPDIR)/memory.Plo \ ./$(DEPDIR)/multicache.Plo ./$(DEPDIR)/param.Plo \ ./$(DEPDIR)/pathmanager.Plo ./$(DEPDIR)/plugin.Plo \ ./$(DEPDIR)/plugindescr.Plo ./$(DEPDIR)/refptr.Plo \ ./$(DEPDIR)/ringbuffer.Plo ./$(DEPDIR)/simpleptrlist.Plo \ ./$(DEPDIR)/stringlist.Plo ./$(DEPDIR)/stringlist2.Plo \ ./$(DEPDIR)/tree.Plo ./$(DEPDIR)/tree2.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libbase_la_SOURCES) DIST_SOURCES = $(libbase_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(typedatadir)" "$(DESTDIR)$(iheaderdir)" DATA = $(dist_typedata_DATA) HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ \ -DGWEN_BUFFER_DEFAULT_HARDLIMIT='@gwenhywfar_buffer_hardlimit@' DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) \ -I$(top_srcdir) \ -I$(top_srcdir)/src/ \ -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/gui \ -I$(top_srcdir)/src/parser # Don't include src/os above because its process.h conflicts with the # system's , at least for gcc3.2 on mingw32 # -I$(top_srcdir)/src/os AM_CFLAGS = @PROFILING_CFLAGS@ @visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR noinst_LTLIBRARIES = libbase.la typedatadir = $(datadir)/gwenhywfar/typemaker2/c dist_typedata_DATA = \ gwen_param.tm2 gwen_param_list.tm2 gwen_param_list2.tm2 gwen_param_tree.tm2 typefiles = param.xml EXTRA_DIST = $(typefiles) \ param_fns.c \ simpleptrlist-t.c simpleptrlist-t.h \ idlist64-t.c idlist64-t.h \ buffer-t.c buffer-t.h noinst_HEADERS = \ args_p.h \ buffer_p.h \ debug_p.h \ error_l.h \ error_p.h \ gwensignal_p.h \ i18n_l.h \ idlist64_p.h \ inherit_p.h \ list_p.h \ list1_p.h \ logger_l.h \ logger_p.h \ pathmanager_l.h \ pathmanager_p.h \ plugindescr_p.h \ plugin_l.h \ plugin_p.h \ refptr_p.h \ ringbuffer_p.h \ stringlist_p.h \ stringlist2_p.h \ idmap_p.h \ memcache_p.h \ tree_p.h \ tree2_p.h \ simpleptrlist_p.h \ multicache_p.h \ param_p.h iheaderdir = $(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS = \ args.h \ buffer.h \ debug.h \ error.h \ funcs.h \ gwensignal.h \ i18n.h \ idlist64.h \ inherit.h \ list.h \ list1.h \ list1.tmpl \ list2.h \ list2.tmpl \ logger.h \ memory.h \ misc.h \ misc2.h \ pathmanager.h \ plugin.h \ plugindescr.h \ refptr.h \ ringbuffer.h \ stringlist.h \ stringlist2.h \ idmap.h \ fastbuffer.h \ memcache.h \ tree.h \ tree2.h \ simpleptrlist.h \ multicache.h \ bindata.h \ param.h \ param_fns.h \ endianfns.h libbase_la_SOURCES = \ args.c \ buffer.c \ debug.c \ error.c \ funcs.c \ gwensignal.c \ i18n.c \ idlist64.c \ inherit.c \ list.c \ list1.c \ logger.c \ memory.c \ pathmanager.c \ plugin.c \ plugindescr.c \ refptr.c \ ringbuffer.c \ stringlist.c \ stringlist2.c \ idmap.c \ fastbuffer.c \ memcache.c \ tree.c \ tree2.c \ simpleptrlist.c \ multicache.c \ param.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/base/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/base/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) $(EXTRA_libbase_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbase_la_OBJECTS) $(libbase_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/args.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fastbuffer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gwensignal.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i18n.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idlist64.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inherit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcache.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multicache.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/param.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathmanager.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugindescr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refptr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ringbuffer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simpleptrlist.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringlist.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringlist2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree2.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_typedataDATA: $(dist_typedata_DATA) @$(NORMAL_INSTALL) @list='$(dist_typedata_DATA)'; test -n "$(typedatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(typedatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(typedatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typedatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(typedatadir)" || exit $$?; \ done uninstall-dist_typedataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_typedata_DATA)'; test -n "$(typedatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(typedatadir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(typedatadir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/args.Plo -rm -f ./$(DEPDIR)/buffer.Plo -rm -f ./$(DEPDIR)/debug.Plo -rm -f ./$(DEPDIR)/error.Plo -rm -f ./$(DEPDIR)/fastbuffer.Plo -rm -f ./$(DEPDIR)/funcs.Plo -rm -f ./$(DEPDIR)/gwensignal.Plo -rm -f ./$(DEPDIR)/i18n.Plo -rm -f ./$(DEPDIR)/idlist64.Plo -rm -f ./$(DEPDIR)/idmap.Plo -rm -f ./$(DEPDIR)/inherit.Plo -rm -f ./$(DEPDIR)/list.Plo -rm -f ./$(DEPDIR)/list1.Plo -rm -f ./$(DEPDIR)/logger.Plo -rm -f ./$(DEPDIR)/memcache.Plo -rm -f ./$(DEPDIR)/memory.Plo -rm -f ./$(DEPDIR)/multicache.Plo -rm -f ./$(DEPDIR)/param.Plo -rm -f ./$(DEPDIR)/pathmanager.Plo -rm -f ./$(DEPDIR)/plugin.Plo -rm -f ./$(DEPDIR)/plugindescr.Plo -rm -f ./$(DEPDIR)/refptr.Plo -rm -f ./$(DEPDIR)/ringbuffer.Plo -rm -f ./$(DEPDIR)/simpleptrlist.Plo -rm -f ./$(DEPDIR)/stringlist.Plo -rm -f ./$(DEPDIR)/stringlist2.Plo -rm -f ./$(DEPDIR)/tree.Plo -rm -f ./$(DEPDIR)/tree2.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_typedataDATA install-iheaderHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/args.Plo -rm -f ./$(DEPDIR)/buffer.Plo -rm -f ./$(DEPDIR)/debug.Plo -rm -f ./$(DEPDIR)/error.Plo -rm -f ./$(DEPDIR)/fastbuffer.Plo -rm -f ./$(DEPDIR)/funcs.Plo -rm -f ./$(DEPDIR)/gwensignal.Plo -rm -f ./$(DEPDIR)/i18n.Plo -rm -f ./$(DEPDIR)/idlist64.Plo -rm -f ./$(DEPDIR)/idmap.Plo -rm -f ./$(DEPDIR)/inherit.Plo -rm -f ./$(DEPDIR)/list.Plo -rm -f ./$(DEPDIR)/list1.Plo -rm -f ./$(DEPDIR)/logger.Plo -rm -f ./$(DEPDIR)/memcache.Plo -rm -f ./$(DEPDIR)/memory.Plo -rm -f ./$(DEPDIR)/multicache.Plo -rm -f ./$(DEPDIR)/param.Plo -rm -f ./$(DEPDIR)/pathmanager.Plo -rm -f ./$(DEPDIR)/plugin.Plo -rm -f ./$(DEPDIR)/plugindescr.Plo -rm -f ./$(DEPDIR)/refptr.Plo -rm -f ./$(DEPDIR)/ringbuffer.Plo -rm -f ./$(DEPDIR)/simpleptrlist.Plo -rm -f ./$(DEPDIR)/stringlist.Plo -rm -f ./$(DEPDIR)/stringlist2.Plo -rm -f ./$(DEPDIR)/tree.Plo -rm -f ./$(DEPDIR)/tree2.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_typedataDATA uninstall-iheaderHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_typedataDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-iheaderHEADERS \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-dist_typedataDATA uninstall-iheaderHEADERS .PRECIOUS: Makefile sources: for f in $(libbase_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done types: $(typefiles) typedefs typemaker2 -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) typedefs: $(typefiles) typemaker2 --defs-only -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) splint: for f in $(libbase_la_SOURCES); do \ splint $(AM_CPPFLAGS) $(DEFS) +enumint -unrecogcomments +posixlib -predboolint +boolint -boolops $$f ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/src/base/idlist64_p.h0000664000175000017500000000442714043240674014552 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_IDLIST64_P_H #define GWENHYWFAR_IDLIST64_P_H #include #include #include #define GWEN_IDLIST64_INITIAL_ENTRYCOUNT 64 #define GWEN_IDLIST64_STEPS 64 #define GWEN_IDLIST64_ENTRIES_PER_TABLE 256 #define GWEN_IDTABLE64_RUNTIME_FLAGS_DIRTY 0x01 #define GWEN_IDTABLE64_RUNTIME_FLAGS_ISCOPY 0x02 typedef struct GWEN_IDTABLE64 GWEN_IDTABLE64; struct GWEN_IDTABLE64 { uint64_t maxEntries; uint64_t freeEntries; uint64_t highestEntry; uint64_t *ptrEntries; uint32_t refCount; uint32_t runtimeFlags; }; struct GWEN_IDLIST64_ITERATOR { const GWEN_IDLIST64 *list; uint64_t nextIndex; }; #endif /* GWENHYWFAR_IDLIST64_P_H */ gwenhywfar-5.12.1/src/base/idlist64-t.c0000664000175000017500000006744214043240674014475 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* This file is included by "idlist64.c" */ #include "idlist64-t.h" #ifdef GWENHYWFAR_ENABLE_TESTCODE /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static int GWENHYWFAR_CB test1(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test2(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test3(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test4(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test5(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test6(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test7(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test8(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test9(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test10(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test11(GWEN_TEST_MODULE *mod); static int _compareList1AgainstList2(GWEN_IDLIST64 *idList1, GWEN_IDLIST64 *idList2); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ int GWEN_IdList64_AddTests(GWEN_TEST_MODULE *mod) { GWEN_TEST_MODULE *newMod; newMod=GWEN_Test_Module_AddModule(mod, "GWEN_IdList64", NULL); GWEN_Test_Module_AddTest(newMod, "test1", test1, NULL); GWEN_Test_Module_AddTest(newMod, "test2", test2, NULL); GWEN_Test_Module_AddTest(newMod, "test3", test3, NULL); GWEN_Test_Module_AddTest(newMod, "test4", test4, NULL); GWEN_Test_Module_AddTest(newMod, "test5", test5, NULL); GWEN_Test_Module_AddTest(newMod, "test6", test6, NULL); GWEN_Test_Module_AddTest(newMod, "test7", test7, NULL); GWEN_Test_Module_AddTest(newMod, "test8", test8, NULL); GWEN_Test_Module_AddTest(newMod, "test9", test9, NULL); GWEN_Test_Module_AddTest(newMod, "test10", test10, NULL); GWEN_Test_Module_AddTest(newMod, "test11", test11, NULL); return 0; } int test1(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *idList1; GWEN_IDLIST64_ITERATOR *iterator1; int i; uint64_t id; idList1=GWEN_IdList64_newWithSteps(64); for (i=0; i<100; i++) { int64_t rv; rv=GWEN_IdList64_AddId(idList1, i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", (int) rv); GWEN_IdList64_free(idList1); return (int) rv; } if (rv!=(int64_t) i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected position for id at index %u (is %lu, expected %u)", i, (unsigned long) rv, i); GWEN_IdList64_free(idList1); return (int) rv; } } i=0; iterator1=GWEN_IdList64_Iterator_new(idList1); id=GWEN_IdList64_Iterator_GetFirstId(iterator1); while (id) { if (id!=i+1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected id at index %lu (is %lu, expected %lu)", (unsigned long) i, (unsigned long) id, (unsigned long) i+1); GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return GWEN_ERROR_GENERIC; } i++; id=GWEN_IdList64_Iterator_GetNextId(iterator1); } GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return 0; } int test2(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *idList1; GWEN_IDLIST64_ITERATOR *iterator1; int i; uint64_t id; int rv; idList1=GWEN_IdList64_newWithSteps(64); for (i=0; i<100; i++) { int64_t rv64; rv64=GWEN_IdList64_AddId(idList1, i+1); if (rv64<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", (int) rv64); GWEN_IdList64_free(idList1); return (int) rv64; } } rv=GWEN_IdList64_ReverseSort(idList1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", (int) rv); GWEN_IdList64_free(idList1); return (int) rv; } i=0; iterator1=GWEN_IdList64_Iterator_new(idList1); id=GWEN_IdList64_Iterator_GetFirstId(iterator1); while (id) { if (id!=100-i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected id at index %lu (is %lu, expected %lu)", (unsigned long) i, (unsigned long) id, (unsigned long) i+1); GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return GWEN_ERROR_GENERIC; } i++; id=GWEN_IdList64_Iterator_GetNextId(iterator1); } if (i!=100) { DBG_ERROR(GWEN_LOGDOMAIN, "More entries than expected (is %d, expected %d)", i, 100); GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return GWEN_ERROR_GENERIC; } GWEN_IdList64_Iterator_free(iterator1); rv=GWEN_IdList64_Sort(idList1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", (int) rv); GWEN_IdList64_free(idList1); return (int) rv; } i=0; iterator1=GWEN_IdList64_Iterator_new(idList1); id=GWEN_IdList64_Iterator_GetFirstId(iterator1); while (id) { if (id!=i+1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected id at index %lu (is %lu, expected %lu)", (unsigned long) i, (unsigned long) id, (unsigned long) i+1); GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return GWEN_ERROR_GENERIC; } i++; id=GWEN_IdList64_Iterator_GetNextId(iterator1); } if (i!=100) { DBG_ERROR(GWEN_LOGDOMAIN, "More entries than expected (is %d, expected %d)", i, 100); GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return GWEN_ERROR_GENERIC; } GWEN_IdList64_Iterator_free(iterator1); GWEN_IdList64_free(idList1); return 0; } int test3(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; int i; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddEntry(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list1) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } GWEN_IdList64_free(ptrList1); return 0; } int test4(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list1) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_LazyCopy(ptrList1); GWEN_IdList64_free(ptrList1); GWEN_IdList64_free(ptrList2); return 0; } int test5(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_LazyCopy(ptrList1); for (i=0; i<2048; i++) { int64_t entry; entry=GWEN_IdList64_GetIdAt(ptrList1, i); if (entry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_GetIdAt(%d, list1): %s (%d)", i, GWEN_Error_SimpleToString(entry), (int)entry); return entry; } if (entry != (int64_t)(i+1)) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-matching entry at index %d: is %ld, should be %d ", i, (unsigned long) entry, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<2048; i++) { int64_t entry; entry=GWEN_IdList64_GetIdAt(ptrList2, i); if (entry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_GetIdAt(%d, list2): %s (%d)", i, GWEN_Error_SimpleToString(entry), (int)entry); return entry; } if (entry != (int64_t)(i+1)) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-matching entry at index %d: is %ld, should be %d ", i, (unsigned long) entry, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list1) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list2) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } GWEN_IdList64_free(ptrList2); GWEN_IdList64_free(ptrList1); return 0; } int test6(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_LazyCopy(ptrList1); for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1", i, refCounter); return GWEN_ERROR_INTERNAL; } } GWEN_IdList64_free(ptrList1); for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list2) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } GWEN_IdList64_free(ptrList2); return 0; } int test7(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; int64_t iEntry; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1", i, refCounter); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_LazyCopy(ptrList1); for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table1; GWEN_IDTABLE64 *table2; table1=GWEN_IdList64_GetTableAt(ptrList1, i); table2=GWEN_IdList64_GetTableAt(ptrList2, i); if (table1!=table2) { DBG_ERROR(GWEN_LOGDOMAIN, "Table at position %d should be equal but isn't", i); return GWEN_ERROR_INTERNAL; } } iEntry=GWEN_IdList64_AddId(ptrList2, (uint64_t) 2048); if (iEntry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)iEntry), (int)iEntry); return (int)iEntry; } if (iEntry!=(int64_t)2048) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be 2048", i, (unsigned long) iEntry); return GWEN_ERROR_INTERNAL; } if (GWEN_IdList64_GetIdAt(ptrList1, 2048)>0) { DBG_ERROR(GWEN_LOGDOMAIN, "Entry 2048 exists in list1 when it should not"); return GWEN_ERROR_INTERNAL; } iEntry=GWEN_IdList64_GetIdAt(ptrList2, 2049); if (iEntry>0) { DBG_ERROR(GWEN_LOGDOMAIN, "Entry 2049 exists in list2 when it should not (%ld)", (long int) iEntry); return GWEN_ERROR_INTERNAL; } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 2 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 2 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=8; i<9; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } return 0; } int test8(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_LazyCopy(ptrList1); for (i=2048; i<4096; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList2, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<2048; i++) { int64_t entry; entry=GWEN_IdList64_GetIdAt(ptrList1, i); if (entry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_GetIdAt(%d, list1): %s (%d)", i, GWEN_Error_SimpleToString(entry), (int)entry); return entry; } if (entry != (int64_t)(i+1)) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-matching entry at index %d: is %ld, should be %d ", i, (unsigned long) entry, i); return GWEN_ERROR_INTERNAL; } } if (GWEN_IdList64_GetIdAt(ptrList1, 2048)>0) { DBG_ERROR(GWEN_LOGDOMAIN, "Entry 2048 exists in list1 when it should not"); return GWEN_ERROR_INTERNAL; } for (i=0; i<4096; i++) { int64_t entry; entry=GWEN_IdList64_GetIdAt(ptrList2, i); if (entry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_GetIdAt(%d, list2): %s (%d)", i, GWEN_Error_SimpleToString(entry), (int)entry); return entry; } if (entry != (int64_t)(i+1)) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-matching entry at index %d: is %ld, should be %d ", i, (unsigned long) entry, i); return GWEN_ERROR_INTERNAL; } } if (GWEN_IdList64_GetIdAt(ptrList1, 4096)>=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Entry 4096 exists in list2 when it should not"); return GWEN_ERROR_INTERNAL; } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 2 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 2 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=8; i<16; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } GWEN_IdList64_free(ptrList1); for (i=0; i<(2048/256); i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list2) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } return 0; } int test9(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; int rv; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2047; i++) { int64_t rv64; rv64=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv64<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv64), (int)rv64); return rv64; } if (rv64!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv64, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1", i, refCounter); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_LazyCopy(ptrList1); rv=GWEN_IdList64_AddId(ptrList2, (uint64_t) 2047); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)2047) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be 2047", i, (unsigned long) rv); return GWEN_ERROR_INTERNAL; } if (GWEN_IdList64_GetTableAt(ptrList2, 8)) { DBG_ERROR(GWEN_LOGDOMAIN, "Table 8 exists when it should not"); return GWEN_ERROR_INTERNAL; } if (GWEN_IdList64_GetIdAt(ptrList2, 2049)>0) { DBG_ERROR(GWEN_LOGDOMAIN, "Entry 2049 exists in list2 when it should not"); return GWEN_ERROR_INTERNAL; } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 2 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=2) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 2 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=8; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } return 0; } int test10(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv; rv=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv), (int)rv); return rv; } if (rv!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv, i); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_dup(ptrList1); for (i=0; i<2048; i++) { int64_t entry; entry=GWEN_IdList64_GetIdAt(ptrList1, i); if (entry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_GetIdAt(%d, list1): %s (%d)", i, GWEN_Error_SimpleToString(entry), (int)entry); return entry; } if (entry != (int64_t)(i+1)) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-matching entry at index %d: is %ld, should be %d ", i, (unsigned long) entry, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<2048; i++) { int64_t entry; entry=GWEN_IdList64_GetIdAt(ptrList2, i); if (entry<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_GetIdAt(%d, list2): %s (%d)", i, GWEN_Error_SimpleToString(entry), (int)entry); return entry; } if (entry != (int64_t)(i+1)) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-matching entry at index %d: is %ld, should be %d ", i, (unsigned long) entry, i); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList1, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list1) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } for (i=0; i<8; i++) { GWEN_IDTABLE64 *table; int refCounter; table=GWEN_IdList64_GetTableAt(ptrList2, i); refCounter=table->refCount; if (refCounter!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected reference counter in table (list2) %d: is %d, should be 1 ", i, refCounter); return GWEN_ERROR_INTERNAL; } } GWEN_IdList64_free(ptrList2); GWEN_IdList64_free(ptrList1); return 0; } int test11(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_IDLIST64 *ptrList1; GWEN_IDLIST64 *ptrList2; int i; int rv; ptrList1=GWEN_IdList64_newWithSteps(256); for (i=0; i<2048; i++) { int64_t rv64; rv64=GWEN_IdList64_AddId(ptrList1, (uint64_t) i+1); if (rv64<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on GWEN_IdList64_AddId(%d): %s (%d)", i, GWEN_Error_SimpleToString((int)rv64), (int)rv64); return rv64; } if (rv64!=(int64_t)i) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected index returned for entry %d: is %ld, should be %d ", i, (unsigned long) rv64, i); return GWEN_ERROR_INTERNAL; } } ptrList2=GWEN_IdList64_dup(ptrList1); rv=_compareList1AgainstList2(ptrList1, ptrList2); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", (int) rv); GWEN_IdList64_free(ptrList2); GWEN_IdList64_free(ptrList1); return (int) rv; } GWEN_IdList64_free(ptrList2); GWEN_IdList64_free(ptrList1); return 0; } int _compareList1AgainstList2(GWEN_IDLIST64 *idList1, GWEN_IDLIST64 *idList2) { GWEN_IDLIST64_ITERATOR *iter1; GWEN_IDLIST64_ITERATOR *iter2; uint64_t id1; uint64_t id2; uint64_t index=0; iter1=GWEN_IdList64_Iterator_new(idList1); iter2=GWEN_IdList64_Iterator_new(idList2); id1=GWEN_IdList64_Iterator_GetFirstId(iter1); id2=GWEN_IdList64_Iterator_GetFirstId(iter2); while (id1>0 && id2>0) { if (id1 != id2) { fprintf(stderr, "Tables differ at position %lu (%lu != %lu)\n", (unsigned long) index, (unsigned long) id1, (unsigned long) id2); GWEN_IdList64_Iterator_free(iter2); GWEN_IdList64_Iterator_free(iter1); return GWEN_ERROR_GENERIC; } index++; id1=GWEN_IdList64_Iterator_GetNextId(iter1); id2=GWEN_IdList64_Iterator_GetNextId(iter2); } if (GWEN_IdList64_Iterator_GetNextId(iter1)>0 || GWEN_IdList64_Iterator_GetNextId(iter2)>0) { fprintf(stderr, "NUmber of elements in lists differs\n"); GWEN_IdList64_Iterator_free(iter2); GWEN_IdList64_Iterator_free(iter1); return GWEN_ERROR_GENERIC; } GWEN_IdList64_Iterator_free(iter2); GWEN_IdList64_Iterator_free(iter1); return 0; } #else int GWEN_IdList64_AddTests(GWEN_TEST_MODULE *mod) { DBG_ERROR(GWEN_LOGDOMAIN, "Gwenhywfar was compiled without test code enabled."); return GWEN_ERROR_GENERIC; } #endif gwenhywfar-5.12.1/src/base/param.h0000644000175000017500000002251613644653711013674 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "param.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef GWEN_PARAM_PARAM_H #define GWEN_PARAM_PARAM_H #ifdef __cplusplus extern "C" { #endif /** @page P_GWEN_PARAM Structure GWEN_PARAM

This page describes the properties of GWEN_PARAM.

GWEN_PARAM

@anchor GWEN_PARAM_name

name

Set this property with @ref GWEN_Param_SetName(), get it with @ref GWEN_Param_GetName().

@anchor GWEN_PARAM_flags

flags

Set this property with @ref GWEN_Param_SetFlags(), get it with @ref GWEN_Param_GetFlags().

@anchor GWEN_PARAM_type

type

Set this property with @ref GWEN_Param_SetType(), get it with @ref GWEN_Param_GetType().

@anchor GWEN_PARAM_dataType

dataType

Set this property with @ref GWEN_Param_SetDataType(), get it with @ref GWEN_Param_GetDataType().

@anchor GWEN_PARAM_shortDescription

shortDescription

Set this property with @ref GWEN_Param_SetShortDescription(), get it with @ref GWEN_Param_GetShortDescription().

@anchor GWEN_PARAM_longDescription

longDescription

Set this property with @ref GWEN_Param_SetLongDescription(), get it with @ref GWEN_Param_GetLongDescription().

@anchor GWEN_PARAM_currentValue

currentValue

Set this property with @ref GWEN_Param_SetCurrentValue(), get it with @ref GWEN_Param_GetCurrentValue().

@anchor GWEN_PARAM_defaultValue

defaultValue

Set this property with @ref GWEN_Param_SetDefaultValue(), get it with @ref GWEN_Param_GetDefaultValue().

@anchor GWEN_PARAM_choices

choices

Set this property with @ref GWEN_Param_SetChoices(), get it with @ref GWEN_Param_GetChoices().

@anchor GWEN_PARAM_internalIntValue

internalIntValue

Set this property with @ref GWEN_Param_SetInternalIntValue(), get it with @ref GWEN_Param_GetInternalIntValue().

@anchor GWEN_PARAM_internalFloatValue

internalFloatValue

Set this property with @ref GWEN_Param_SetInternalFloatValue(), get it with @ref GWEN_Param_GetInternalFloatValue().

@anchor GWEN_PARAM_runtimeFlags

runtimeFlags

Set this property with @ref GWEN_Param_SetRuntimeFlags(), get it with @ref GWEN_Param_GetRuntimeFlags().

*/ /* define GWEN_PARAM_RTFLAGS */ /* define GWEN_PARAM_FLAGS */ /* needed system headers */ #include #include #include #include #include #include /* pre-headers */ #include #include typedef struct GWEN_PARAM GWEN_PARAM; GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_PARAM, GWEN_Param, GWENHYWFAR_API) GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_PARAM, GWEN_Param, GWENHYWFAR_API) GWEN_TREE_FUNCTION_LIB_DEFS(GWEN_PARAM, GWEN_Param, GWENHYWFAR_API) typedef enum { GWEN_Param_DataType_Unknown = -1, GWEN_Param_DataType_Int, GWEN_Param_DataType_Bool, GWEN_Param_DataType_Float, GWEN_Param_DataType_String } GWEN_PARAM_DATATYPE; typedef enum { GWEN_Param_Type_Unknown = -1, GWEN_Param_Type_Simple, GWEN_Param_Type_Choice } GWEN_PARAM_TYPE; /* post-headers */ #include GWENHYWFAR_API GWEN_PARAM_DATATYPE GWEN_Param_DataType_fromString(const char *p_s); GWENHYWFAR_API GWEN_PARAM_TYPE GWEN_Param_Type_fromString(const char *p_s); GWENHYWFAR_API const char *GWEN_Param_DataType_toString(GWEN_PARAM_DATATYPE p_i); GWENHYWFAR_API const char *GWEN_Param_Type_toString(GWEN_PARAM_TYPE p_i); /** Constructor. */ GWENHYWFAR_API GWEN_PARAM *GWEN_Param_new(void); /** Destructor. */ GWENHYWFAR_API void GWEN_Param_free(GWEN_PARAM *p_struct); GWENHYWFAR_API void GWEN_Param_Attach(GWEN_PARAM *p_struct); GWENHYWFAR_API GWEN_PARAM *GWEN_Param_dup(const GWEN_PARAM *p_struct); GWENHYWFAR_API GWEN_PARAM *GWEN_Param_copy(GWEN_PARAM *p_struct, const GWEN_PARAM *p_src); /** Getter. * Use this function to get the member "name" (see @ref GWEN_PARAM_name) */ GWENHYWFAR_API const char *GWEN_Param_GetName(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "flags" (see @ref GWEN_PARAM_flags) */ GWENHYWFAR_API uint32_t GWEN_Param_GetFlags(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "type" (see @ref GWEN_PARAM_type) */ GWENHYWFAR_API GWEN_PARAM_TYPE GWEN_Param_GetType(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "dataType" (see @ref GWEN_PARAM_dataType) */ GWENHYWFAR_API GWEN_PARAM_DATATYPE GWEN_Param_GetDataType(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "shortDescription" (see @ref GWEN_PARAM_shortDescription) */ GWENHYWFAR_API const char *GWEN_Param_GetShortDescription(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "longDescription" (see @ref GWEN_PARAM_longDescription) */ GWENHYWFAR_API const char *GWEN_Param_GetLongDescription(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "currentValue" (see @ref GWEN_PARAM_currentValue) */ GWENHYWFAR_API const char *GWEN_Param_GetCurrentValue(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "defaultValue" (see @ref GWEN_PARAM_defaultValue) */ GWENHYWFAR_API const char *GWEN_Param_GetDefaultValue(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "choices" (see @ref GWEN_PARAM_choices) */ GWENHYWFAR_API GWEN_STRINGLIST2 *GWEN_Param_GetChoices(const GWEN_PARAM *p_struct); /** Getter. * Use this function to get the member "runtimeFlags" (see @ref GWEN_PARAM_runtimeFlags) */ GWENHYWFAR_API uint32_t GWEN_Param_GetRuntimeFlags(const GWEN_PARAM *p_struct); /** Setter. * Use this function to set the member "name" (see @ref GWEN_PARAM_name) */ GWENHYWFAR_API void GWEN_Param_SetName(GWEN_PARAM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "flags" (see @ref GWEN_PARAM_flags) */ GWENHYWFAR_API void GWEN_Param_SetFlags(GWEN_PARAM *p_struct, uint32_t p_src); /** Add flags. * Use this function to add flags to the member "flags" */ GWENHYWFAR_API void GWEN_Param_AddFlags(GWEN_PARAM *p_struct, uint32_t p_src); /** Sub flags. * Use this function to sub flags from the member "flags" */ GWENHYWFAR_API void GWEN_Param_SubFlags(GWEN_PARAM *p_struct, uint32_t p_src); /** Setter. * Use this function to set the member "type" (see @ref GWEN_PARAM_type) */ GWENHYWFAR_API void GWEN_Param_SetType(GWEN_PARAM *p_struct, GWEN_PARAM_TYPE p_src); /** Setter. * Use this function to set the member "dataType" (see @ref GWEN_PARAM_dataType) */ GWENHYWFAR_API void GWEN_Param_SetDataType(GWEN_PARAM *p_struct, GWEN_PARAM_DATATYPE p_src); /** Setter. * Use this function to set the member "shortDescription" (see @ref GWEN_PARAM_shortDescription) */ GWENHYWFAR_API void GWEN_Param_SetShortDescription(GWEN_PARAM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "longDescription" (see @ref GWEN_PARAM_longDescription) */ GWENHYWFAR_API void GWEN_Param_SetLongDescription(GWEN_PARAM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "currentValue" (see @ref GWEN_PARAM_currentValue) */ GWENHYWFAR_API void GWEN_Param_SetCurrentValue(GWEN_PARAM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "defaultValue" (see @ref GWEN_PARAM_defaultValue) */ GWENHYWFAR_API void GWEN_Param_SetDefaultValue(GWEN_PARAM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "choices" (see @ref GWEN_PARAM_choices) */ GWENHYWFAR_API void GWEN_Param_SetChoices(GWEN_PARAM *p_struct, GWEN_STRINGLIST2 *p_src); /** Setter. * Use this function to set the member "runtimeFlags" (see @ref GWEN_PARAM_runtimeFlags) */ GWENHYWFAR_API void GWEN_Param_SetRuntimeFlags(GWEN_PARAM *p_struct, uint32_t p_src); /** Add flags. * Use this function to add flags to the member "runtimeFlags" */ GWENHYWFAR_API void GWEN_Param_AddRuntimeFlags(GWEN_PARAM *p_struct, uint32_t p_src); /** Sub flags. * Use this function to sub flags from the member "runtimeFlags" */ GWENHYWFAR_API void GWEN_Param_SubRuntimeFlags(GWEN_PARAM *p_struct, uint32_t p_src); /* list1 functions */ GWENHYWFAR_API GWEN_PARAM_LIST *GWEN_Param_List_dup(const GWEN_PARAM_LIST *p_src); GWENHYWFAR_API void GWEN_Param_ReadDb(GWEN_PARAM *p_struct, GWEN_DB_NODE *p_db); GWENHYWFAR_API int GWEN_Param_WriteDb(const GWEN_PARAM *p_struct, GWEN_DB_NODE *p_db); GWENHYWFAR_API GWEN_PARAM *GWEN_Param_fromDb(GWEN_DB_NODE *p_db); GWENHYWFAR_API int GWEN_Param_toDb(const GWEN_PARAM *p_struct, GWEN_DB_NODE *p_db); GWENHYWFAR_API void GWEN_Param_ReadXml(GWEN_PARAM *p_struct, GWEN_XMLNODE *p_db); GWENHYWFAR_API void GWEN_Param_WriteXml(const GWEN_PARAM *p_struct, GWEN_XMLNODE *p_db); GWENHYWFAR_API void GWEN_Param_toXml(const GWEN_PARAM *p_struct, GWEN_XMLNODE *p_db); GWENHYWFAR_API GWEN_PARAM *GWEN_Param_fromXml(GWEN_XMLNODE *p_db); GWENHYWFAR_API GWEN_PARAM *GWEN_Param_List_GetByName(const GWEN_PARAM_LIST *p_list, const char *p_cmp); GWENHYWFAR_API GWEN_PARAM *GWEN_Param_Tree_GetByName(const GWEN_PARAM_TREE *p_tree, const char *p_cmp); /* end-headers */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/inherit.c0000644000175000017500000001241313142134475014216 00000000000000/*************************************************************************** begin : Sun Dec 05 2003 copyright : (C) 2003-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "inherit_p.h" #include #include #include #include GWEN_LIST_FUNCTIONS(GWEN_INHERITDATA, GWEN_InheritData) GWEN_INHERITDATA *GWEN_InheritData_new(const char *t, uint32_t id, void *data, void *baseData, GWEN_INHERIT_FREEDATAFN freeDataFn) { GWEN_INHERITDATA *d; assert(t); GWEN_NEW_OBJECT(GWEN_INHERITDATA, d); GWEN_LIST_INIT(GWEN_INHERITDATA, d); d->typeName=strdup(t); d->id=id; d->data=data; d->baseData=baseData; d->freeDataFn=freeDataFn; DBG_VERBOUS(GWEN_LOGDOMAIN, "Created inheritance for type \"%s\" (%08x)", t, id); return d; } void GWEN_InheritData_free(GWEN_INHERITDATA *d) { if (d) { if (d->freeDataFn) d->freeDataFn(d->baseData, d->data); free(d->typeName); GWEN_LIST_FINI(GWEN_INHERITDATA, d); GWEN_FREE_OBJECT(d); } } void GWEN_InheritData_freeData(GWEN_INHERITDATA *d) { if (d) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Freeing data for type \"%s\"", d->typeName); if (d->freeDataFn) d->freeDataFn(d->baseData, d->data); d->freeDataFn=NULL; d->data=NULL; } } void GWEN_InheritData_clear(GWEN_INHERITDATA *d) { assert(d); d->freeDataFn=0; d->data=0; } const char *GWEN_InheritData_GetTypeName(const GWEN_INHERITDATA *d) { assert(d); return d->typeName; } uint32_t GWEN_InheritData_GetId(const GWEN_INHERITDATA *d) { assert(d); return d->id; } void *GWEN_InheritData_GetData(const GWEN_INHERITDATA *d) { assert(d); return d->data; } GWEN_INHERIT_FREEDATAFN GWEN_InheritData_GetFreeDataFn(const GWEN_INHERITDATA *d) { assert(d); return d->freeDataFn; } uint32_t GWEN_Inherit_MakeId(const char *typeName) { unsigned int i, j; uint32_t result; result=0; j=strlen(typeName); for (i=0; i>24)&0xff); result=tmpResult|c; result^=(unsigned char)(typeName[i]); } DBG_VERBOUS(GWEN_LOGDOMAIN, "Id for type \"%s\" is \"%08x\"", typeName, result); return result; } void *GWEN_Inherit_FindData(GWEN_INHERITDATA_LIST *l, uint32_t id, int wantCreate) { GWEN_INHERITDATA *ih; assert(l); DBG_VERBOUS(GWEN_LOGDOMAIN, "Searching for inheritance id \"%08x\"", id); ih=GWEN_InheritData_List_First(l); while (ih) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Checking type \"%s\" (%08x) against %08x", ih->typeName, ih->id, id); if (ih->id==id) return ih->data; ih=GWEN_InheritData_List_Next(ih); } /* while */ if (!wantCreate) { DBG_WARN(GWEN_LOGDOMAIN, "Type \"%08x\" not derived from this base type", id); } return 0; } GWEN_INHERITDATA *GWEN_Inherit_FindEntry(GWEN_INHERITDATA_LIST *l, uint32_t id, int wantCreate) { GWEN_INHERITDATA *ih; assert(l); DBG_VERBOUS(GWEN_LOGDOMAIN, "Searching for inheritance id \"%08x\"", id); ih=GWEN_InheritData_List_First(l); while (ih) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Checking type \"%s\" (%08x) against %08x", ih->typeName, ih->id, id); if (ih->id==id) return ih; ih=GWEN_InheritData_List_Next(ih); } /* while */ if (!wantCreate) { DBG_WARN(GWEN_LOGDOMAIN, "Type \"%08x\" not derived from this base type", id); } return 0; } gwenhywfar-5.12.1/src/base/debug.c0000644000175000017500000003513713552051462013651 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Dec 04 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "debug_p.h" #include #include #include #ifdef HAVE_STRINGS_H # include #endif #include static GWEN_MEMORY_DEBUG_OBJECT *gwen_debug__memobjects=0; uint32_t GWEN_Debug_PrintDec(char *buffer, uint32_t size, uint32_t num, int leadingZero, uint32_t length) { uint32_t i; uint32_t j; uint32_t k; char numbuf[16]; int numOr; /* first convert number */ numOr=0; i=0; j=1000000000; while (j) { k=num/j; numOr|=k; if (numOr || leadingZero || j==1) { numbuf[i]=k+'0'; i++; } num-=(k*j); j/=10; } /* while j */ j=0; if (length) { if (i>length) i=length; /* fill left up to length-(sizeof number) */ k=length-i; while (k) { if (j>((j-1)*4))&0xf; numOr|=k; if (numOr || leadingZero || j==1) { if (k>9) { if (up) numbuf[i]=k+'0'+7; else numbuf[i]=k+'0'+7+32; } else numbuf[i]=k+'0'; i++; } j--; } /* while j */ j=0; if (length) { if (i>length) i=length; /* fill left up to length-(sizeof number) */ k=length-i; while (k) { if (j='0' && (*fmt)<='9') { /* read number */ if (*fmt=='0') { leadingZero=1; } while ((*fmt)>='0' && (*fmt)<='9') { length*=10; length+=*fmt-'0'; fmt++; } /* while */ } /* read type */ switch (*fmt) { /* decimal integer */ case 'c': case 'd': { int p; p=va_arg(arguments, int); if (p<0) { if (i=GWEN_LoggerLevelNotice) { va_list args; char dbg_buffer[256]; va_start(args, format); vsnprintf(dbg_buffer, sizeof(dbg_buffer)-1, format, args); dbg_buffer[sizeof(dbg_buffer)-1] = 0; GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevelNotice, dbg_buffer); va_end(args); } } void DBG_INFO(const char *dbg_logger, const char *format, ...) { if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevelInfo) { va_list args; char dbg_buffer[256]; va_start(args, format); vsnprintf(dbg_buffer, sizeof(dbg_buffer)-1, format, args); dbg_buffer[sizeof(dbg_buffer)-1] = 0; GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevelInfo, dbg_buffer); va_end(args); } } void DBG_DEBUG(const char *dbg_logger, const char *format, ...) { # ifndef DISABLE_DEBUGLOG if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevelDebug) { va_list args; char dbg_buffer[256]; va_start(args, format); vsnprintf(dbg_buffer, sizeof(dbg_buffer)-1, format, args); dbg_buffer[sizeof(dbg_buffer)-1] = 0; GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevelDebug, dbg_buffer); va_end(args); } # endif /* DISABLE_DEBUGLOG */ } void DBG_VERBOUS(const char *dbg_logger, const char *format, ...) { # ifndef DISABLE_DEBUGLOG if (GWEN_Logger_GetLevel(dbg_logger)>=GWEN_LoggerLevelVerbous) { va_list args; char dbg_buffer[256]; va_start(args, format); vsnprintf(dbg_buffer, sizeof(dbg_buffer)-1, format, args); dbg_buffer[sizeof(dbg_buffer)-1] = 0; GWEN_Logger_Log(dbg_logger, GWEN_LoggerLevelVerbous, dbg_buffer); va_end(args); } # endif /* DISABLE_DEBUGLOG */ } #endif /* NO_VARIADIC_MACROS */ GWEN_MEMORY_DEBUG_ENTRY *GWEN_MemoryDebugEntry_new(GWEN_MEMORY_DEBUG_ENTRY_TYPE t, const char *wFile, int wLine) { GWEN_MEMORY_DEBUG_ENTRY *e; assert(wFile); assert(wLine); GWEN_NEW_OBJECT(GWEN_MEMORY_DEBUG_ENTRY, e); e->file=strdup(wFile); e->line=wLine; e->type=t; return e; } void GWEN_MemoryDebugEntry_free(GWEN_MEMORY_DEBUG_ENTRY *e) { if (e) { free(e->file); GWEN_FREE_OBJECT(e); } } GWEN_MEMORY_DEBUG_OBJECT *GWEN_MemoryDebugObject_new(const char *name) { GWEN_MEMORY_DEBUG_OBJECT *o; assert(name); GWEN_NEW_OBJECT(GWEN_MEMORY_DEBUG_OBJECT, o); o->name=strdup(name); return o; } void GWEN_MemoryDebugObject_free(GWEN_MEMORY_DEBUG_OBJECT *o) { if (o) { GWEN_MEMORY_DEBUG_ENTRY *e; e=o->entries; while (e) { GWEN_MEMORY_DEBUG_ENTRY *next; next=e->next; GWEN_MemoryDebugEntry_free(e); e=next; } free(o->name); GWEN_FREE_OBJECT(o); } } GWEN_MEMORY_DEBUG_OBJECT *GWEN_MemoryDebug__FindObject(const char *name) { GWEN_MEMORY_DEBUG_OBJECT *o; o=gwen_debug__memobjects; while (o) { assert(o->name); if (strcasecmp(o->name, name)==0) break; if (o->next==o) { DBG_ERROR(GWEN_LOGDOMAIN, "What ?? Pointing to myself ??"); abort(); } o=o->next; } return o; } void GWEN_MemoryDebug_Increment(const char *name, const char *wFile, int wLine, int attach) { GWEN_MEMORY_DEBUG_OBJECT *o; GWEN_MEMORY_DEBUG_ENTRY *e; assert(name); assert(wFile); assert(wLine); o=GWEN_MemoryDebug__FindObject(name); if (!o) { o=GWEN_MemoryDebugObject_new(name); GWEN_LIST_ADD(GWEN_MEMORY_DEBUG_OBJECT, o, &gwen_debug__memobjects); e=GWEN_MemoryDebugEntry_new(attach?GWEN_MemoryDebugEntryTypeAttach: GWEN_MemoryDebugEntryTypeCreate, wFile, wLine); GWEN_LIST_ADD(GWEN_MEMORY_DEBUG_ENTRY, e, &(o->entries)); o->count++; } else { e=GWEN_MemoryDebugEntry_new(attach?GWEN_MemoryDebugEntryTypeAttach: GWEN_MemoryDebugEntryTypeCreate, wFile, wLine); GWEN_LIST_ADD(GWEN_MEMORY_DEBUG_ENTRY, e, &(o->entries)); o->count++; } } void GWEN_MemoryDebug_Decrement(const char *name, const char *wFile, int wLine) { GWEN_MEMORY_DEBUG_OBJECT *o; GWEN_MEMORY_DEBUG_ENTRY *e; assert(name); assert(wFile); assert(wLine); o=GWEN_MemoryDebug__FindObject(name); if (!o) { DBG_ERROR(GWEN_LOGDOMAIN, "Object to be freed not found (%s at %s:%d)", name, wFile, wLine); o=GWEN_MemoryDebugObject_new(name); GWEN_LIST_ADD(GWEN_MEMORY_DEBUG_OBJECT, o, &gwen_debug__memobjects); e=GWEN_MemoryDebugEntry_new(GWEN_MemoryDebugEntryTypeFree, wFile, wLine); GWEN_LIST_ADD(GWEN_MEMORY_DEBUG_ENTRY, e, &(o->entries)); o->count--; } else { e=GWEN_MemoryDebugEntry_new(GWEN_MemoryDebugEntryTypeFree, wFile, wLine); GWEN_LIST_ADD(GWEN_MEMORY_DEBUG_ENTRY, e, &(o->entries)); o->count--; } } void GWEN_MemoryDebug__DumpObject(GWEN_MEMORY_DEBUG_OBJECT *o, uint32_t mode) { DBG_ERROR(0, "Object \"%s\" (count=%ld)", o->name, o->count); if (o->count!=0 || mode==GWEN_MEMORY_DEBUG_MODE_DETAILED) { GWEN_MEMORY_DEBUG_ENTRY *e; if (mode!=GWEN_MEMORY_DEBUG_MODE_SHORT) { e=o->entries; while (e) { const char *s; fprintf(stderr, " "); switch (e->type) { case GWEN_MemoryDebugEntryTypeCreate: s="created"; break; case GWEN_MemoryDebugEntryTypeAttach: s="attached"; break; case GWEN_MemoryDebugEntryTypeFree: s="freed"; break; case GWEN_MemoryDebugEntryTypeUnknown: default: s=""; break; } DBG_ERROR(0, " %s at %s:%d", s, e->file, e->line); e=e->next; } /* while e */ } } } void GWEN_MemoryDebug_DumpObject(const char *name, uint32_t mode) { GWEN_MEMORY_DEBUG_OBJECT *o; assert(name); o=GWEN_MemoryDebug__FindObject(name); if (!o) { DBG_ERROR(GWEN_LOGDOMAIN, "Object \"%s\" not found", name); } else GWEN_MemoryDebug__DumpObject(o, mode); } long int GWEN_MemoryDebug_GetObjectCount(const char *name) { GWEN_MEMORY_DEBUG_OBJECT *o; assert(name); o=GWEN_MemoryDebug__FindObject(name); if (!o) { DBG_ERROR(GWEN_LOGDOMAIN, "Object \"%s\" not found", name); return 0; } else return o->count; } void GWEN_MemoryDebug_Dump(uint32_t mode) { GWEN_MEMORY_DEBUG_OBJECT *o; DBG_ERROR(0, "Gwenhywfar Memory Debugger Statistics:"); DBG_ERROR(0, "====================================== begin\n"); o=gwen_debug__memobjects; while (o) { GWEN_MemoryDebug__DumpObject(o, mode); o=o->next; } DBG_ERROR(0, "====================================== end\n"); } void GWEN_MemoryDebug_CleanUp(void) { GWEN_MEMORY_DEBUG_OBJECT *o; o=gwen_debug__memobjects; while (o) { GWEN_MEMORY_DEBUG_OBJECT *next; next=o->next; GWEN_MemoryDebugObject_free(o); o=next; } gwen_debug__memobjects=0; } gwenhywfar-5.12.1/src/base/list2.tmpl0000644000175000017500000002107713142134463014346 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Jun 28 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef @TYPENAME@_LIST2_H #define @TYPENAME@_LIST2_H #ifdef __cplusplus extern "C" { #endif /** * Defines a list of pointers to @TYPENAME@. The pointers stored in * a list are not taken over by the list, so you must take care of freeing * the elements of the list yourself. * (see @ref @FN_PREFIX@_List2_new) */ typedef struct @TYPENAME@_LIST2 @TYPENAME@_LIST2; /** * An iterator is used to traverse a list. */ typedef struct @TYPENAME@_LIST2_ITERATOR @TYPENAME@_LIST2_ITERATOR; /** * See @ref @FN_PREFIX@_List2_ForEach. */ typedef @TYPENAME@* (@TYPENAME@_LIST2_FOREACH)(@TYPENAME@ *element, void *user_data); /** * Creates a new list. This mus be freed using @ref @FN_PREFIX@_List2_free. */ @TYPENAME@_LIST2 *@FN_PREFIX@_List2_new(); /** * Destroys the list. Please note that the members in this list are not destroyed! */ void @FN_PREFIX@_List2_free(@TYPENAME@_LIST2 *l); /** * Dumps the contents of the list to an open file (e.g. stderr). */ void @FN_PREFIX@_List2_Dump(@TYPENAME@_LIST2 *l, FILE *f, unsigned int indent); /** * Appends an element to a list making it the new last element. */ void @FN_PREFIX@_List2_PushBack(@TYPENAME@_LIST2 *l, @TYPENAME@ *p); /** * Inserts an element at the start of the list, making it the new * first element. */ void @FN_PREFIX@_List2_PushFront(@TYPENAME@_LIST2 *l, @TYPENAME@ *p); /** * Returns the first element of the list. (The element is not * removed from the list.) */ @TYPENAME@ *@FN_PREFIX@_List2_GetFront(@TYPENAME@_LIST2 *l); /** * Returns the last element of the list. (The element is not * removed from the list.) */ @TYPENAME@ *@FN_PREFIX@_List2_GetBack(@TYPENAME@_LIST2 *l); /** * Removes the element currently pointed to by the given iterator * from the list. */ void @FN_PREFIX@_List2_Erase(@TYPENAME@_LIST2 *l, @TYPENAME@_LIST2_ITERATOR *it); /** Returns the size of this list, i.e. the number of elements in this * list. * * This number is counted in the list metadata, so this is a cheap * operation. */ unsigned int @FN_PREFIX@_List2_GetSize(@TYPENAME@_LIST2 *l); /** * Removes the list's last element from the list. (The element is not * freed.) */ void @FN_PREFIX@_List2_PopBack(@TYPENAME@_LIST2 *l); /** * Removes the list's first element from the list. (The element is not * freed.) */ void @FN_PREFIX@_List2_PopFront(@TYPENAME@_LIST2 *l); /** * Removes all list elements from the list. (The elements are not freed.) */ void @FN_PREFIX@_List2_Clear(@TYPENAME@_LIST2 *l); /** * Returns a list iterator pointing to the first element. */ @TYPENAME@_LIST2_ITERATOR *@FN_PREFIX@_List2_First(@TYPENAME@_LIST2 *l); /** * Returns a list iterator pointing to the last element. */ @TYPENAME@_LIST2_ITERATOR *@FN_PREFIX@_List2_Last(@TYPENAME@_LIST2 *l); /** * Creates a list iterator for the given list. (FIXME: Should be private). */ @TYPENAME@_LIST2_ITERATOR *@FN_PREFIX@_List2Iterator_new(@TYPENAME@_LIST2 *l); /** * Destroys the list iterator. */ void @FN_PREFIX@_List2Iterator_free(@TYPENAME@_LIST2_ITERATOR *li); /** * Moves the list iterator to the predecessor of the currenty selected * element and returns that predecessor element. */ @TYPENAME@ *@FN_PREFIX@_List2Iterator_Previous(@TYPENAME@_LIST2_ITERATOR *li); /** * Moves the list iterator to the successor of the currenty selected * element and returns that successor element. */ @TYPENAME@ *@FN_PREFIX@_List2Iterator_Next(@TYPENAME@_LIST2_ITERATOR *li); /** * Returns the pointer to the element stored at the list position the * iterator currently points to. */ @TYPENAME@ *@FN_PREFIX@_List2Iterator_Data(@TYPENAME@_LIST2_ITERATOR *li); /** Traverses the list, calling the callback function 'func' on * each list element. Traversal will stop when 'func' returns a * non-NULL value, and the routine will return with that * value. Otherwise the routine will return NULL. * @param list The list to traverse. * @param func The function to be called with each list element. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. */ @TYPENAME@ *@FN_PREFIX@_List2_ForEach(@TYPENAME@_LIST2 *list, @TYPENAME@_LIST2_FOREACH func, void *user_data); typedef struct @TYPENAME@_CONSTLIST2 @TYPENAME@_CONSTLIST2; typedef struct @TYPENAME@_CONSTLIST2_ITERATOR @TYPENAME@_CONSTLIST2_ITERATOR; typedef const @TYPENAME@* (@TYPENAME@_CONSTLIST2_FOREACH)(const @TYPENAME@ *element, void *user_data); @TYPENAME@_CONSTLIST2 *@FN_PREFIX@_ConstList2_new(); void @FN_PREFIX@_ConstList2_free(@TYPENAME@_CONSTLIST2 *l); void @FN_PREFIX@_ConstList2_PushBack(@TYPENAME@_CONSTLIST2 *l, const @TYPENAME@ *p); void @FN_PREFIX@_ConstList2_PushFront(@TYPENAME@_CONSTLIST2 *l, const @TYPENAME@ *p); const @TYPENAME@ *@FN_PREFIX@_ConstList2_GetFront(@TYPENAME@_CONSTLIST2 *l); const @TYPENAME@ *@FN_PREFIX@_ConstList2_GetBack(@TYPENAME@_CONSTLIST2 *l); unsigned int @FN_PREFIX@_ConstList2_GetSize(@TYPENAME@_CONSTLIST2 *l); void @FN_PREFIX@_ConstList2_PopBack(@TYPENAME@_CONSTLIST2 *l); void @FN_PREFIX@_ConstList2_PopFront(@TYPENAME@_CONSTLIST2 *l); void @FN_PREFIX@_ConstList2_Clear(@TYPENAME@_CONSTLIST2 *l); @TYPENAME@_CONSTLIST2_ITERATOR *@FN_PREFIX@_ConstList2_First(@TYPENAME@_CONSTLIST2 *l); @TYPENAME@_CONSTLIST2_ITERATOR *@FN_PREFIX@_ConstList2_Last(@TYPENAME@_CONSTLIST2 *l); @TYPENAME@_CONSTLIST2_ITERATOR *@FN_PREFIX@_ConstList2Iterator_new(@TYPENAME@_CONSTLIST2 *l); void @FN_PREFIX@_ConstList2Iterator_free(@TYPENAME@_CONSTLIST2_ITERATOR *li); const @TYPENAME@ *@FN_PREFIX@_ConstList2Iterator_Previous(@TYPENAME@_CONSTLIST2_ITERATOR *li); const @TYPENAME@ *@FN_PREFIX@_ConstList2Iterator_Next(@TYPENAME@_CONSTLIST2_ITERATOR *li); const @TYPENAME@ *@FN_PREFIX@_ConstList2Iterator_Data(@TYPENAME@_CONSTLIST2_ITERATOR *li); /** Traverses the list, calling the callback function 'func' on * each list element. Traversal will stop when 'func' returns a * non-NULL value, and the routine will return with that * value. Otherwise the routine will return NULL. * @param list The list to traverse. * @param func The function to be called with each list element. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. */ const @TYPENAME@ *@FN_PREFIX@_ConstList2_ForEach(@TYPENAME@_CONSTLIST2 *list, @TYPENAME@_CONSTLIST2_FOREACH func, void *user_data); #ifdef __cplusplus } #endif #endif /* @TYPENAME@_LIST_H */ gwenhywfar-5.12.1/src/base/fastbuffer.h0000666000175000017500000003350613473346361014730 00000000000000/*************************************************************************** begin : Tue Apr 27 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_FASTBUFFER_H #define GWEN_FASTBUFFER_H #include #include #define GWEN_FAST_BUFFER_FLAGS_DOSMODE 0x00000001 /** * Do not use the fields of this struct directly!! Only use it via the functions and macros * in this module, because otherwise future versions of you application might not work. * Do not allocate such an object yourself, always use @ref GWEN_FastBuffer_new() otherwise * future versions of you application might not work! * This struct is not part of the API. */ typedef struct { GWEN_SYNCIO *io; uint32_t bufferSize; uint32_t bufferReadPos; uint32_t bufferWritePos; uint32_t flags; uint32_t bytesWritten; uint32_t bytesRead; uint8_t buffer[1]; } GWEN_FAST_BUFFER; #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API GWEN_FAST_BUFFER *GWEN_FastBuffer_new(uint32_t bsize, GWEN_SYNCIO *io); GWENHYWFAR_API void GWEN_FastBuffer_free(GWEN_FAST_BUFFER *fb); GWENHYWFAR_API uint32_t GWEN_FastBuffer_GetFlags(const GWEN_FAST_BUFFER *fb); GWENHYWFAR_API void GWEN_FastBuffer_SetFlags(GWEN_FAST_BUFFER *fb, uint32_t fl); GWENHYWFAR_API void GWEN_FastBuffer_AddFlags(GWEN_FAST_BUFFER *fb, uint32_t fl); GWENHYWFAR_API void GWEN_FastBuffer_SubFlags(GWEN_FAST_BUFFER *fb, uint32_t fl); GWENHYWFAR_API uint32_t GWEN_FastBuffer_GetBytesWritten(const GWEN_FAST_BUFFER *fb); GWENHYWFAR_API uint32_t GWEN_FastBuffer_GetBytesRead(const GWEN_FAST_BUFFER *fb); GWENHYWFAR_API int GWEN_FastBuffer_ReadLine(GWEN_FAST_BUFFER *fb, uint8_t *p, int len); GWENHYWFAR_API int GWEN_FastBuffer_ReadLineToBuffer(GWEN_FAST_BUFFER *fb, GWEN_BUFFER *buf); #ifdef __cplusplus } #endif /** * This macro peeks at the read buffer and returns the next available byte (if any). * Consecutive peeks will always return the same byte. Also, the next @ref GWEN_FASTBUFFER_READBYTE * will return the same byte as well. */ #define GWEN_FASTBUFFER_PEEKBYTE(fb, var) {\ if (fb->bufferReadPos>=fb->bufferWritePos) { \ int fb_peekbyte_rv; \ \ fb_peekbyte_rv=GWEN_SyncIo_Read(fb->io, fb->buffer, fb->bufferSize); \ if (fb_peekbyte_rv<0) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", fb_peekbyte_rv); \ var=fb_peekbyte_rv; \ } \ else if (fb_peekbyte_rv==0) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "EOF met"); \ var=GWEN_ERROR_EOF; \ } \ else { \ fb->bufferWritePos=fb_peekbyte_rv; \ fb->bufferReadPos=0; \ var=((int)((fb->buffer[fb->bufferReadPos])) & 0xff); \ } \ } \ else { \ var=((int)((fb->buffer[fb->bufferReadPos])) & 0xff); \ } \ } /** * Returns the next byte from the buffer (if any). That byte will be placed into "var". In case of an error * var will contain an error code instead. */ #define GWEN_FASTBUFFER_READBYTE(fb, var) {\ if (fb->bufferReadPos>=fb->bufferWritePos) { \ int fb_readbyte_rv; \ \ fb_readbyte_rv=GWEN_SyncIo_Read(fb->io, fb->buffer, fb->bufferSize); \ if (fb_readbyte_rv<0) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", fb_readbyte_rv); \ var=fb_readbyte_rv; \ } \ else if (fb_readbyte_rv==0) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "EOF met"); \ var=GWEN_ERROR_EOF; \ } \ else { \ fb->bufferWritePos=fb_readbyte_rv; \ fb->bufferReadPos=0; \ var=((int)((fb->buffer[fb->bufferReadPos++])) & 0xff); \ fb->bytesRead++; \ } \ } \ else { \ var=((int)((fb->buffer[fb->bufferReadPos++])) & 0xff); \ fb->bytesRead++; \ } \ } /** * Writes a byte into the buffer (flushing it if necessary) and returns the result of this operation * in "var". */ #define GWEN_FASTBUFFER_WRITEBYTE(fb, var, chr) {\ if (fb->bufferWritePos>=fb->bufferSize) { \ int fb_writeByte_rv; \ \ fb_writeByte_rv=GWEN_SyncIo_WriteForced(fb->io, fb->buffer, fb->bufferWritePos); \ if (fb_writeByte_rv<(int)(fb->bufferWritePos)) { \ DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", fb_writeByte_rv); \ var=fb_writeByte_rv; \ } \ else { \ var=0; \ fb->bufferWritePos=0; \ fb->buffer[fb->bufferWritePos++]=chr; \ fb->bytesWritten++; \ } \ } \ else { \ var=0; \ fb->buffer[fb->bufferWritePos++]=chr; \ fb->bytesWritten++; \ } \ } /** * Flushes the write buffer (i.e. write all remaining bytes from the buffer to the io layer with * the flag @ref GWEN_IO_REQUEST_FLAGS_FLUSH set). */ #define GWEN_FASTBUFFER_FLUSH(fb, var) {\ int fb_flush_rv; \ \ fb_flush_rv=GWEN_SyncIo_WriteForced(fb->io, fb->buffer, fb->bufferWritePos); \ if (fb_flush_rv<(int)(fb->bufferWritePos)) { \ DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", fb_flush_rv); \ var=fb_flush_rv; \ } \ else { \ var=0; \ fb->bufferWritePos=0; \ } \ } /** * Reads a number of bytes from the buffer and stores it at the given memory location. * @param fb fast buffer * @param var variable to receive the result (<0: error code, number of bytes read otherwise) * @param p pointer to the location to read the bytes to * @param len number of bytes to read */ #define GWEN_FASTBUFFER_READBYTES(fb, var, p, len) { \ int fb_readbyte_bytes;\ \ var=0; \ if (fb->bufferReadPos>=fb->bufferWritePos) { \ int fb_readbyte_rv; \ \ fb_readbyte_rv=GWEN_SyncIo_Read(fb->io, fb->buffer, fb->bufferSize); \ if (fb_readbyte_rv<0) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", fb_readbyte_rv); \ var=fb_readbyte_rv; \ } \ else {\ fb->bufferWritePos=fb_readbyte_rv; \ fb->bufferReadPos=0; \ }\ }\ if (var==0) {\ fb_readbyte_bytes=fb->bufferWritePos-fb->bufferReadPos;\ if (fb_readbyte_bytes>len)\ fb_readbyte_bytes=len;\ if (fb_readbyte_bytes) {\ memmove(p, fb->buffer+fb->bufferReadPos, fb_readbyte_bytes);\ fb->bufferReadPos+=fb_readbyte_bytes;\ fb->bytesRead+=fb_readbyte_bytes; \ }\ var=fb_readbyte_bytes;\ }\ } #define GWEN_FASTBUFFER_READLINE(fb, var, p, len) {\ int fb_readline_bytes;\ \ var=0;\ if (fb->bufferReadPos>=fb->bufferWritePos) {\ int fb_readline_rv;\ \ fb_readline_rv=GWEN_SyncIo_Read(fb->io, fb->buffer, fb->bufferSize);\ if (fb_readline_rv<0) {\ DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", fb_readline_rv);\ var=fb_readline_rv;\ }\ else {\ fb->bufferWritePos=fb_rv; \ fb->bufferReadPos=0; \ }\ }\ if (var==0) {\ fb_readline_bytes=fb->bufferWritePos-fb->bufferReadPos;\ if (fb_readline_bytes>len)\ fb_readline_bytes=len;\ if (fb_readline_bytes) {\ uint8_t *fb_readline_p;\ \ fb_readline_p=(uint8_t*)p;\ \ while(fb_readline_bytes) {\ uint8_t c;\ \ c=fb->buffer[fb->bufferReadPos++];\ fb->bytesRead++; \ fb_readline_bytes--;\ if (c==10) {\ *(fb_readline_p++)=c;\ var++;\ break;\ }\ else if (c!=13) {\ *(fb_readline_p++)=c;\ var++;\ }\ }\ }\ }\ } #define GWEN_FASTBUFFER_READLINEFORCED(fb, var, p, len) {\ int fb_readlineforced_len;\ uint8_t *fb_readlineforced_p;\ \ fb_readlineforced_len=len;\ fb_readlineforced_p=(uint8_t*)p;\ var=0;\ while(fb_readlineforced_len && var==0) {\ int fb_readlineforced_rv;\ \ GWEN_FASTBUFFER_READLINE(fb, fb_readlineforced_rv, fb_readlineforced_p, fb_readlineforced_len);\ if (fb_readlineforced_rv<0) {\ var=fb_readlineforced_rv;\ break;\ }\ else if (fb_readlineforced_rv==0) {\ var=GWEN_ERROR_EOF;\ break;\ }\ else {\ if (fb_readlineforced_p[fb_readlineforced_rv-1]==10) {\ fb_readlineforced_p[fb_readlineforced_rv-1]=0;\ var=fb_readlineforced_rv;\ break;\ }\ fb_readlineforced_len-=fb_readlineforced_rv;\ fb_readlineforced_p+=fb_readlineforced_rv;\ }\ }\ if (var==0) {\ DBG_INFO(GWEN_LOGDOMAIN, "No line within %d bytes", len);\ var=GWEN_ERROR_BAD_SIZE;\ }\ } #define GWEN_FASTBUFFER_READFORCED(fb, var, p, len) {\ int fb_readforced_len;\ uint8_t *fb_readforced_p;\ \ fb_readforced_len=len;\ fb_readforced_p=(uint8_t*)p;\ var=0;\ while(fb_readforced_len && var==0) {\ int fb_readforced_rv;\ \ GWEN_FASTBUFFER_READBYTES(fb, fb_readforced_rv, fb_readforced_p, fb_readforced_len);\ if (fb_readforced_rv<0) {\ var=fb_readforced_rv;\ break;\ }\ else if (fb_readforced_rv==0) {\ var=GWEN_ERROR_EOF;\ break;\ }\ else {\ fb_readforced_len-=fb_readforced_rv;\ fb_readforced_p+=fb_readforced_rv;\ }\ }\ } /** * Write a number of bytes to the buffer and stores it at the given memory location. * @param fb fast buffer * @param var variable to receive the result (<0: error code, number of bytes read otherwise) * @param p pointer to the location to write the bytes from * @param len number of bytes to write */ #define GWEN_FASTBUFFER_WRITEBYTES(fb, var, p, len) {\ int fb_writebytes_bytes;\ int fb_writebytes_len;\ \ fb_writebytes_len=len;\ if (fb_writebytes_len==-1)\ fb_writebytes_len=strlen((const char*)p);\ var=0; \ if (fb->bufferWritePos>=fb->bufferSize) { \ int fb_writebytes_rv; \ \ fb_writebytes_rv=GWEN_SyncIo_WriteForced(fb->io, fb->buffer, fb->bufferWritePos); \ if (fb_writebytes_rv<(int)(fb->bufferWritePos)) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", fb_writebytes_rv); \ var=fb_writebytes_rv; \ } \ else {\ fb->bufferWritePos=0; \ }\ }\ if (var==0) {\ fb_writebytes_bytes=fb->bufferSize-fb->bufferWritePos;\ if (fb_writebytes_bytes>fb_writebytes_len)\ fb_writebytes_bytes=fb_writebytes_len;\ if (fb_writebytes_bytes) {\ memmove(fb->buffer+fb->bufferWritePos, p, fb_writebytes_bytes);\ fb->bufferWritePos+=fb_writebytes_bytes;\ fb->bytesWritten+=fb_writebytes_bytes; \ }\ var=fb_writebytes_bytes;\ }\ } /** * Write a number of bytes to the buffer and make sure that @b all bytes are written. * @param fb fast buffer * @param var variable to receive the result (<0: error code, 0 on success) * @param p pointer to the location to write the bytes from * @param len number of bytes to write */ #define GWEN_FASTBUFFER_WRITEFORCED(fb, var, p, len) {\ int fb_writeforced_len;\ const uint8_t *fb_writeforced_p;\ \ fb_writeforced_len=len;\ if (fb_writeforced_len==-1) \ fb_writeforced_len=strlen((const char*)p);\ fb_writeforced_p=(const uint8_t*)p;\ var=0;\ while(fb_writeforced_len && var==0) {\ int fb_writeforced_rv;\ \ GWEN_FASTBUFFER_WRITEBYTES(fb, fb_writeforced_rv, fb_writeforced_p, fb_writeforced_len);\ if (fb_writeforced_rv<0) {\ var=fb_writeforced_rv;\ break;\ }\ else if (fb_writeforced_rv==0) {\ var=GWEN_ERROR_EOF;\ break;\ }\ else {\ fb_writeforced_len-=fb_writeforced_rv;\ fb_writeforced_p+=fb_writeforced_rv;\ }\ }\ } #define GWEN_FASTBUFFER_WRITELINE(fb, var, p) {\ int fb_writeline_rv;\ int fb_writeline_len=strlen((const char*)p);\ \ GWEN_FASTBUFFER_WRITEFORCED(fb, fb_writeline_rv, p, fb_writeline_len);\ if (fb_writeline_rv<0)\ var=fb_writeline_rv;\ else {\ if (fb->flags & GWEN_FAST_BUFFER_FLAGS_DOSMODE) {\ GWEN_FASTBUFFER_WRITEFORCED(fb, fb_writeline_rv, "\r\n", 2);\ }\ else {\ GWEN_FASTBUFFER_WRITEFORCED(fb, fb_writeline_rv, "\n", 1);\ }\ if (fb_writeline_rv<0)\ var=fb_writeline_rv;\ else\ var=0;\ }\ } /** * Copy a number of bytes from one buffer to another one. * @param fb1 source fast buffer * @param fb2 destination fast buffer * @param var variable to receive the result (<0: error code, number of bytes read otherwise) * @param len number of bytes to copy */ #define GWEN_FASTBUFFER_COPYBYTES(fb1, fb2, var, len) { \ int fb_copybytes_bytes;\ \ var=0; \ if (fb1->bufferReadPos>=fb1->bufferWritePos) { \ int fb_copybytes_rv; \ \ fb_copybytes_rv=GWEN_SyncIo_Read(fb1->io, fb1->buffer, fb1->bufferSize); \ if (fb_copybytes_rv<0) { \ DBG_DEBUG(GWEN_LOGDOMAIN, "here (%d)", fb_copybytes_rv); \ var=fb_copybytes_rv; \ } \ else {\ fb1->bufferWritePos=fb_copybytes_rv; \ fb1->bufferReadPos=0; \ }\ }\ if (var==0) {\ fb_bytes=fb1->bufferWritePos-fb1->bufferReadPos;\ if (fb_copybytes_bytes>len)\ fb_copybytes_bytes=len;\ if (fb_copybytes_bytes) {\ int fb_copybytes_rv;\ \ GWEN_FASTBUFFER_WRITEBYTES(fb2, fb_copybytes_rv, (fb1->buffer+fb1->bufferReadPos), fb_bytes);\ var=fb_copybytes_rv;\ if (fb_copybytes_rv>0) {\ fb1->bufferReadPos+=fb_copybytes_rv;\ fb1->bytesRead+=fb_copybytes_rv; \ }\ }\ }\ } /** * Copy a number of bytes to the buffer and make sure that @b all bytes are copied. * @param fb1 source fast buffer * @param fb2 destination fast buffer * @param var variable to receive the result (<0: error code, 0 on success) * @param p pointer to the location to write the bytes from * @param len number of bytes to copy */ #define GWEN_FASTBUFFER_COPYFORCED(fb1, fb2, var, p, len) {\ int fb_copyforced_len;\ uint8_t *fb_copyforced_p;\ \ fb_copyforced_len=len;\ fb_copyforced_p=(uint8_t*)p;\ var=0;\ while(fb_copyforced_len && var==0) {\ int fb_copyforced_rv;\ \ GWEN_FASTBUFFER_COPYBYTES(fb1, fb2, fb_copyforced_rv, fb_copyforced_p, fb_copyforced_len);\ if (fb_copyforced_rv<0) {\ var=fb_copyforced_rv;\ break;\ }\ else if (fb_copyforced_rv==0)\ var=GWEN_ERROR_EOF;\ else {\ fb_len-=fb_copyforced_rv;\ fb_p+=fb_copyforced_rv;\ }\ }\ } #endif gwenhywfar-5.12.1/src/base/pathmanager.c0000664000175000017500000004632214116666046015061 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "pathmanager_p.h" #include #include #include #include #include #include #include #include #include #ifdef OS_WIN32 # include #endif static GWEN_DB_NODE *gwen__paths=0; int GWEN_PathManager_ModuleInit(void) { gwen__paths=GWEN_DB_Group_new("paths"); return 0; } int GWEN_PathManager_ModuleFini(void) { GWEN_DB_Group_free(gwen__paths); gwen__paths=0; return 0; } int GWEN_PathManager_DefinePath(const char *destLib, const char *pathName) { GWEN_DB_NODE *dbT; assert(destLib); assert(pathName); assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_DB_FLAGS_DEFAULT, destLib); assert(dbT); if (GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName)) { DBG_ERROR(GWEN_LOGDOMAIN, "Path \"%s/%s\" already exists", destLib, pathName); return GWEN_ERROR_INVALID; } dbT=GWEN_DB_GetGroup(dbT, GWEN_DB_FLAGS_DEFAULT, pathName); return 0; } int GWEN_PathManager_UndefinePath(const char *destLib, const char *pathName) { GWEN_DB_NODE *dbT; assert(destLib); assert(pathName); assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_DB_FLAGS_DEFAULT, pathName); if (!dbT) return GWEN_ERROR_NOT_FOUND; GWEN_DB_UnlinkGroup(dbT); GWEN_DB_Group_free(dbT); return 0; } int GWEN_PathManager_AddPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue) { GWEN_DB_NODE *dbT; GWEN_BUFFER *buf; assert(destLib); assert(pathName); assert(pathValue); assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_CREATE_GROUP, "pair"); assert(dbT); if (callingLib) { GWEN_DB_SetCharValue(dbT, GWEN_DB_FLAGS_DEFAULT, "lib", callingLib); } buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Directory_OsifyPath(pathValue, buf, 1); GWEN_DB_SetCharValue(dbT, GWEN_DB_FLAGS_DEFAULT, "path", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return 0; } int GWEN_PathManager_AddRelPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue, GWEN_PATHMANAGER_RELMODE rm) { char cwd[256]; switch (rm) { case GWEN_PathManager_RelModeCwd: { const char *pcwd; pcwd=getcwd(cwd, sizeof(cwd)-1); if (pcwd) { GWEN_BUFFER *buf; int rv; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, cwd); if (*pathValue!=GWEN_DIR_SEPARATOR) GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buf, pathValue); rv=GWEN_PathManager_AddPath(callingLib, destLib, pathName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return rv; } else { DBG_ERROR(GWEN_LOGDOMAIN, "getcwd(): %s", strerror(errno)); return GWEN_ERROR_IO; } break; } case GWEN_PathManager_RelModeExe: { int rv; rv=GWEN_Directory_GetPrefixDirectory(cwd, sizeof(cwd)-1); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, cwd); if (*pathValue!=GWEN_DIR_SEPARATOR) GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buf, pathValue); DBG_INFO(GWEN_LOGDOMAIN, "Adding path [%s]", GWEN_Buffer_GetStart(buf)); rv=GWEN_PathManager_AddPath(callingLib, destLib, pathName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return rv; } } case GWEN_PathManager_RelModeHome: { GWEN_BUFFER *buf; int rv; rv=GWEN_Directory_GetHomeDirectory(cwd, sizeof(cwd)-1); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not determine HOME directory (%d)", rv); return rv; } buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, cwd); if (*pathValue!=GWEN_DIR_SEPARATOR) GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buf, pathValue); rv=GWEN_PathManager_AddPath(callingLib, destLib, pathName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return rv; } default: DBG_INFO(GWEN_LOGDOMAIN, "Unknown relative mode %d", rm); return GWEN_ERROR_INVALID; } } int GWEN_PathManager_InsertPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue) { GWEN_DB_NODE *dbT; assert(destLib); assert(pathName); assert(pathValue); assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_CREATE_GROUP | GWEN_DB_FLAGS_INSERT, "pair"); assert(dbT); if (callingLib) { GWEN_DB_SetCharValue(dbT, GWEN_DB_FLAGS_DEFAULT, "lib", callingLib); } GWEN_DB_SetCharValue(dbT, GWEN_DB_FLAGS_DEFAULT, "path", pathValue); return 0; } int GWEN_PathManager_InsertRelPath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue, GWEN_PATHMANAGER_RELMODE rm) { char cwd[256]; switch (rm) { case GWEN_PathManager_RelModeCwd: { const char *pcwd; pcwd=getcwd(cwd, sizeof(cwd)-1); if (pcwd) { GWEN_BUFFER *buf; int rv; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, cwd); if (*pathValue!=GWEN_DIR_SEPARATOR) GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buf, pathValue); rv=GWEN_PathManager_InsertPath(callingLib, destLib, pathName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return rv; } else { DBG_ERROR(GWEN_LOGDOMAIN, "getcwd(): %s", strerror(errno)); return GWEN_ERROR_IO; } break; } case GWEN_PathManager_RelModeExe: { int rv; rv=GWEN_Directory_GetPrefixDirectory(cwd, sizeof(cwd)-1); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, cwd); if (*pathValue!=GWEN_DIR_SEPARATOR) GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buf, pathValue); DBG_INFO(GWEN_LOGDOMAIN, "Adding path [%s]", GWEN_Buffer_GetStart(buf)); rv=GWEN_PathManager_InsertPath(callingLib, destLib, pathName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return rv; } } case GWEN_PathManager_RelModeHome: { GWEN_BUFFER *buf; int rv; rv=GWEN_Directory_GetHomeDirectory(cwd, sizeof(cwd)-1); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not determine HOME directory (%d)", rv); return rv; } buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, cwd); if (*pathValue!=GWEN_DIR_SEPARATOR) GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buf, pathValue); rv=GWEN_PathManager_InsertPath(callingLib, destLib, pathName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return rv; } default: DBG_INFO(GWEN_LOGDOMAIN, "Unknown relative mode %d", rm); return GWEN_ERROR_INVALID; } } int GWEN_PathManager_RemovePath(const char *callingLib, const char *destLib, const char *pathName, const char *pathValue) { GWEN_DB_NODE *dbT; const char *s; const char *p; assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_FindFirstGroup(dbT, "pair"); while (dbT) { p=GWEN_DB_GetCharValue(dbT, "path", 0, 0); assert(p); s=GWEN_DB_GetCharValue(dbT, "lib", 0, 0); if ( ( (!callingLib && !s) || (callingLib && s && strcasecmp(s, callingLib)==0) ) && strcasecmp(p, pathValue)==0 ) break; dbT=GWEN_DB_FindNextGroup(dbT, "pair"); } if (dbT) { GWEN_DB_UnlinkGroup(dbT); GWEN_DB_Group_free(dbT); return 0; } else return 1; } int GWEN_PathManager_RemovePaths(const char *callingLib) { GWEN_DB_NODE *dbT; const char *s; assert(gwen__paths); GWEN_DB_DeleteGroup(gwen__paths, callingLib); dbT=GWEN_DB_GetFirstGroup(gwen__paths); while (dbT) { GWEN_DB_NODE *dbN; dbN=GWEN_DB_GetFirstGroup(dbT); while (dbN) { GWEN_DB_NODE *dbNN; dbNN=GWEN_DB_FindFirstGroup(dbN, "pair"); while (dbNN) { GWEN_DB_NODE *dbNext; dbNext=GWEN_DB_FindNextGroup(dbNN, "pair"); s=GWEN_DB_GetCharValue(dbNN, "lib", 0, 0); assert(s); if (s && strcasecmp(s, callingLib)==0) { GWEN_DB_UnlinkGroup(dbNN); GWEN_DB_Group_free(dbNN); } dbNN=dbNext; } /* while pairs */ dbN=GWEN_DB_GetNextGroup(dbN); } /* while paths */ dbT=GWEN_DB_GetNextGroup(dbT); } /* while destLibs */ return 0; } int GWEN_PathManager_PathChanged(const char *destLib, const char *pathName) { GWEN_DB_NODE *dbT; assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (!dbT) return GWEN_ERROR_NOT_FOUND; dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (!dbT) return GWEN_ERROR_NOT_FOUND; if ((GWEN_DB_GetNodeFlags(dbT) & GWEN_DB_NODE_FLAGS_DIRTY)) return 1; return 0; } GWEN_STRINGLIST *GWEN_PathManager_GetPaths(const char *destLib, const char *pathName) { GWEN_DB_NODE *dbT; assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (dbT) { dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (dbT) { GWEN_STRINGLIST *sl; int i; const char *s; GWEN_DB_NODE *dbN; sl=GWEN_StringList_new(); /* then add all paths from other libs */ dbN=GWEN_DB_FindFirstGroup(dbT, "pair"); while (dbN) { for (i=0; ; i++) { s=GWEN_DB_GetCharValue(dbN, "path", i, 0); if (!s) break; GWEN_StringList_AppendString(sl, s, 0, 1); } dbN=GWEN_DB_FindNextGroup(dbN, "pair"); } if (GWEN_StringList_Count(sl)==0) { GWEN_StringList_free(sl); DBG_DEBUG(GWEN_LOGDOMAIN, "no entries"); return 0; } return sl; } } return 0; } int GWEN_PathManager_FindFile(const char *destLib, const char *pathName, const char *fileName, GWEN_BUFFER *fbuf) { GWEN_DB_NODE *dbT; assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (dbT) { dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (dbT) { int i; const char *s; GWEN_DB_NODE *dbN; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* check all paths */ dbN=GWEN_DB_FindFirstGroup(dbT, "pair"); while (dbN) { for (i=0; ; i++) { s=GWEN_DB_GetCharValue(dbN, "path", i, 0); if (!s) break; else { FILE *f; GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(tbuf, fileName); DBG_INFO(GWEN_LOGDOMAIN, "Trying \"%s\"", GWEN_Buffer_GetStart(tbuf)); f=fopen(GWEN_Buffer_GetStart(tbuf), "r"); if (f) { fclose(f); DBG_DEBUG(GWEN_LOGDOMAIN, "File \"%s\" found in folder \"%s\"", fileName, s); GWEN_Buffer_AppendBuffer(fbuf, tbuf); GWEN_Buffer_free(tbuf); return 0; } GWEN_Buffer_Reset(tbuf); } } dbN=GWEN_DB_FindNextGroup(dbN, "pair"); } GWEN_Buffer_free(tbuf); } } DBG_INFO(GWEN_LOGDOMAIN, "File \"%s\" not found", fileName); return GWEN_ERROR_NOT_FOUND; } int GWEN_PathManager_GetMatchingFilesRecursively(const char *destLib, const char *pathName, const char *subFolderName, GWEN_STRINGLIST *sl, const char *mask) { GWEN_DB_NODE *dbT; assert(gwen__paths); dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST, destLib); if (dbT) { dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST, pathName); if (dbT) { int i; const char *s; GWEN_DB_NODE *dbN; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* check all paths */ dbN=GWEN_DB_FindFirstGroup(dbT, "pair"); while (dbN) { for (i=0; ; i++) { s=GWEN_DB_GetCharValue(dbN, "path", i, 0); if (!s) break; else { GWEN_Buffer_AppendString(tbuf, s); if (subFolderName && *subFolderName) { GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(tbuf, subFolderName); } DBG_DEBUG(GWEN_LOGDOMAIN, "Trying \"%s\"", GWEN_Buffer_GetStart(tbuf)); GWEN_Directory_GetMatchingFilesRecursively(GWEN_Buffer_GetStart(tbuf), sl, mask); GWEN_Buffer_Reset(tbuf); } } dbN=GWEN_DB_FindNextGroup(dbN, "pair"); } GWEN_Buffer_free(tbuf); } } return 0; } #ifdef OS_WIN32 int GWEN_PathManager_AddPathFromWinReg(const char *callingLib, const char *destLib, const char *pathName, const char *keypath, const char *varname) { HKEY hkey; TCHAR nbuffer[MAX_PATH]; BYTE vbuffer[MAX_PATH]; DWORD nsize; DWORD vsize; DWORD typ; int i; snprintf(nbuffer, sizeof(nbuffer), keypath); /* open the key */ if (RegOpenKey(HKEY_LOCAL_MACHINE, nbuffer, &hkey)) { DBG_INFO(GWEN_LOGDOMAIN, "RegOpenKey %s failed.", keypath); return 1; } /* find the variablename */ for (i=0;; i++) { nsize=sizeof(nbuffer); vsize=sizeof(vbuffer); if (ERROR_SUCCESS!=RegEnumValue(hkey, i, /* index */ nbuffer, &nsize, 0, /* reserved */ &typ, vbuffer, &vsize)) break; if (strcasecmp(nbuffer, varname)==0 && typ==REG_SZ) { /* variable found */ RegCloseKey(hkey); return GWEN_PathManager_AddPath(callingLib, destLib, pathName, (char *)vbuffer); } } /* for */ RegCloseKey(hkey); DBG_INFO(GWEN_LOGDOMAIN, "In RegKey \"%s\" the variable \"%s\" does not exist", keypath, varname); return 1; } #else /* OS_WIN32 */ int GWEN_PathManager_AddPathFromWinReg(GWEN_UNUSED const char *callingLib, GWEN_UNUSED const char *destLib, GWEN_UNUSED const char *pathName, GWEN_UNUSED const char *keypath, GWEN_UNUSED const char *varname) { return 0; } #endif /* OS_WIN32 */ gwenhywfar-5.12.1/src/base/args.c0000644000175000017500000003361314467165713013527 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Apr 24 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "args_p.h" #include "gui_l.h" #include #include #include #include #define DISABLE_DEBUGLOG int GWEN_Args_Check(int argc, char **argv, int startAt, uint32_t mode, const GWEN_ARGS *args, GWEN_DB_NODE *db) { int i; const char *p; const GWEN_ARGS *tmpArgs; GWEN_DB_NODE *counts; GWEN_BUFFER *tbuf; int stop; i=startAt; tbuf=GWEN_Buffer_new(0, 256, 0, 1); counts=GWEN_DB_Group_new("counts"); stop=0; while (ishortOption) { if (strcmp(tmpArgs->shortOption, p)==0) { /* found option */ GWEN_DB_SetIntValue(counts, GWEN_DB_FLAGS_OVERWRITE_VARS, tmpArgs->name, GWEN_DB_GetIntValue(counts, tmpArgs->name, 0, 0)+1); break; } } /* if shortOption */ if (tmpArgs->flags & GWEN_ARGS_FLAGS_LAST) { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown short option \"%s\"", p); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } } /* for */ i++; if (tmpArgs->flags & GWEN_ARGS_FLAGS_HAS_ARGUMENT) { /* argument needed */ if (i>=argc) { DBG_ERROR(GWEN_LOGDOMAIN, "Argument needed for option \"%s\"", tmpArgs->name); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } GWEN_Buffer_Reset(tbuf); if (GWEN_Gui_ReadString(argv[i], tbuf)) { DBG_ERROR(GWEN_LOGDOMAIN, "Error parsing \"%s\"", argv[i]); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } p=GWEN_Buffer_GetStart(tbuf); switch (tmpArgs->type) { case GWEN_ArgsType_Char: GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_DEFAULT, tmpArgs->name, p); break; case GWEN_ArgsType_Int: if (sscanf(p, "%i", &value)!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-integer argument for short option \"%s\"", tmpArgs->shortOption); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_DEFAULT, tmpArgs->name, value); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unknown option type \"%d\"", tmpArgs->type); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } /* switch */ i++; } else { if (tmpArgs->flags & GWEN_ARGS_FLAGS_HELP) { GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_HELP; } GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, tmpArgs->name, GWEN_DB_GetIntValue(counts, tmpArgs->name, 0, 0)); } break; case GWEN_ArgsElementTypeLong: /* copy option name up to (but excluding) the "=" if any, * determine the start of possible argument */ v=p; while (*v && *v!='=') v++; tmpBuf=(char *)malloc(v-p+1); assert(tmpBuf); memmove(tmpBuf, p, v-p); tmpBuf[v-p]=0; for (tmpArgs=args;; tmpArgs++) { if (tmpArgs->longOption) { if (strcmp(tmpArgs->longOption, tmpBuf)==0) { /* found option */ GWEN_DB_SetIntValue(counts, GWEN_DB_FLAGS_OVERWRITE_VARS, tmpArgs->name, GWEN_DB_GetIntValue(counts, tmpArgs->name, 0, 0)+1); break; } } /* if longOption */ if (tmpArgs->flags & GWEN_ARGS_FLAGS_LAST) { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown long option \"%s\"", tmpBuf); free(tmpBuf); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } } /* for */ i++; if (*v=='=') { if (!(tmpArgs->flags & GWEN_ARGS_FLAGS_HAS_ARGUMENT)) { DBG_ERROR(GWEN_LOGDOMAIN, "No argument allowed for option \"%s\"", tmpArgs->name); free(tmpBuf); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } v++; } if (tmpArgs->flags & GWEN_ARGS_FLAGS_HAS_ARGUMENT) { /* argument needed */ if (*v==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Argument needed for option \"%s\"", tmpArgs->name); free(tmpBuf); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } switch (tmpArgs->type) { case GWEN_ArgsType_Char: GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_DEFAULT, tmpArgs->name, v); break; case GWEN_ArgsType_Int: if (sscanf(v, "%i", &value)!=1) { DBG_ERROR(GWEN_LOGDOMAIN, "Non-integer argument for long option \"%s\"", tmpBuf); free(tmpBuf); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_DEFAULT, tmpArgs->name, value); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unknown option type \"%d\"", tmpArgs->type); free(tmpBuf); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } /* switch */ } else { if (tmpArgs->flags & GWEN_ARGS_FLAGS_HELP) { free(tmpBuf); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_HELP; } GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, tmpArgs->name, GWEN_DB_GetIntValue(counts, tmpArgs->name, 0, 0)); } free(tmpBuf); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Internal error (unknown argv type \"%d\")", t); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; break; } /* switch */ GWEN_Buffer_Reset(tbuf); } /* while */ /* check argument counts */ for (tmpArgs=args;; tmpArgs++) { const char *s; int c; if (tmpArgs->longOption) s=tmpArgs->longOption; else s=tmpArgs->shortOption; c=GWEN_DB_GetIntValue(counts, tmpArgs->name, 0, 0); /* check minnum */ if (tmpArgs->minNum && ((unsigned int)cminNum)) { if (tmpArgs->minNum>1) { DBG_ERROR(GWEN_LOGDOMAIN, "Option \"%s\" needed %d times (have %d)", s, tmpArgs->minNum, c); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Option \"%s\" needed", s); } GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } /* check maxnum */ if (tmpArgs->maxNum && ((unsigned int)c>tmpArgs->maxNum)) { DBG_ERROR(GWEN_LOGDOMAIN, "Option \"%s\" needed at most %d times (have %d)", s, tmpArgs->maxNum, c); GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return GWEN_ARGS_RESULT_ERROR; } if (tmpArgs->flags & GWEN_ARGS_FLAGS_LAST) break; } /* for */ GWEN_DB_Group_free(counts); GWEN_Buffer_free(tbuf); return i; } int GWEN_Args__AppendTXT(GWEN_BUFFER *ubuf, const char *s, unsigned int ins) { unsigned int i; while (*s) { for (i=0; ishortOption || tmpArgs->longOption) { if (tmpArgs->shortOption) { GWEN_Buffer_AppendString(ubuf, " "); if (tmpArgs->minNum==0) GWEN_Buffer_AppendString(ubuf, "["); else GWEN_Buffer_AppendString(ubuf, " "); GWEN_Buffer_AppendString(ubuf, "-"); GWEN_Buffer_AppendString(ubuf, tmpArgs->shortOption); if (tmpArgs->flags & GWEN_ARGS_FLAGS_HAS_ARGUMENT) GWEN_Buffer_AppendString(ubuf, " PARAM"); if (tmpArgs->minNum==0) GWEN_Buffer_AppendString(ubuf, "]"); GWEN_Buffer_AppendString(ubuf, "\n"); } /* if short option */ if (tmpArgs->longOption) { GWEN_Buffer_AppendString(ubuf, " "); if (tmpArgs->minNum==0) GWEN_Buffer_AppendString(ubuf, "["); else GWEN_Buffer_AppendString(ubuf, " "); GWEN_Buffer_AppendString(ubuf, "--"); GWEN_Buffer_AppendString(ubuf, tmpArgs->longOption); if (tmpArgs->flags & GWEN_ARGS_FLAGS_HAS_ARGUMENT) GWEN_Buffer_AppendString(ubuf, "=PARAM"); if (tmpArgs->minNum==0) GWEN_Buffer_AppendString(ubuf, "]"); GWEN_Buffer_AppendString(ubuf, "\n"); } /* if short option */ s=tmpArgs->longDescription; if (!s) s=tmpArgs->shortDescription; if (s) { GWEN_Args__AppendTXT(ubuf, s, 3); GWEN_Buffer_AppendString(ubuf, "\n"); } } /* if any option */ else { DBG_ERROR(GWEN_LOGDOMAIN, "Option \"%s\" has neither a long nor a short name", tmpArgs->name); return -1; } if (tmpArgs->flags & GWEN_ARGS_FLAGS_LAST) break; } /* for */ return 0; } int GWEN_Args_UsageHTML(GWEN_UNUSED const GWEN_ARGS *args, GWEN_UNUSED GWEN_BUFFER *ubuf) { return 0; } int GWEN_Args_Usage(const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot) { int rv; switch (ot) { case GWEN_ArgsOutType_Txt: rv=GWEN_Args_UsageTXT(args, ubuf); break; case GWEN_ArgsOutType_Html: rv=GWEN_Args_UsageHTML(args, ubuf); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unknown output type %d", ot); rv=-1; } /* switch */ return rv; } int GWEN_Args_ShortUsage(GWEN_UNUSED const GWEN_ARGS *args, GWEN_UNUSED GWEN_BUFFER *ubuf, GWEN_UNUSED GWEN_ARGS_OUTTYPE ot) { return 0; } gwenhywfar-5.12.1/src/base/error_p.h0000644000175000017500000000341313142134463014226 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Tue Oct 02 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_ERROR_P_H #define GWENHYWFAR_ERROR_P_H #include "error_l.h" // Intentionally empty #endif /* MOD_ERROR_H */ gwenhywfar-5.12.1/src/base/buffer-t.c0000664000175000017500000002020514116666046014274 00000000000000/*************************************************************************** begin : Mon Feb 10 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* This file is included by "buffer.c" */ #include #include "buffer-t.h" #ifdef GWENHYWFAR_ENABLE_TESTCODE /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static int GWENHYWFAR_CB test1(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test2(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test3(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test4(GWEN_TEST_MODULE *mod); static int GWENHYWFAR_CB test5(GWEN_TEST_MODULE *mod); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ int GWEN_Buffer_AddTests(GWEN_TEST_MODULE *mod) { GWEN_TEST_MODULE *newMod; newMod=GWEN_Test_Module_AddModule(mod, "GWEN_Buffer", NULL); GWEN_Test_Module_AddTest(newMod, "append args (simple)", test1, NULL); GWEN_Test_Module_AddTest(newMod, "append args (long string)", test2, NULL); GWEN_Test_Module_AddTest(newMod, "cutout text between strings (onlyBetween=0)", test3, NULL); GWEN_Test_Module_AddTest(newMod, "cutout text between strings (onlyBetween=1)", test4, NULL); GWEN_Test_Module_AddTest(newMod, "cutout text between strings, add something behind", test5, NULL); return 0; } int test1(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_BUFFER *buf; int rv; buf=GWEN_Buffer_new(0, 16, 0, 1); rv=GWEN_Buffer_AppendArgs(buf, "%s-%d", "TESTSTRING", 1234); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not append args"); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (strcmp(GWEN_Buffer_GetStart(buf), "TESTSTRING-1234")!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } GWEN_Buffer_free(buf); return 0; } int test2(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_BUFFER *buf; int rv; static const char *testString= "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789" "0123456789"; buf=GWEN_Buffer_new(0, 16, 0, 1); rv=GWEN_Buffer_AppendArgs(buf, "%s", testString); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not append args"); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (strcmp(GWEN_Buffer_GetStart(buf), testString)!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } GWEN_Buffer_free(buf); return 0; } int test3(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_BUFFER *buf; int rv; static const char *testString1= "0000000000" "" "1111111111" "" "222222222"; static const char *testString2= "" "1111111111" ""; buf=GWEN_Buffer_new(0, 16, 0, 1); rv=GWEN_Buffer_AppendString(buf, testString1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not append string"); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } rv=GWEN_Buffer_KeepTextBetweenStrings(buf, "", "", 0); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not cut data out (%d)", rv); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (strcmp(GWEN_Buffer_GetStart(buf), testString2)!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } GWEN_Buffer_free(buf); return 0; } int test4(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_BUFFER *buf; int rv; static const char *testString1= "0000000000" "" "1111111111" "" "222222222"; static const char *testString2= "1111111111"; buf=GWEN_Buffer_new(0, 16, 0, 1); rv=GWEN_Buffer_AppendString(buf, testString1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not append string"); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } rv=GWEN_Buffer_KeepTextBetweenStrings(buf, "", "", 1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not cut data out (%d)", rv); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (strcmp(GWEN_Buffer_GetStart(buf), testString2)!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (GWEN_Buffer_GetUsedBytes(buf)!=strlen(testString2)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid buffer size (%d)", GWEN_Buffer_GetUsedBytes(buf)); } GWEN_Buffer_free(buf); return 0; } int test5(GWEN_UNUSED GWEN_TEST_MODULE *mod) { GWEN_BUFFER *buf; int rv; static const char *testString1= "0000000000" "" "1111111111" "" "222222222"; static const char *testString2= "1111111111"; static const char *testString3= "3333333333"; static const char *testString4= "1111111111" "3333333333"; buf=GWEN_Buffer_new(0, 16, 0, 1); rv=GWEN_Buffer_AppendString(buf, testString1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not append string"); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } rv=GWEN_Buffer_KeepTextBetweenStrings(buf, "", "", 1); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not cut data out (%d)", rv); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (strcmp(GWEN_Buffer_GetStart(buf), testString2)!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (GWEN_Buffer_GetUsedBytes(buf)!=strlen(testString2)) { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid buffer size (%d)", GWEN_Buffer_GetUsedBytes(buf)); } rv=GWEN_Buffer_AppendString(buf, testString3); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not append 2nd string"); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } if (strcmp(GWEN_Buffer_GetStart(buf), testString4)!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } GWEN_Buffer_free(buf); return 0; } #else int GWEN_Buffer_AddTests(GWEN_UNUSED GWEN_TEST_MODULE *mod) { DBG_ERROR(GWEN_LOGDOMAIN, "Gwenhywfar was compiled without test code enabled."); return GWEN_ERROR_GENERIC; } #endif gwenhywfar-5.12.1/src/base/memcache.c0000644000175000017500000002225313142134475014321 00000000000000/*************************************************************************** begin : Mon Jul 14 2008 copyright : (C) 2008 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "memcache_p.h" #include #include GWEN_IDMAP_FUNCTIONS(GWEN_MEMCACHE_ENTRY, GWEN_MemCacheEntry) GWEN_MEMCACHE_ENTRY *GWEN_MemCacheEntry_new(GWEN_MEMCACHE *memCache, uint32_t id, void *dataPtr, size_t dataLen) { GWEN_MEMCACHE_ENTRY *me; GWEN_NEW_OBJECT(GWEN_MEMCACHE_ENTRY, me); me->memCache=memCache; me->id=id; me->dataPtr=dataPtr; me->dataLen=dataLen; me->isValid=1; /* update memcache */ me->memCache->currentCacheEntries++; me->memCache->currentCacheMemory+=me->dataLen; return me; } void GWEN_MemCacheEntry_free(GWEN_MEMCACHE_ENTRY *me) { if (me) { assert(me->useCounter==0); assert(me->memCache); /* update memcache */ me->memCache->currentCacheEntries--; me->memCache->currentCacheMemory-=me->dataLen; if (me->dataPtr && me->dataLen) free(me->dataPtr); GWEN_FREE_OBJECT(me); } } int GWEN_MemCacheEntry_GetUseCounter(const GWEN_MEMCACHE_ENTRY *me) { assert(me); return me->useCounter; } time_t GWEN_MemCacheEntry_GetUnusedSince(GWEN_MEMCACHE_ENTRY *me) { assert(me); return me->unusedSince; } uint32_t GWEN_MemCacheEntry_GetId(GWEN_MEMCACHE_ENTRY *me) { assert(me); return me->id; } void *GWEN_MemCacheEntry_GetDataPtr(GWEN_MEMCACHE_ENTRY *me) { assert(me); return me->dataPtr; } size_t GWEN_MemCacheEntry_GetDataLen(GWEN_MEMCACHE_ENTRY *me) { assert(me); return me->dataLen; } void GWEN_MemCacheEntry_BeginUse(GWEN_MEMCACHE_ENTRY *me) { int rv; assert(me); rv=GWEN_MemCache_Lock(me->memCache); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); assert(0); } me->useCounter++; GWEN_MemCache_Unlock(me->memCache); } void GWEN_MemCacheEntry_EndUse(GWEN_MEMCACHE_ENTRY *me) { int rv; assert(me); rv=GWEN_MemCache_Lock(me->memCache); if (rv) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); assert(0); } if (me->useCounter>0) { me->useCounter--; if (me->useCounter==0) { if (!(me->isValid)) { GWEN_MemCacheEntry_free(me); } else me->unusedSince=time(0); } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Use counter < 1, aborting"); GWEN_MemCache_Unlock(me->memCache); assert(me->useCounter>0); } GWEN_MemCache_Unlock(me->memCache); } GWEN_MEMCACHE *GWEN_MemCache_new(size_t maxCacheMemory, uint32_t maxCacheEntries) { GWEN_MEMCACHE *mc; GWEN_NEW_OBJECT(GWEN_MEMCACHE, mc); mc->mutex=GWEN_Mutex_new(); mc->idMap=GWEN_MemCacheEntry_IdMap_new(GWEN_IdMapAlgo_Hex4); mc->maxCacheMemory=maxCacheMemory; mc->maxCacheEntries=maxCacheEntries; return mc; } void GWEN_MemCache_free(GWEN_MEMCACHE *mc) { if (mc) { GWEN_MemCacheEntry_IdMap_free(mc->idMap); GWEN_Mutex_free(mc->mutex); GWEN_FREE_OBJECT(mc); } } GWEN_MEMCACHE_ENTRY *GWEN_MemCache_FindEntry(GWEN_MEMCACHE *mc, uint32_t id) { GWEN_MEMCACHE_ENTRY *me; assert(mc); GWEN_MemCache_Lock(mc); me=GWEN_MemCacheEntry_IdMap_Find(mc->idMap, id); if (me) { /* we can't call GWEN_MemCache_BeginUse() here because of the mutex */ me->useCounter++; } GWEN_MemCache_Unlock(mc); return me; } void GWEN_MemCache_PurgeEntry(GWEN_MEMCACHE *mc, uint32_t id) { GWEN_MEMCACHE_ENTRY *me; assert(mc); GWEN_MemCache_Lock(mc); me=GWEN_MemCacheEntry_IdMap_Find(mc->idMap, id); if (me) { me->isValid=0; GWEN_MemCacheEntry_IdMap_Remove(mc->idMap, id); if (me->useCounter==0) GWEN_MemCacheEntry_free(me); } GWEN_MemCache_Unlock(mc); } int GWEN_MemCache__MakeRoom(GWEN_MEMCACHE *mc, size_t neededSize) { assert(mc); /* release unused entries until there is enough memory */ while (neededSize) { GWEN_MEMCACHE_ENTRY *oldestEntry; GWEN_IDMAP_RESULT res; uint32_t currentId; /* get oldest entry */ oldestEntry=NULL; res=GWEN_MemCacheEntry_IdMap_GetFirst(mc->idMap, ¤tId); while (res==GWEN_IdMapResult_Ok) { GWEN_MEMCACHE_ENTRY *me; me=GWEN_MemCacheEntry_IdMap_Find(mc->idMap, currentId); if (me) { if (me->isValid && me->useCounter==0) { if (oldestEntry==NULL) oldestEntry=me; else { if (me->unusedSinceunusedSince) oldestEntry=me; } } } res=GWEN_MemCacheEntry_IdMap_GetNext(mc->idMap, ¤tId); } if (oldestEntry==NULL) /* no unused entry found */ break; /* subtract size of to-be-removed entry from needed size */ if (neededSizedataLen) neededSize=0; else neededSize-=oldestEntry->dataLen; /* remove oldest entry (it is unused, so we also delete it here) */ GWEN_MemCacheEntry_IdMap_Remove(mc->idMap, oldestEntry->id); GWEN_MemCacheEntry_free(oldestEntry); } return (neededSize==0)?0:GWEN_ERROR_MEMORY_FULL; } GWEN_MEMCACHE_ENTRY *GWEN_MemCache_CreateEntry(GWEN_MEMCACHE *mc, uint32_t id, void *dataPtr, size_t dataLen) { GWEN_MEMCACHE_ENTRY *me; assert(mc); GWEN_MemCache_Lock(mc); /* invalidate possibly existing entry in any case */ me=GWEN_MemCacheEntry_IdMap_Find(mc->idMap, id); if (me) { me->isValid=0; GWEN_MemCacheEntry_IdMap_Remove(mc->idMap, id); if (me->useCounter==0) GWEN_MemCacheEntry_free(me); } /* check for limits: entry count */ if (mc->currentCacheEntries>=mc->maxCacheEntries) { int rv; /* release unused entries (at least 1 byte) */ rv=GWEN_MemCache__MakeRoom(mc, 1); if (rv) { DBG_WARN(GWEN_LOGDOMAIN, "Too many entries in use"); GWEN_MemCache_Unlock(mc); return NULL; } } /* check for limits: memory in use */ if ((mc->currentCacheMemory+dataLen)>=mc->maxCacheMemory) { size_t diff; int rv; diff=(mc->currentCacheMemory+dataLen)-mc->maxCacheMemory; /* release unused entries */ rv=GWEN_MemCache__MakeRoom(mc, diff); if (rv) { DBG_WARN(GWEN_LOGDOMAIN, "Too much memory in use"); GWEN_MemCache_Unlock(mc); return NULL; } } /* create new entry */ me=GWEN_MemCacheEntry_new(mc, id, dataPtr, dataLen); assert(me); me->useCounter++; GWEN_MemCacheEntry_IdMap_Insert(mc->idMap, id, me); GWEN_MemCache_Unlock(mc); return me; } void GWEN_MemCache_PurgeEntries(GWEN_MEMCACHE *mc, uint32_t id, uint32_t mask) { GWEN_IDMAP_RESULT res; uint32_t currentId; assert(mc); GWEN_MemCache_Lock(mc); res=GWEN_MemCacheEntry_IdMap_GetFirst(mc->idMap, ¤tId); while (res==GWEN_IdMapResult_Ok) { uint32_t nextId; nextId=currentId; res=GWEN_MemCacheEntry_IdMap_GetNext(mc->idMap, &nextId); if ((currentId & mask)==id) { GWEN_MEMCACHE_ENTRY *me; me=GWEN_MemCacheEntry_IdMap_Find(mc->idMap, currentId); if (me) { me->isValid=0; GWEN_MemCacheEntry_IdMap_Remove(mc->idMap, currentId); if (me->useCounter==0) GWEN_MemCacheEntry_free(me); } } currentId=nextId; } GWEN_MemCache_Unlock(mc); } void GWEN_MemCache_Purge(GWEN_MEMCACHE *mc) { assert(mc); GWEN_MemCache_PurgeEntries(mc, 0, 0); } int GWEN_MemCache_Lock(GWEN_MEMCACHE *mc) { assert(mc); return GWEN_Mutex_Lock(mc->mutex); } int GWEN_MemCache_Unlock(GWEN_MEMCACHE *mc) { assert(mc); return GWEN_Mutex_Unlock(mc->mutex); } gwenhywfar-5.12.1/src/base/buffer_p.h0000644000175000017500000000456713605701347014366 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_BUFFER_P_H #define GWENHYWFAR_BUFFER_P_H #include #include /** * When reallocating the buffer a multiple of this value is used. * Needs to be aligned at 2^n */ #define GWEN_BUFFER_DYNAMIC_STEP 1024 #define GWEN_BUFFER_FLAGS_OWNED 0x0001 #define GWEN_BUFFER_MODE_COPYMASK (\ ~(0) \ ) struct GWEN_BUFFER { char *realPtr; char *ptr; uint32_t pos; uint32_t bufferSize; uint32_t realBufferSize; uint32_t bytesUsed; uint32_t flags; uint32_t mode; uint32_t hardLimit; uint32_t step; uint32_t bookmarks[GWEN_BUFFER_MAX_BOOKMARKS]; uint32_t _refCount; }; static void GWEN_Buffer_AdjustBookmarks(GWEN_BUFFER *bf, uint32_t pos, int offset); #endif gwenhywfar-5.12.1/src/base/logger.h0000666000175000017500000001561313473347061014055 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Dec 05 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_LOGGER_H #define GWEN_LOGGER_H #ifdef __cplusplus extern "C" { #endif #define GWEN_LOGDOMAIN "gwenhywfar" #include #include typedef void GWENHYWFAR_CB(*GWEN_LOGGERFUNCTIONLOG)(const char *s); typedef enum { GWEN_LoggerType_Console, GWEN_LoggerType_File, GWEN_LoggerType_Syslog, GWEN_LoggerType_Function, GWEN_LoggerType_Unknown=9999 } GWEN_LOGGER_LOGTYPE; typedef enum { GWEN_LoggerFacility_Auth=0, GWEN_LoggerFacility_Daemon, GWEN_LoggerFacility_Mail, GWEN_LoggerFacility_News, GWEN_LoggerFacility_User, GWEN_LoggerFacility_Unknown=9999 } GWEN_LOGGER_FACILITY; typedef enum { GWEN_LoggerLevel_Emergency=0, GWEN_LoggerLevel_Alert, GWEN_LoggerLevel_Critical, GWEN_LoggerLevel_Error, GWEN_LoggerLevel_Warning, GWEN_LoggerLevel_Notice, GWEN_LoggerLevel_Info, GWEN_LoggerLevel_Debug, GWEN_LoggerLevel_Verbous, GWEN_LoggerLevel_Unknown=9999 } GWEN_LOGGER_LEVEL; /** * Checks whether a given log domain already exists. * @return 1 if it exists, 0 otherwise */ GWENHYWFAR_API int GWEN_Logger_Exists(const char *logDomain); /** * Sets up logging. It automatically enables logging. * @author Martin Preuss * @param ident this string is prepended to each message logged to identify * the logging program * @param file name of the file to log to. If this is empty and syslog is * available, then all messages are logged via syslog. If syslog is not * available, all messages are logged to the console. * @param logtype how to log (via syslog, to a file, to the console etc) * @param facility what kind of program the log message comes from */ GWENHYWFAR_API int GWEN_Logger_Open(const char *logDomain, const char *ident, const char *file, GWEN_LOGGER_LOGTYPE logtype, GWEN_LOGGER_FACILITY facility); /** * Shuts down logging. Automatically disables logging. * @author Martin Preuss */ GWENHYWFAR_API void GWEN_Logger_Close(const char *logDomain); /** * Checks whether the logger for the given logDomain is open or not. */ GWENHYWFAR_API int GWEN_Logger_IsOpen(const char *logDomain); /** * Log a message. * @author Martin Preuss * @param priority priority of the message * @param s string to log. This string is cut at all occurences of a newline * character thus splitting it into multiple log lines if necessary */ GWENHYWFAR_API void GWEN_Logger_Log(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s); /** * Enables or disables logging. * @author Martin Preuss * @param f if 0 then logging is disabled, otherwise it is enabled */ GWENHYWFAR_API void GWEN_Logger_Enable(const char *logDomain, int f); /** * Checks whether logging is enabled. * @author Martin Preuss * @return 0 if disabled, 1 otherwise */ GWENHYWFAR_API int GWEN_Logger_IsEnabled(const char *logDomain); /** * Sets the logger level. All messages with a priority up to the given one * will be logged, all others will not. * @author Martin Preuss * @param l maximum level to be logged */ GWENHYWFAR_API void GWEN_Logger_SetLevel(const char *logDomain, GWEN_LOGGER_LEVEL l); /** * Returns the current log level. * @author Martin Preuss */ GWENHYWFAR_API int GWEN_Logger_GetLevel(const char *logDomain); /** * Set ident string. This string is prepended to every log message and * should contain the name of the running program. * @author Martin Preuss */ GWENHYWFAR_API void GWEN_Logger_SetIdent(const char *logDomain, const char *id); /** * Set the name of the file to be used when logging to a file. */ void GWEN_Logger_SetFilename(const char *logDomain, const char *name); /** * Set logging function. This function is used to log messages in mode * LoggerTypeFunction. * @author Martin Preuss */ GWENHYWFAR_API GWEN_LOGGERFUNCTIONLOG GWEN_Logger_SetLogFunction(const char *logDomain, GWEN_LOGGERFUNCTIONLOG fn); /** * Transforms an ASCII string to a level value. */ GWENHYWFAR_API GWEN_LOGGER_LEVEL GWEN_Logger_Name2Level(const char *name); /** * Transforms a logger level to an ASCII string (for config files, * command line options etc). */ GWENHYWFAR_API const char *GWEN_Logger_Level2Name(GWEN_LOGGER_LEVEL level); /** * Transforms an ASCII string into the corresponding log type. */ GWENHYWFAR_API GWEN_LOGGER_LOGTYPE GWEN_Logger_Name2Logtype(const char *name); /** * Transforms a log type into an ASCII string. */ GWENHYWFAR_API const char *GWEN_Logger_Logtype2Name(GWEN_LOGGER_LOGTYPE lt); /** * This function can be used to generate log messages from within log hooks. */ GWENHYWFAR_API int GWEN_Logger_CreateLogMessage(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s, GWEN_BUFFER *mbuf); #ifdef __cplusplus } #endif #endif /* #ifndef CH_LOGGER_H */ gwenhywfar-5.12.1/src/base/list.h0000666000175000017500000003507613473346361013560 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sat Nov 15 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_LIST_H #define GWENHYWFAR_LIST_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* This is needed for PalmOS, because it define some functions needed */ #include #include /** @defgroup GWEN_LIST Generic List Handling * @ingroup MOD_BASE * The macros of this group facilitates typesafe use of lists. */ /*@{*/ /** @brief Doubly-linked list. * * The list contains pointer to data objects, with the ability to * iterate over the list in both directions. */ typedef struct GWEN_LIST GWEN_LIST; /** Callback function for one list element. */ typedef void *(*GWEN_LIST_FOREACH_CB)(void *element, void *user_data); /** @brief Doubly-linked list with const objects. * * The list contains pointer to const data objects, with the ability * to iterate over the list in both directions. */ typedef struct GWEN_LIST GWEN_CONSTLIST; /** Callback function for one const list element. */ typedef const void *(*GWEN_CONSTLIST_FOREACH_CB)(const void *element, void *user_data); /** An iterator for the doubly-linked list, i.e. a pointer to a specific element */ typedef struct GWEN_LIST_ITERATOR GWEN_LIST_ITERATOR; /** An iterator for the const doubly-linked list, i.e. a pointer to a specific element */ typedef struct GWEN_LIST_ITERATOR GWEN_CONSTLIST_ITERATOR; /** allow inheriting of lists */ GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_LIST, GWENHYWFAR_API) /** Constructor. Returns a new empty list. */ GWENHYWFAR_API GWEN_LIST *GWEN_List_new(void); /** Destructor. Frees all of the memory used by this list. The list * elements are not freed. */ GWENHYWFAR_API void GWEN_List_free(GWEN_LIST *l); /** Duplicates a list by returning a reference and using * reference-counting. */ GWENHYWFAR_API GWEN_LIST *GWEN_List_dup(const GWEN_LIST *l); GWENHYWFAR_API void GWEN_List_Unshare(GWEN_LIST *l); /** * Dumps the contents of the list to an open file (e.g. stderr). */ GWENHYWFAR_API void GWEN_List_Dump(const GWEN_LIST *l, FILE *f, unsigned int indent); /** * Appends an element to a list, making it the new last element. */ GWENHYWFAR_API void GWEN_List_PushBack(GWEN_LIST *l, void *p); /** * Appends an element to a list, making it the new last element. */ GWENHYWFAR_API void GWEN_List_PushBackRefPtr(GWEN_LIST *l, GWEN_REFPTR *rp); /** * Inserts an element at the start of the list, making it the new * first element. */ GWENHYWFAR_API void GWEN_List_PushFront(GWEN_LIST *l, void *p); /** * Inserts an element at the start of the list, making it the new * first element. */ GWENHYWFAR_API void GWEN_List_PushFrontRefPtr(GWEN_LIST *l, GWEN_REFPTR *rp); /** * Returns the first element of the list. (The element is not * removed from the list.) */ GWENHYWFAR_API void *GWEN_List_GetFront(const GWEN_LIST *l); /** * Returns the first element of the list. (The element is not * removed from the list.) */ GWENHYWFAR_API GWEN_REFPTR *GWEN_List_GetFrontRefPtr(const GWEN_LIST *l); /** * Returns the last element of the list. (The element is not * removed from the list.) */ GWENHYWFAR_API void *GWEN_List_GetBack(const GWEN_LIST *l); /** * Returns the last element of the list. (The element is not * removed from the list.) */ GWENHYWFAR_API GWEN_REFPTR *GWEN_List_GetBackRefPtr(const GWEN_LIST *l); /** * Removes the element currently pointed to by the given iterator * from the list. (The element is not freed.) * The given iterator is move toward the next element in any case (if there * is no next element then the iterator will point to 0). */ GWENHYWFAR_API void GWEN_List_Erase(GWEN_LIST *l, GWEN_LIST_ITERATOR *it); /** * Searches for the first occurrence of the "element" pointer and * erases that element from the list. (The element itself is not * freed.) I.e. this function calls GWEN_List_Erase on the first * occurrence found of "element". */ GWENHYWFAR_API void GWEN_List_Remove(GWEN_LIST *l, const void *element); /** Returns the size of this list, i.e. the number of elements in this * list. * * This number is counted in the list metadata, so this is a cheap * operation. */ GWENHYWFAR_API unsigned int GWEN_List_GetSize(const GWEN_LIST *l); /** Returns nonzero (TRUE) if this list is empty, and zero (FALSE) if * this list is not empty. */ GWENHYWFAR_API int GWEN_List_IsEmpty(const GWEN_LIST *l); GWENHYWFAR_API GWEN_REFPTR_INFO *GWEN_List_GetRefPtrInfo(const GWEN_LIST *l); GWENHYWFAR_API void GWEN_List_SetRefPtrInfo(GWEN_LIST *l, GWEN_REFPTR_INFO *rpi); /** * Removes the list's last element from the list. (The element is not * freed.) */ GWENHYWFAR_API void GWEN_List_PopBack(GWEN_LIST *l); /** * Removes the list's first element from the list. (The element is not * freed.) */ GWENHYWFAR_API void GWEN_List_PopFront(GWEN_LIST *l); /** * Removes all list elements from the list. The elements are not * freed. */ GWENHYWFAR_API void GWEN_List_Clear(GWEN_LIST *l); /** * Finds the LIST_ITERATOR position of the given element. The * returned LIST_ITERATOR will be owned by the caller and must be * freed when no longer in use. If the list does not contain the * element, NULL will be returned. */ GWENHYWFAR_API GWEN_LIST_ITERATOR *GWEN_List_FindIter(GWEN_LIST *l, const void *element); /** * Searches whether the list contains the given element. If it does, * the pointer to the element is returned. Otherwise, NULL is * returned. */ GWENHYWFAR_API const void *GWEN_List_Contains(GWEN_LIST *l, const void *element); /** Traverses the list, calling the callback function 'func' on * each list element. Traversal will stop when 'func' returns a * non-NULL value, and the routine will return with that * value. Otherwise the routine will return NULL. * * @param list The list to traverse. * @param func The function to be called with each list element. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. */ GWENHYWFAR_API void *GWEN_List_ForEach(GWEN_LIST *list, GWEN_LIST_FOREACH_CB func, void *user_data); /** Return an iterator pointing to the first element in the list */ GWENHYWFAR_API GWEN_LIST_ITERATOR *GWEN_List_First(const GWEN_LIST *l); /** Returns an iterator pointing to the last element in the list. */ GWENHYWFAR_API GWEN_LIST_ITERATOR *GWEN_List_Last(const GWEN_LIST *l); /** * Creates a list iterator for the given list. */ GWENHYWFAR_API GWEN_LIST_ITERATOR *GWEN_ListIterator_new(const GWEN_LIST *l); /** Frees a list iterator. */ GWENHYWFAR_API void GWEN_ListIterator_free(GWEN_LIST_ITERATOR *li); /** * Moves the list iterator to the predecessor of the currenty selected * element and returns that predecessor element. */ GWENHYWFAR_API void *GWEN_ListIterator_Previous(GWEN_LIST_ITERATOR *li); /** * Moves the list iterator to the predecessor of the currenty selected * element and returns that predecessor element. */ GWENHYWFAR_API GWEN_REFPTR *GWEN_ListIterator_PreviousRefPtr(GWEN_LIST_ITERATOR *li); /** * Moves the list iterator to the successor of the currenty selected * element and returns that successor element. */ GWENHYWFAR_API void *GWEN_ListIterator_Next(GWEN_LIST_ITERATOR *li); /** * Moves the list iterator to the successor of the currenty selected * element and returns that successor element. */ GWENHYWFAR_API GWEN_REFPTR *GWEN_ListIterator_NextRefPtr(GWEN_LIST_ITERATOR *li); /** * Returns the pointer to the element stored at the list position the * iterator currently points to. */ GWENHYWFAR_API void *GWEN_ListIterator_Data(GWEN_LIST_ITERATOR *li); /** * Returns the pointer to the element stored at the list position the * iterator currently points to. */ GWENHYWFAR_API GWEN_REFPTR *GWEN_ListIterator_DataRefPtr(GWEN_LIST_ITERATOR *li); GWENHYWFAR_API void GWEN_ListIterator_IncLinkCount(GWEN_LIST_ITERATOR *li); GWENHYWFAR_API unsigned int GWEN_ListIterator_GetLinkCount(const GWEN_LIST_ITERATOR *li); /** Constructor. Returns a new empty list. */ GWENHYWFAR_API GWEN_CONSTLIST *GWEN_ConstList_new(void); /** Destructor. Frees all of the memory used by this list. The list * elements are not freed */ GWENHYWFAR_API void GWEN_ConstList_free(GWEN_CONSTLIST *l); /** * Appends an element to a list, making it the new last element. */ GWENHYWFAR_API void GWEN_ConstList_PushBack(GWEN_CONSTLIST *l, const void *p); /** * Inserts an element at the start of the list, making it the new * first element. */ GWENHYWFAR_API void GWEN_ConstList_PushFront(GWEN_CONSTLIST *l, const void *p); /** * Returns the first element of the list. (The element is not * removed from the list.) */ GWENHYWFAR_API const void *GWEN_ConstList_GetFront(const GWEN_CONSTLIST *l); /** * Returns the last element of the list. (The element is not * removed from the list.) */ GWENHYWFAR_API const void *GWEN_ConstList_GetBack(const GWEN_CONSTLIST *l); /** Returns the size of this list, i.e. the number of elements in this * list. * * This number is counted in the list metadata, so this is a cheap * operation. */ GWENHYWFAR_API unsigned int GWEN_ConstList_GetSize(const GWEN_CONSTLIST *l); /** Returns nonzero (TRUE) if this list is empty, and zero (FALSE) if * this list is not empty. */ GWENHYWFAR_API int GWEN_ConstList_IsEmpty(const GWEN_LIST *l); /** * Removes the list's last element from the list. (The element is not * freed.) */ GWENHYWFAR_API void GWEN_ConstList_PopBack(GWEN_CONSTLIST *l); /** * Removes the list's first element from the list. (The element is not * freed.) */ GWENHYWFAR_API void GWEN_ConstList_PopFront(GWEN_CONSTLIST *l); /** * Removes all list elements from the list. The elements are not * freed. */ GWENHYWFAR_API void GWEN_ConstList_Clear(GWEN_CONSTLIST *l); /** Traverses the list, calling the callback function 'func' on * each list element. Traversal will stop when 'func' returns a * non-NULL value, and the routine will return with that * value. Otherwise the routine will return NULL. * * @param list The list to traverse. * @param func The function to be called with each list element. * @param user_data A pointer passed on to the function 'func'. * @return The non-NULL pointer returned by 'func' as soon as it * returns one. Otherwise (i.e. 'func' always returns NULL) * returns NULL. */ GWENHYWFAR_API const void *GWEN_ConstList_ForEach(GWEN_CONSTLIST *list, GWEN_CONSTLIST_FOREACH_CB func, void *user_data); /** * Finds the LIST_ITERATOR position of the given element. The * returned LIST_ITERATOR will be owned by the caller and must be * freed when no longer in use. If the list does not contain the * element, NULL will be returned. */ GWENHYWFAR_API GWEN_CONSTLIST_ITERATOR *GWEN_ConstList_FindIter(const GWEN_CONSTLIST *l, const void *element); /** * Searches whether the list contains the given element. If it does, * the pointer to the element is returned. Otherwise, NULL is * returned. */ GWENHYWFAR_API const void *GWEN_ConstList_Contains(const GWEN_CONSTLIST *l, const void *element); /** * Removes the element currently pointed to by the given iterator * from the list. (The element is not freed.) * The given iterator is move toward the next element in any case (if there * is no next element then the iterator will point to 0). */ GWENHYWFAR_API void GWEN_ConstList_Erase(GWEN_CONSTLIST *l, GWEN_CONSTLIST_ITERATOR *it); /** * Searches for the first occurrence of the "element" pointer and * erases that element from the list. (The element itself is not * freed.) I.e. this function calls GWEN_List_Erase on the first * occurrence found of "element". */ GWENHYWFAR_API void GWEN_ConstList_Remove(GWEN_CONSTLIST *l, const void *element); /** Return an iterator pointing to the first element in the list */ GWENHYWFAR_API GWEN_CONSTLIST_ITERATOR *GWEN_ConstList_First(const GWEN_CONSTLIST *l); /** Returns an iterator pointing to the last element in the list. */ GWENHYWFAR_API GWEN_CONSTLIST_ITERATOR *GWEN_ConstList_Last(const GWEN_CONSTLIST *l); /** * Creates a list iterator for the given list. */ GWENHYWFAR_API GWEN_CONSTLIST_ITERATOR *GWEN_ConstListIterator_new(const GWEN_CONSTLIST *l); /** Frees a list iterator. */ GWENHYWFAR_API void GWEN_ConstListIterator_free(GWEN_CONSTLIST_ITERATOR *li); /** * Moves the list iterator to the predecessor of the currenty selected * element and returns that predecessor element. */ GWENHYWFAR_API const void *GWEN_ConstListIterator_Previous(GWEN_CONSTLIST_ITERATOR *li); /** * Moves the list iterator to the successor of the currenty selected * element and returns that successor element. */ GWENHYWFAR_API const void *GWEN_ConstListIterator_Next(GWEN_CONSTLIST_ITERATOR *li); /** * Returns the pointer to the element stored at the list position the * iterator currently points to. */ GWENHYWFAR_API const void *GWEN_ConstListIterator_Data(GWEN_CONSTLIST_ITERATOR *li); /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/refptr.h0000666000175000017500000001123613473346361014077 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 25 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_REFPTR_H #define GWEN_REFPTR_H #include #include #define GWEN_REFPTR_FLAGS_AUTODELETE 0x00000001 #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_REFPTR_INFO GWEN_REFPTR_INFO; typedef struct GWEN_REFPTR GWEN_REFPTR; /** @defgroup MOD_REFPTR Pointer with Reference Counter * @ingroup MOD_BASE * * @brief This file contains functions which implement a smart pointer. * */ /*@{*/ /** @defgroup MOD_REFPTR_PTR Pointer Functions * @ingroup MOD_REFPTR * * @brief This group contains the definition of a GWEN_REFPTR. * */ /*@{*/ /** @name Constructor, Destructor, Copy, Duplicate functions * */ /*@{*/ GWENHYWFAR_API GWEN_REFPTR *GWEN_RefPtr_new(void *dp, GWEN_REFPTR_INFO *rpi); GWENHYWFAR_API GWEN_REFPTR *GWEN_RefPtr_dup(const GWEN_REFPTR *rp); GWENHYWFAR_API GWEN_REFPTR *GWEN_RefPtr_copy(const GWEN_REFPTR *rp); GWENHYWFAR_API void GWEN_RefPtr_free(GWEN_REFPTR *rp); /*@}*/ /** @name Data Functions * */ /*@{*/ GWENHYWFAR_API void *GWEN_RefPtr_GetData(const GWEN_REFPTR *rp); GWENHYWFAR_API void GWEN_RefPtr_SetData(GWEN_REFPTR *rp, void *dp, GWEN_REFPTR_INFO *rpi); /*@}*/ /** @name Getting and Setting Flags * */ /*@{*/ GWENHYWFAR_API uint32_t GWEN_RefPtr_GetFlags(const GWEN_REFPTR *rp); GWENHYWFAR_API void GWEN_RefPtr_SetFlags(GWEN_REFPTR *rp, uint32_t fl); GWENHYWFAR_API void GWEN_RefPtr_AddFlags(GWEN_REFPTR *rp, uint32_t fl); GWENHYWFAR_API void GWEN_RefPtr_DelFlags(GWEN_REFPTR *rp, uint32_t fl); /*@}*/ /*@}*/ /* defgroup */ /** @defgroup MOD_REFPTR_INFO Pointer Information Functions * @ingroup MOD_REFPTR * * @brief This group contains the definition of a GWEN_REFPTR_INFO object. * */ /*@{*/ /** @name Constructor, Destructor, Copy, Duplicate functions * */ /*@{*/ GWENHYWFAR_API GWEN_REFPTR_INFO *GWEN_RefPtrInfo_new(void); GWENHYWFAR_API void GWEN_RefPtrInfo_free(GWEN_REFPTR_INFO *rpi); GWENHYWFAR_API void GWEN_RefPtrInfo_Attach(GWEN_REFPTR_INFO *rpi); /*@}*/ /** @name Getting and Setting Flags * * These flags are used for newly created GWEN_REFPTR to provide a * default value. Please see @ref GWEN_REFPTR_FLAGS_AUTODELETE and * following. */ /*@{*/ GWENHYWFAR_API uint32_t GWEN_RefPtrInfo_GetFlags(const GWEN_REFPTR_INFO *rpi); GWENHYWFAR_API void GWEN_RefPtrInfo_SetFlags(GWEN_REFPTR_INFO *rpi, uint32_t fl); GWENHYWFAR_API void GWEN_RefPtrInfo_AddFlags(GWEN_REFPTR_INFO *rpi, uint32_t fl); GWENHYWFAR_API void GWEN_RefPtrInfo_DelFlags(GWEN_REFPTR_INFO *rpi, uint32_t fl); /*@}*/ /** @name Prototypes for Virtual Functions * */ /*@{*/ typedef void (*GWEN_REFPTR_INFO_FREE_FN)(void *dp); typedef void *(*GWEN_REFPTR_INFO_DUP_FN)(void *dp); /*@}*/ /** @name Setters for Virtual Functions * */ /*@{*/ GWENHYWFAR_API void GWEN_RefPtrInfo_SetFreeFn(GWEN_REFPTR_INFO *rpi, GWEN_REFPTR_INFO_FREE_FN f); GWENHYWFAR_API void GWEN_RefPtrInfo_SetDupFn(GWEN_REFPTR_INFO *rpi, GWEN_REFPTR_INFO_DUP_FN f); /*@}*/ /*@}*/ /* defgroup */ /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/simpleptrlist.h0000666000175000017500000001114113642701350015472 00000000000000/*************************************************************************** begin : Fri Dec 06 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_SIMPLEPTRLIST_H #define GWENHYWFAR_SIMPLEPTRLIST_H #include #include #define GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS 0x40000000L #define GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS 0x20000000L typedef struct GWEN_SIMPLEPTRLIST GWEN_SIMPLEPTRLIST; GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_SIMPLEPTRLIST, GWENHYWFAR_API) typedef GWENHYWFAR_CB void (*GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN)(GWEN_SIMPLEPTRLIST *pl, void *p); typedef GWENHYWFAR_CB void (*GWEN_SIMPLEPTRLIST_FREEOBJECT_FN)(GWEN_SIMPLEPTRLIST *pl, void *p); GWENHYWFAR_API GWEN_SIMPLEPTRLIST *GWEN_SimplePtrList_new(uint64_t startEntries, uint64_t steps); GWENHYWFAR_API void GWEN_SimplePtrList_Attach(GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void GWEN_SimplePtrList_free(GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void GWEN_SimplePtrList_Clear(GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API GWEN_SIMPLEPTRLIST *GWEN_SimplePtrList_LazyCopy(GWEN_SIMPLEPTRLIST *oldList); GWENHYWFAR_API void *GWEN_SimplePtrList_GetPtrAt(const GWEN_SIMPLEPTRLIST *pl, uint64_t idx); GWENHYWFAR_API int GWEN_SimplePtrList_SetPtrAt(GWEN_SIMPLEPTRLIST *pl, uint64_t idx, void *p); GWENHYWFAR_API int64_t GWEN_SimplePtrList_AddPtr(GWEN_SIMPLEPTRLIST *pl, void *p); GWENHYWFAR_API uint64_t GWEN_SimplePtrList_GetSteps(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void GWEN_SimplePtrList_SetSteps(GWEN_SIMPLEPTRLIST *pl, uint64_t steps); GWENHYWFAR_API uint32_t GWEN_SimplePtrList_GetFlags(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void GWEN_SimplePtrList_SetFlags(GWEN_SIMPLEPTRLIST *pl, uint32_t f); GWENHYWFAR_API void GWEN_SimplePtrList_AddFlags(GWEN_SIMPLEPTRLIST *pl, uint32_t f); GWENHYWFAR_API void GWEN_SimplePtrList_SubFlags(GWEN_SIMPLEPTRLIST *pl, uint32_t f); GWENHYWFAR_API uint64_t GWEN_SimplePtrList_GetMaxEntries(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API uint64_t GWEN_SimplePtrList_GetUsedEntries(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void *GWEN_SimplePtrList_GetEntries(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API int GWEN_SimplePtrList_EnsureWritability(GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN GWEN_SimplePtrList_SetAttachObjectFn(GWEN_SIMPLEPTRLIST *pl, GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN fn); GWENHYWFAR_API GWEN_SIMPLEPTRLIST_FREEOBJECT_FN GWEN_SimplePtrList_SetFreeObjectFn(GWEN_SIMPLEPTRLIST *pl, GWEN_SIMPLEPTRLIST_FREEOBJECT_FN fn); GWENHYWFAR_API int GWEN_SimplePtrList_GetUserIntData(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void GWEN_SimplePtrList_SetUserIntData(GWEN_SIMPLEPTRLIST *pl, int i); GWENHYWFAR_API void GWEN_SimplePtrList_SetUserCounter(GWEN_SIMPLEPTRLIST *pl, uint64_t i); GWENHYWFAR_API uint64_t GWEN_SimplePtrList_GetUserCounter(const GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API void GWEN_SimplePtrList_IncUserCounter(GWEN_SIMPLEPTRLIST *pl); GWENHYWFAR_API int GWEN_SimplePtrList_DecUserCounter(GWEN_SIMPLEPTRLIST *pl); #endif /* GWENHYWFAR_SIMPLEPTRLIST_P_H */ gwenhywfar-5.12.1/src/base/misc.h0000644000175000017500000001141013142134475013510 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2003-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /** @file src/base/misc.h * * @short This file contains some macros concerning lists and inheritance. * *

* FIRST: Yes, I DO know, macros are very, very bad. * When writing these macros I spent much time debugging them, because the * compiler is not much of a help here. * The validity of a macro is only checked upon invocation, * so if you never use a macro it will never be checked. *

*

* However, these macros do work just fine and they make some tasks * much easier to handle. *

*

* The reason for using macros is the lack of templates in C. * When writing Gwenhywfar I often faced the fact that some functions always * appear with many structs defined. The only difference is the name of those * functions and the type of the arguments. *

*

* The best example is the handling of lists of structs. * In most listable structs there was a variable called @b next which pointed * to the next object in the list. There were also functions like TYPE_next(), * TYPE_add(), TYPE_del() etc for list handling. Whenever I improved the list * mechanism I had to change ALL code files in order to improve them all. *

*

* These macros are now used to facilitate improvements in list or inheritance * handling code in C. *

*

* @b NOTE: Please do not change these macros unless you know exactly what you * are doing! * Bugs in the macros will most probably lead to nearly undebuggable results * in code files using them.
* You have been warned ;-) *

* */ #ifndef GWENHYWFAR_MISC_H #define GWENHYWFAR_MISC_H #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #define GWEN_LIST_ADD(typ, sr, head) {\ typ *curr; \ \ assert(sr); \ \ curr=*head; \ if (!curr) { \ *head=sr; \ } \ else { \ while(curr->next) { \ curr=curr->next; \ } \ curr->next=sr; \ }\ } #define GWEN_LIST_INSERT(typ, sr, head) {\ typ *curr; \ \ assert(sr); \ \ curr=*head; \ if (!curr) { \ *head=sr; \ } \ else { \ sr->next=curr;\ *head=sr;\ }\ } #define GWEN_LIST_DEL(typ, sr, head) {\ typ *curr; \ \ assert(sr); \ curr=*head; \ if (curr) { \ if (curr==sr) { \ *head=curr->next; \ } \ else { \ while(curr->next!=sr) { \ curr=curr->next; \ } \ if (curr) \ curr->next=sr->next; \ } \ } \ sr->next=0;\ } /*@}*/ /* defgroup */ #ifdef __cplusplus } #endif #include #include #endif gwenhywfar-5.12.1/src/base/gwen_param_list.tm20000644000175000017500000000033113644653711016211 00000000000000 GWEN_PARAM_LIST GWEN_Param_List gwenhywfar-5.12.1/src/base/stringlist2.h0000666000175000017500000001361513552056742015063 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Thu Apr 03 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_STRINGLIST2_H #define GWENHYWFAR_STRINGLIST2_H #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_STRINGLIST2 GWEN_STRINGLIST2; typedef GWEN_LIST_ITERATOR GWEN_STRINGLIST2_ITERATOR; typedef enum { GWEN_StringList2_IntertMode_AlwaysAdd=0, GWEN_StringList2_IntertMode_NoDouble, GWEN_StringList2_IntertMode_Reuse } GWEN_STRINGLIST2_INSERTMODE; GWENHYWFAR_API GWEN_STRINGLIST2 *GWEN_StringList2_new(void); GWENHYWFAR_API void GWEN_StringList2_free(GWEN_STRINGLIST2 *sl2); GWENHYWFAR_API GWEN_STRINGLIST2 *GWEN_StringList2_dup(GWEN_STRINGLIST2 *sl2); GWENHYWFAR_API int GWEN_StringList2_toDb(GWEN_STRINGLIST2 *sl2, GWEN_DB_NODE *db, const char *varName); GWENHYWFAR_API GWEN_STRINGLIST2 *GWEN_StringList2_fromDb(GWEN_DB_NODE *db, const char *name, GWEN_STRINGLIST2_INSERTMODE m); GWENHYWFAR_API int GWEN_StringList2_toXml(GWEN_STRINGLIST2 *sl2, GWEN_XMLNODE *node); GWENHYWFAR_API GWEN_STRINGLIST2 *GWEN_StringList2_fromXml(GWEN_XMLNODE *node, GWEN_STRINGLIST2_INSERTMODE m); /** * Normally this group of functions ignores cases when comparing two strings. * You can change this behaviour here. * @param sl2 string list * @param i if 0 then cases are ignored */ GWENHYWFAR_API void GWEN_StringList2_SetSenseCase(GWEN_STRINGLIST2 *sl2, int i); /** * Normally this group of functions ignores reference counters on stringlist * entries when removing a string via @ref GWEN_StringList2_RemoveString. * You can change this behaviour here. * @param sl2 string list * @param i if 0 then reference counters are honoured */ GWENHYWFAR_API void GWEN_StringList2_SetIgnoreRefCount(GWEN_STRINGLIST2 *sl2, int i); /** * Appends a string. * @return 0 if not appended, !=0 if appended * @param take if true then the StringList takes over ownership of the string * @param checkDouble if true the the string will only be appended if it * does not already exist */ GWENHYWFAR_API int GWEN_StringList2_AppendString(GWEN_STRINGLIST2 *sl2, const char *s, int take, GWEN_STRINGLIST2_INSERTMODE m); /** * Inserts a string. * @return 0 if not inserted, !=0 if inserted * @param take if true then the StringList takes over ownership of the string * @param checkDouble if true the the string will only be appended if it * does not already exist */ GWENHYWFAR_API int GWEN_StringList2_InsertString(GWEN_STRINGLIST2 *sl2, const char *s, int take, GWEN_STRINGLIST2_INSERTMODE m); /** * Removes a given string from the stringlist. * @return 0 if not found, !=0 if found and removed */ GWENHYWFAR_API int GWEN_StringList2_RemoveString(GWEN_STRINGLIST2 *sl2, const char *s); /** * Checks whether the given string already exists within in the * string list. * @return !=0 if found, 0 otherwise */ GWENHYWFAR_API int GWEN_StringList2_HasString(const GWEN_STRINGLIST2 *sl2, const char *s); GWENHYWFAR_API const char *GWEN_StringList2_GetStringAt(const GWEN_STRINGLIST2 *sl2, int idx); GWENHYWFAR_API GWEN_STRINGLIST2_ITERATOR *GWEN_StringList2_First(const GWEN_STRINGLIST2 *l); GWENHYWFAR_API GWEN_STRINGLIST2_ITERATOR *GWEN_StringList2_Last(const GWEN_STRINGLIST2 *l); GWENHYWFAR_API void GWEN_StringList2Iterator_free(GWEN_STRINGLIST2_ITERATOR *li); GWENHYWFAR_API const char *GWEN_StringList2Iterator_Previous(GWEN_STRINGLIST2_ITERATOR *li); GWENHYWFAR_API const char *GWEN_StringList2Iterator_Next(GWEN_STRINGLIST2_ITERATOR *li); GWENHYWFAR_API const char *GWEN_StringList2Iterator_Data(GWEN_STRINGLIST2_ITERATOR *li); GWENHYWFAR_API unsigned int GWEN_StringList2Iterator_GetLinkCount(const GWEN_STRINGLIST2_ITERATOR *li); GWENHYWFAR_API GWEN_REFPTR * GWEN_StringList2Iterator_DataRefPtr(GWEN_STRINGLIST2_ITERATOR *li); GWENHYWFAR_API void GWEN_StringList2_Dump(const GWEN_STRINGLIST2 *sl2); GWENHYWFAR_API unsigned int GWEN_StringList2_GetCount(const GWEN_STRINGLIST2 *l); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/Makefile.am0000664000175000017500000000530514203136643014446 00000000000000AM_CPPFLAGS= -I$(gwenhywfar_symlinkdir) \ -I$(top_srcdir) \ -I$(top_srcdir)/src/ \ -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/gui \ -I$(top_srcdir)/src/parser # Don't include src/os above because its process.h conflicts with the # system's , at least for gcc3.2 on mingw32 # -I$(top_srcdir)/src/os AM_CFLAGS=@PROFILING_CFLAGS@ @visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR DEFS+=-DGWEN_BUFFER_DEFAULT_HARDLIMIT='@gwenhywfar_buffer_hardlimit@' noinst_LTLIBRARIES=libbase.la typedatadir=$(datadir)/gwenhywfar/typemaker2/c dist_typedata_DATA=\ gwen_param.tm2 gwen_param_list.tm2 gwen_param_list2.tm2 gwen_param_tree.tm2 typefiles=param.xml EXTRA_DIST=$(typefiles) \ param_fns.c \ simpleptrlist-t.c simpleptrlist-t.h \ idlist64-t.c idlist64-t.h \ buffer-t.c buffer-t.h noinst_HEADERS=\ args_p.h \ buffer_p.h \ debug_p.h \ error_l.h \ error_p.h \ gwensignal_p.h \ i18n_l.h \ idlist64_p.h \ inherit_p.h \ list_p.h \ list1_p.h \ logger_l.h \ logger_p.h \ pathmanager_l.h \ pathmanager_p.h \ plugindescr_p.h \ plugin_l.h \ plugin_p.h \ refptr_p.h \ ringbuffer_p.h \ stringlist_p.h \ stringlist2_p.h \ idmap_p.h \ memcache_p.h \ tree_p.h \ tree2_p.h \ simpleptrlist_p.h \ multicache_p.h \ param_p.h iheaderdir=$(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS=\ args.h \ buffer.h \ debug.h \ error.h \ funcs.h \ gwensignal.h \ i18n.h \ idlist64.h \ inherit.h \ list.h \ list1.h \ list1.tmpl \ list2.h \ list2.tmpl \ logger.h \ memory.h \ misc.h \ misc2.h \ pathmanager.h \ plugin.h \ plugindescr.h \ refptr.h \ ringbuffer.h \ stringlist.h \ stringlist2.h \ idmap.h \ fastbuffer.h \ memcache.h \ tree.h \ tree2.h \ simpleptrlist.h \ multicache.h \ bindata.h \ param.h \ param_fns.h \ endianfns.h libbase_la_SOURCES=\ args.c \ buffer.c \ debug.c \ error.c \ funcs.c \ gwensignal.c \ i18n.c \ idlist64.c \ inherit.c \ list.c \ list1.c \ logger.c \ memory.c \ pathmanager.c \ plugin.c \ plugindescr.c \ refptr.c \ ringbuffer.c \ stringlist.c \ stringlist2.c \ idmap.c \ fastbuffer.c \ memcache.c \ tree.c \ tree2.c \ simpleptrlist.c \ multicache.c \ param.c sources: for f in $(libbase_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done types: $(typefiles) typedefs typemaker2 -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) typedefs: $(typefiles) typemaker2 --defs-only -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) splint: for f in $(libbase_la_SOURCES); do \ splint $(AM_CPPFLAGS) $(DEFS) +enumint -unrecogcomments +posixlib -predboolint +boolint -boolops $$f ; \ done gwenhywfar-5.12.1/src/base/idmap_p.h0000644000175000017500000001106613142134475014175 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: idlist_p.h 1048 2006-05-17 17:15:35Z martin $ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_IDMAP_P_H #define GWENHYWFAR_IDMAP_P_H #include "idmap.h" typedef GWEN_IDMAP_RESULT(*GWEN_IDMAP_SETPAIR_FN)(GWEN_IDMAP *map, uint32_t id, void *ptr); typedef void *(*GWEN_IDMAP_GETPAIR_FN)(GWEN_IDMAP *map, uint32_t id); typedef GWEN_IDMAP_RESULT(*GWEN_IDMAP_FINDFIRST_FN)(const GWEN_IDMAP *map, uint32_t *pid); typedef GWEN_IDMAP_RESULT(*GWEN_IDMAP_FINDNEXT_FN)(const GWEN_IDMAP *map, uint32_t *pid); typedef void (*GWEN_IDMAP_DUMP_FN)(GWEN_IDMAP *map, FILE *f, int indent); typedef void (*GWEN_IDMAP_FREEDATA_FN)(GWEN_IDMAP *map); struct GWEN_IDMAP { GWEN_IDMAP_SETPAIR_FN setPairFn; GWEN_IDMAP_GETPAIR_FN getPairFn; GWEN_IDMAP_FINDFIRST_FN findFirstFn; GWEN_IDMAP_FINDNEXT_FN findNextFn; GWEN_IDMAP_FREEDATA_FN freeDataFn; GWEN_IDMAP_DUMP_FN dumpFn; GWEN_IDMAP_ALGO algo; void *algoData; uint32_t count; }; typedef struct GWEN_IDMAP_HEX4_TABLE GWEN_IDMAP_HEX4_TABLE; struct GWEN_IDMAP_HEX4_TABLE { GWEN_IDMAP_HEX4_TABLE *parent; int isPtrTable; void *ptrs[16]; }; static GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4Map_new(GWEN_IDMAP_HEX4_TABLE *p, int isPtrTable); static void GWEN_IdMapHex4Map_free(GWEN_IDMAP_HEX4_TABLE *t); typedef struct GWEN_IDMAP_HEX4 GWEN_IDMAP_HEX4; struct GWEN_IDMAP_HEX4 { GWEN_IDMAP_HEX4_TABLE *table; uint32_t lastId; }; static void GWEN_IdMapHex4_Extend(GWEN_IDMAP *map); static void GWEN_IdMapHex4_free(GWEN_IDMAP *map); static GWEN_IDMAP_RESULT GWEN_IdMapHex4_Insert(GWEN_IDMAP *map, uint32_t id, void *ptr); static void *GWEN_IdMapHex4_Find(GWEN_IDMAP *map, uint32_t id); static GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindFirst(const GWEN_IDMAP *map, uint32_t *pid); static GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindNext(const GWEN_IDMAP *map, uint32_t *pid); static GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4__GetTable(GWEN_IDMAP_HEX4_TABLE *t, uint32_t id); static GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4__GetFirstTable(GWEN_IDMAP_HEX4_TABLE *t, uint32_t *pid); static GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4__GetNextTable(GWEN_IDMAP_HEX4_TABLE *t, uint32_t *pid, int incr); static void GWEN_IdMapHex4__Dump(GWEN_IDMAP_HEX4_TABLE *table, FILE *f, int indent); static void GWEN_IdMapHex4_Dump(GWEN_IDMAP *map, FILE *f, int indent); #endif gwenhywfar-5.12.1/src/base/logger_p.h0000664000175000017500000000726414125675316014377 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Dec 05 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_LOGGER_P_H #define GWEN_LOGGER_P_H #include "logger_l.h" #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_LOGGER_DOMAIN GWEN_LOGGER_DOMAIN; typedef struct GWEN_LOGGER GWEN_LOGGER; struct GWEN_LOGGER { GWEN_LOGGER *next; GWEN_LOGGER_DOMAIN *domain; int enabled; int open; GWEN_LOGGER_LOGTYPE logType; char *logFile; char *logIdent; GWEN_LOGGER_LEVEL logLevel; GWEN_LOGGERFUNCTIONLOG logFunction; uint32_t usage; }; struct GWEN_LOGGER_DOMAIN { GWEN_LOGGER_DOMAIN *next; char *name; GWEN_LOGGER *logger; }; GWEN_LOGGER_DOMAIN *GWEN_LoggerDomain_new(const char *name); void GWEN_LoggerDomain_free(GWEN_LOGGER_DOMAIN *ld); GWEN_LOGGER_DOMAIN *GWEN_LoggerDomain_Find(const char *name); void GWEN_LoggerDomain_Add(GWEN_LOGGER_DOMAIN *ld); void GWEN_LoggerDomain_Del(GWEN_LOGGER_DOMAIN *ld); GWEN_LOGGER *GWEN_LoggerDomain_GetLogger(const char *name); int GWEN_Logger__CreateMessage(GWEN_LOGGER *lg, GWEN_LOGGER_LEVEL priority, const char *s, GWEN_BUFFER *mbuf); int GWEN_Logger__Log(GWEN_LOGGER *lg, GWEN_LOGGER_LEVEL priority, const char *s); GWEN_LOGGER *GWEN_Logger_new(GWEN_LOGGER_DOMAIN *domain); void GWEN_Logger_free(GWEN_LOGGER *lg); void GWEN_Logger_Attach(GWEN_LOGGER *lg); /** * Adds a logger to the given one. So if the old logger is to log something * then the newly added logger will log the same message as well. * The new logger must already be open (via @ref GWEN_Logger_Open). */ GWENHYWFAR_API void GWEN_Logger_AddLogger(GWEN_LOGGER *oldLogger, GWEN_LOGGER *newLogger); #ifndef NO_DEPRECATED_SYMBOLS /** * DEPRECATED. Only sets the new default logger if it not already is * set or if the new default logger is NULL. You must call * GWEN_Logger_Open on that logger prior to calling this function. */ GWENHYWFAR_API void GWEN_Logger_SetDefaultLogger(GWEN_LOGGER *lg) GWEN_DEPRECATED ; #endif // ifndef NO_DEPRECATED_SYMBOLS #ifdef __cplusplus } #endif #endif /* #ifndef GWEN_LOGGER_P_H */ gwenhywfar-5.12.1/src/base/simpleptrlist-t.h0000666000175000017500000000353213642701350015740 00000000000000/*************************************************************************** begin : Fri Dec 06 2019 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_SIMPLEPTRLIST_T_H #define GWENHYWFAR_SIMPLEPTRLIST_T_H #include #include /** * Internal tests for GWEN_SIMPLEPTRLIST. */ GWENHYWFAR_API int GWEN_SimplePtrList_AddTests(GWEN_TEST_MODULE *mod); /*@}*/ #endif gwenhywfar-5.12.1/src/base/list1.c0000644000175000017500000002345613552056713013624 00000000000000/*************************************************************************** begin : Sat Nov 15 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "list1_p.h" #include #include static GWENHYWFAR_CB int GWEN_List1__defaultSortFn(GWEN_UNUSED const void *a, GWEN_UNUSED const void *b, GWEN_UNUSED int ascending) { return 0; } GWEN_LIST1 *GWEN_List1_new(void) { GWEN_LIST1 *l; GWEN_NEW_OBJECT(GWEN_LIST1, l); l->sortFunction=GWEN_List1__defaultSortFn; return l; } void GWEN_List1_free(GWEN_LIST1 *l) { if (l) { GWEN_FREE_OBJECT(l); } } int GWEN_List1_GetCount(const GWEN_LIST1 *l) { assert(l); return l->count; } int GWEN_List1_Add(GWEN_LIST1 *l, GWEN_LIST1_ELEMENT *el) { assert(l); assert(el); if (el->listPtr) { /* element is already part of another list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is already part of a list"); assert(0); return -1; } if (l->firstElement==0) l->firstElement=el; el->prevElement=l->lastElement; if (l->lastElement) l->lastElement->nextElement=el; l->lastElement=el; el->listPtr=l; l->count++; return 0; } int GWEN_List1_AddList(GWEN_LIST1 *dest, GWEN_LIST1 *l) { GWEN_LIST1_ELEMENT *el; assert(dest); assert(l); while ((el=l->firstElement)) { GWEN_List1_Del(el); GWEN_List1_Add(dest, el); } return 0; } int GWEN_List1_Insert(GWEN_LIST1 *l, GWEN_LIST1_ELEMENT *el) { assert(l); assert(el); if (el->listPtr) { /* element is already part of another list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is already part of a list"); return -1; } el->nextElement=l->firstElement; l->firstElement=el; if (l->lastElement==0) l->lastElement=el; if (el->nextElement) el->nextElement->prevElement=el; el->listPtr=l; l->count++; return 0; } int GWEN_List1_Del(GWEN_LIST1_ELEMENT *el) { GWEN_LIST1 *l; assert(el); l=el->listPtr; if (l==0) { /* not part of any list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is not part of any list"); return -1; } /* unlink from previous */ if (el->prevElement) el->prevElement->nextElement=el->nextElement; /* unlink from next */ if (el->nextElement) el->nextElement->prevElement=el->prevElement; /* unlink from list */ if (l->firstElement==el) l->firstElement=el->nextElement; if (l->lastElement==el) l->lastElement=el->prevElement; l->count--; el->nextElement=0; el->prevElement=0; el->listPtr=0; return 0; } void *GWEN_List1_GetFirst(const GWEN_LIST1 *l) { if (l->firstElement) return l->firstElement->data; return 0; } void *GWEN_List1_GetLast(const GWEN_LIST1 *l) { if (l->lastElement) return l->lastElement->data; return 0; } GWEN_LIST1_ELEMENT *GWEN_List1Element_new(void *d) { GWEN_LIST1_ELEMENT *el; GWEN_NEW_OBJECT(GWEN_LIST1_ELEMENT, el); el->data=d; return el; } void GWEN_List1Element_free(GWEN_LIST1_ELEMENT *el) { if (el) { if (el->listPtr) GWEN_List1_Del(el); GWEN_FREE_OBJECT(el); } } void *GWEN_List1Element_GetData(const GWEN_LIST1_ELEMENT *el) { return el->data; } void *GWEN_List1Element_GetPrevious(const GWEN_LIST1_ELEMENT *el) { if (el->prevElement) return el->prevElement->data; return 0; } void *GWEN_List1Element_GetNext(const GWEN_LIST1_ELEMENT *el) { if (el->nextElement) return el->nextElement->data; return 0; } #if 0 static int GWEN_List1__compar_asc(const void *a, const void *b) { const GWEN_LIST1_ELEMENT *const *pse1 = a, * const * pse2 = b; const GWEN_LIST1_ELEMENT *se1 = *pse1, *se2 = *pse2; return (se1->listPtr->sortFunction)(se1->data, se2->data, 1); } static int GWEN_List1__compar_desc(const void *a, const void *b) { const GWEN_LIST1_ELEMENT *const *pse1 = a, * const * pse2 = b; const GWEN_LIST1_ELEMENT *se1 = *pse1, *se2 = *pse2; return (se1->listPtr->sortFunction)(se1->data, se2->data, 0); } GWEN_LIST1_SORT_FN GWEN_List1_SetSortFn(GWEN_LIST1 *l, GWEN_LIST1_SORT_FN fn) { GWEN_LIST1_SORT_FN oldFn; assert(l); oldFn=l->sortFunction; l->sortFunction=fn; return oldFn; } void GWEN_List1_Sort(GWEN_LIST1 *l, int ascending) { GWEN_LIST1_ELEMENT **tmpEntries; GWEN_LIST1_ELEMENT *sentry; GWEN_LIST1_ELEMENT **psentry; uint32_t count; uint32_t i; if (l->count<1) return; count=l->count; /* sort entries into a linear pointer list */ tmpEntries=(GWEN_LIST1_ELEMENT **)malloc((count+1)* sizeof(GWEN_LIST1_ELEMENT *)); assert(tmpEntries); psentry=tmpEntries; sentry=l->firstElement; while (sentry) { GWEN_LIST1_ELEMENT *next; *(psentry++)=sentry; next=sentry->nextElement; sentry->prevElement=NULL; sentry->nextElement=NULL; sentry->listPtr=l; sentry=next; } /* while */ *psentry=NULL; /* clear list */ l->count=0; l->firstElement=NULL; l->lastElement=NULL; /* sort */ if (ascending) qsort(tmpEntries, count, sizeof(GWEN_LIST1_ELEMENT *), GWEN_List1__compar_asc); else qsort(tmpEntries, count, sizeof(GWEN_LIST1_ELEMENT *), GWEN_List1__compar_desc); /* sort entries back into GWEN_LIST1 according to temporary list */ psentry=tmpEntries; /* we use "<=count" because the list contains count+1 elements */ for (i=0; i<=count; i++) { if (*psentry) { (*psentry)->listPtr=NULL; GWEN_List1_Add(l, *psentry); } psentry++; } /* for */ free(tmpEntries); } #endif /* ------------------------------------------------------------------------------------------------- * Sort * ------------------------------------------------------------------------------------------------- */ static int GWEN_List1__compar(const void *a, const void *b) { const GWEN_LIST1_SORT_ELEM *const *pse1 = a, * const * pse2 = b; const GWEN_LIST1_SORT_ELEM *se1 = *pse1, *se2 = *pse2; const GWEN_LIST1_SORT_CTX *ctx=se1->context; const GWEN_LIST1_ELEMENT *e1=se1->element; const GWEN_LIST1_ELEMENT *e2=se2->element; return (ctx->list->sortFunction)(e1->data, e2->data, ctx->param); } GWEN_LIST1_SORT_FN GWEN_List1_SetSortFn(GWEN_LIST1 *l, GWEN_LIST1_SORT_FN fn) { GWEN_LIST1_SORT_FN oldFn; assert(l); oldFn=l->sortFunction; l->sortFunction=fn; return oldFn; } GWEN_LIST1_SORT_CTX *GWEN_List1_SortCtx_new(GWEN_LIST1 *list, int param) { GWEN_LIST1_SORT_CTX *ctx; GWEN_NEW_OBJECT(GWEN_LIST1_SORT_CTX, ctx); ctx->list=list; ctx->param=param; return ctx; } void GWEN_List1_SortCtx_free(GWEN_LIST1_SORT_CTX *ctx) { if (ctx) { GWEN_FREE_OBJECT(ctx); } } GWEN_LIST1_SORT_ELEM *GWEN_List1_SortElem_new(GWEN_LIST1_SORT_CTX *ctx, GWEN_LIST1_ELEMENT *elem) { GWEN_LIST1_SORT_ELEM *e; GWEN_NEW_OBJECT(GWEN_LIST1_SORT_ELEM, e); e->context=ctx; e->element=elem; return e; } void GWEN_List1_SortElem_free(GWEN_LIST1_SORT_ELEM *e) { if (e) { GWEN_FREE_OBJECT(e); } } void GWEN_List1_Sort(GWEN_LIST1 *l, int ascending) { GWEN_LIST1_SORT_ELEM **tmpEntries; GWEN_LIST1_SORT_ELEM **psentry; GWEN_LIST1_ELEMENT *sentry; uint32_t count; uint32_t i; GWEN_LIST1_SORT_CTX *sortContext; if (l->count<1) return; count=l->count; sortContext=GWEN_List1_SortCtx_new(l, ascending); /* sort entries into a linear pointer list */ tmpEntries=(GWEN_LIST1_SORT_ELEM **)malloc((count+1)* sizeof(GWEN_LIST1_SORT_ELEM *)); assert(tmpEntries); psentry=tmpEntries; sentry=l->firstElement; while (sentry) { GWEN_LIST1_ELEMENT *next; GWEN_LIST1_SORT_ELEM *se; se=GWEN_List1_SortElem_new(sortContext, sentry); *(psentry++)=se; next=sentry->nextElement; sentry->prevElement=NULL; sentry->nextElement=NULL; sentry->listPtr=l; sentry=next; } /* while */ *psentry=NULL; /* clear list */ l->count=0; l->firstElement=NULL; l->lastElement=NULL; /* sort */ qsort(tmpEntries, count, sizeof(GWEN_LIST1_SORT_ELEM *), GWEN_List1__compar); /* sort entries back into GWEN_LIST1 according to temporary list */ psentry=tmpEntries; /* we use "<=count" because the list contains count+1 elements */ for (i=0; i<=count; i++) { GWEN_LIST1_SORT_ELEM *se; se=*psentry; if (se) { sentry=se->element; sentry->listPtr=NULL; GWEN_List1_Add(l, sentry); GWEN_List1_SortElem_free(se); *psentry=NULL; } psentry++; } /* for */ free(tmpEntries); GWEN_List1_SortCtx_free(sortContext); } gwenhywfar-5.12.1/src/base/gwen_param_list2.tm20000644000175000017500000000033413644653711016276 00000000000000 GWEN_PARAM_LIST2 GWEN_Param_List2 gwenhywfar-5.12.1/src/base/multicache_p.h0000644000175000017500000001171613142134463015220 00000000000000/*************************************************************************** begin : Wed May 08 2013 copyright : (C) 2013 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_MULTICACHE_P_H #define GWENHYWFAR_MULTICACHE_P_H #include #include #include #include typedef struct GWEN_MULTICACHE_ENTRY GWEN_MULTICACHE_ENTRY; GWEN_LIST_FUNCTION_DEFS(GWEN_MULTICACHE_ENTRY, GWEN_MultiCache_Entry); GWEN_IDMAP_FUNCTION_DEFS(GWEN_MULTICACHE_ENTRY, GWEN_MultiCache_Entry); GWEN_LIST_FUNCTION_DEFS(GWEN_MULTICACHE_TYPE, GWEN_MultiCache_Type); struct GWEN_MULTICACHE_ENTRY { GWEN_LIST_ELEMENT(GWEN_MULTICACHE_ENTRY); GWEN_MULTICACHE_TYPE *cacheType; uint32_t id; uint32_t dataSize; void *dataPtr; uint32_t param1; uint32_t param2; uint32_t param3; uint32_t param4; double param5; }; static GWEN_MULTICACHE_ENTRY *GWEN_MultiCache_Entry_new(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *p, uint32_t i); static void GWEN_MultiCache_Entry_free(GWEN_MULTICACHE_ENTRY *e); static uint32_t GWEN_MultiCache_Entry_GetId(const GWEN_MULTICACHE_ENTRY *e); static uint32_t GWEN_MultiCache_Entry_GetDataSize(const GWEN_MULTICACHE_ENTRY *e); static void *GWEN_MultiCache_Entry_GetDataPtr(const GWEN_MULTICACHE_ENTRY *e); static GWEN_MULTICACHE_TYPE *GWEN_MultiCache_Entry_GetCacheType(const GWEN_MULTICACHE_ENTRY *e); static uint32_t GWEN_MultiCache_Entry_GetParam1(const GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_Entry_SetParam1(GWEN_MULTICACHE_ENTRY *e, uint32_t i); static uint32_t GWEN_MultiCache_Entry_GetParam2(const GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_Entry_SetParam2(GWEN_MULTICACHE_ENTRY *e, uint32_t i); static uint32_t GWEN_MultiCache_Entry_GetParam3(const GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_Entry_SetParam3(GWEN_MULTICACHE_ENTRY *e, uint32_t i); static uint32_t GWEN_MultiCache_Entry_GetParam4(const GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_Entry_SetParam4(GWEN_MULTICACHE_ENTRY *e, uint32_t i); static double GWEN_MultiCache_Entry_GetParam5(const GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_Entry_SetParam5(GWEN_MULTICACHE_ENTRY *e, double d); struct GWEN_MULTICACHE_TYPE { GWEN_LIST_ELEMENT(GWEN_MULTICACHE_TYPE); GWEN_MULTICACHE *multiCache; GWEN_MULTICACHE_ENTRY_IDMAP *entryMap; GWEN_MULTICACHE_TYPE_ATTACH_FN attachFn; GWEN_MULTICACHE_TYPE_FREE_FN freeFn; GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN attachObjectFn; GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN freeObjectFn; uint32_t _refCount; }; static int GWEN_MultiCache_Type_AttachData(const GWEN_MULTICACHE_TYPE *ct, void *p); static int GWEN_MultiCache_Type_FreeData(const GWEN_MULTICACHE_TYPE *ct, void *p); static void GWEN_MultiCache_Type_ReleaseEntry(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_ENTRY *e); struct GWEN_MULTICACHE { GWEN_MULTICACHE_TYPE_LIST *typeList; GWEN_MULTICACHE_ENTRY_LIST *entryList; uint64_t maxSize; uint64_t currentSize; uint64_t maxSizeUsed; uint64_t cacheHits; uint64_t cacheMisses; uint64_t cacheDrops; uint32_t _refCount; }; static int GWEN_MultiCache_AddEntry(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_ReleaseEntry(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_ReleaseEntriesForType(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_TYPE *ct); static void GWEN_MultiCache_UsingEntry(GWEN_MULTICACHE *mc, GWEN_MULTICACHE_ENTRY *e); static void GWEN_MultiCache_IncCacheHits(GWEN_MULTICACHE *mc); static void GWEN_MultiCache_IncCacheMisses(GWEN_MULTICACHE *mc); #endif gwenhywfar-5.12.1/src/base/ringbuffer.h0000666000175000017500000001750013473346361014726 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 25 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_RINGBUFFER_H #define GWEN_RINGBUFFER_H #include #include #ifdef __cplusplus extern "C" { #endif /** @defgroup MOD_RINGBUFFER Ringbuffer Management * @ingroup MOD_BASE * * @brief This file contains the definition of a GWEN_RINGBUFFER. * */ /*@{*/ typedef struct GWEN_RINGBUFFER GWEN_RINGBUFFER; /** @name Constructor And Destructor * */ /*@{*/ /** * Creates a new ring buffer * @param size maximum size of the ring buffer */ GWENHYWFAR_API GWEN_RINGBUFFER *GWEN_RingBuffer_new(unsigned int size); /** * Destructor. */ GWENHYWFAR_API void GWEN_RingBuffer_free(GWEN_RINGBUFFER *rb); /** @name Reading And Writing * */ /*@{*/ /** * Writes the given bytes into the ring buffer. * @param rb ring buffer * @param buffer pointer to bytes to write * @param size pointer to a variable that contains the number of bytes * to write. Upon return this variable contains the number of bytes actually * copied. */ GWENHYWFAR_API int GWEN_RingBuffer_WriteBytes(GWEN_RINGBUFFER *rb, const char *buffer, uint32_t *size); /** * Writes a single byte to the ring buffer. */ GWENHYWFAR_API int GWEN_RingBuffer_WriteByte(GWEN_RINGBUFFER *rb, char c); /** * Read bytes from the ring buffer. * @param rb ring buffer * @param buffer pointer to the destination buffer * @param size pointer to a variable that contains the number of bytes * to read. Upon return this variable contains the number of bytes actually * copied. */ GWENHYWFAR_API int GWEN_RingBuffer_ReadBytes(GWEN_RINGBUFFER *rb, char *buffer, uint32_t *size); /** * Reads a single byte from the ring buffer. */ GWENHYWFAR_API int GWEN_RingBuffer_ReadByte(GWEN_RINGBUFFER *rb); /*@}*/ /** @name Informational Functions * */ /*@{*/ /** * Returns the number of bytes stored inside the ring buffer. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetUsedBytes(const GWEN_RINGBUFFER *rb); /** * Returns the number of bytes which still can be stored inside the ring * buffer. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetBytesLeft(const GWEN_RINGBUFFER *rb); /** * Returns the size of the ring buffer. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetBufferSize(const GWEN_RINGBUFFER *rb); /*@}*/ /** @name Statistical Functions * */ /*@{*/ /** * Returns the number of times the buffer was empty. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetEmptyCounter(const GWEN_RINGBUFFER *rb); GWENHYWFAR_API void GWEN_RingBuffer_ResetEmptyCounter(GWEN_RINGBUFFER *rb); /** * Returns the number of times the buffer was full. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetFullCounter(const GWEN_RINGBUFFER *rb); GWENHYWFAR_API void GWEN_RingBuffer_ResetFullCounter(GWEN_RINGBUFFER *rb); /** * Returns the number of bytes which have passed through this buffer (i.e. * bytes that have been written to and read from the buffer. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetThroughput(GWEN_RINGBUFFER *rb); /** * Resets the buffers throughput counter to zero. */ GWENHYWFAR_API void GWEN_RingBuffer_ResetThroughput(GWEN_RINGBUFFER *rb); /** * Returns the maximum number of bytes which has been stored in the buffer. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetMaxUsedBytes(const GWEN_RINGBUFFER *rb); /** * Resets the counter for the maximum number of bytes stored in the * buffer. */ GWENHYWFAR_API void GWEN_RingBuffer_ResetMaxUsedBytes(GWEN_RINGBUFFER *rb); GWENHYWFAR_API void GWEN_RingBuffer_Reset(GWEN_RINGBUFFER *rb); /*@}*/ /* name */ /** @name Functions For Direct Manipulation Of The Buffer * * Please use these functions with care. These function are supported in order * to avoid unnecessary copying. */ /*@{*/ /** * Returns the maximum number of bytes which can be read with a following * call to @ref GWEN_RingBuffer_ReadBytes. This value (if not 0) can be * used for @ref GWEN_RingBuffer_SkipBytesRead. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetMaxUnsegmentedRead(GWEN_RINGBUFFER *rb); /** * Returns the maximum number of bytes which can be written with a following * call to @ref GWEN_RingBuffer_WriteBytes. This value (if not 0) can be * used for @ref GWEN_RingBuffer_SkipBytesWrite. */ GWENHYWFAR_API uint32_t GWEN_RingBuffer_GetMaxUnsegmentedWrite(GWEN_RINGBUFFER *rb); /** * Adjusts the internal pointers and statistical data as if * @ref GWEN_RingBuffer_ReadBytes had been called. Please note that the * size value given here MUST be <= the value returned by * @ref GWEN_RingBuffer_GetMaxUnsegmentedRead ! */ GWENHYWFAR_API void GWEN_RingBuffer_SkipBytesRead(GWEN_RINGBUFFER *rb, uint32_t psize); /** * Adjusts the internal pointers and statistical data as if * @ref GWEN_RingBuffer_WriteBytes had been called. Please note that the * size value given here MUST be <= the value returned by * @ref GWEN_RingBuffer_GetMaxUnsegmentedWrite ! */ GWENHYWFAR_API void GWEN_RingBuffer_SkipBytesWrite(GWEN_RINGBUFFER *rb, uint32_t psize); /** * Returne the current read pointer. Please note that the return value of * @ref GWEN_RingBuffer_GetMaxUnsegmentedRead indicates the maximum number * of bytes at this position available! Trying to access bytes beyond that * boundary will most likely result in segmentation faults. * Please make sure that you call @ref GWEN_RingBuffer_SkipBytesRead after * taking data from the buffer in order to keep the internal structure * intact. */ GWENHYWFAR_API const char *GWEN_RingBuffer_GetReadPointer(const GWEN_RINGBUFFER *rb); /** * Returne the current write pointer. Please note that the return value of * @ref GWEN_RingBuffer_GetMaxUnsegmentedWrite indicates the maximum number * of bytes at this position available! Trying to access bytes beyond that * boundary will most likely result in segmentation faults. * Please make sure that you call @ref GWEN_RingBuffer_SkipBytesWrite after * writing data to the buffer in order to keep the internal structure * intact. */ GWENHYWFAR_API char *GWEN_RingBuffer_GetWritePointer(const GWEN_RINGBUFFER *rb); /*@}*/ /* name */ /*@}*/ /* group */ #ifdef __cplusplus } #endif #endif /* GWEN_RINGBUFFER_H */ gwenhywfar-5.12.1/src/base/memory.c0000644000175000017500000000447613543433106014074 00000000000000/*************************************************************************** begin : Sat Jun 28 2003 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include void *GWEN_Memory_malloc(size_t wsize) { void *p; if (GWEN_UNLIKELY(wsize==0)) { fprintf(stderr, "GWEN error: allocating 0 bytes, maybe a program error\n"); abort(); } p=malloc(wsize); if (p==NULL) { fprintf(stderr, "GWEN error: Not allocated %lu bytes (memory full?)\n", (unsigned long int) wsize); } assert(p); return p; } void *GWEN_Memory_realloc(void *oldp, size_t nsize) { assert(oldp); assert(nsize); return realloc(oldp, nsize); } void GWEN_Memory_dealloc(void *p) { free(p); } char *GWEN_Memory_strdup(const char *s) { assert(s); return strdup(s); } gwenhywfar-5.12.1/src/base/buffer.c0000664000175000017500000006074514576364775014066 00000000000000/*************************************************************************** begin : Fri Sep 12 2003 copyright : (C) 2024 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "buffer_p.h" #include #include #include #include #include GWEN_BUFFER *GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take) { GWEN_BUFFER *bf; GWEN_NEW_OBJECT(GWEN_BUFFER, bf); bf->_refCount=1; if (!buffer) { /* allocate buffer */ bf->realPtr=(char *)GWEN_Memory_malloc(size?(size+1):0); assert(bf->realPtr); bf->ptr=bf->realPtr; bf->realBufferSize=size+1; bf->bufferSize=size+1; bf->flags=GWEN_BUFFER_FLAGS_OWNED; bf->bytesUsed=used; bf->ptr[0]=0; } else { /* use existing buffer */ bf->realPtr=buffer; bf->ptr=buffer; bf->realBufferSize=size; bf->bufferSize=size; bf->bytesUsed=used; if (take) bf->flags=GWEN_BUFFER_FLAGS_OWNED; } bf->mode=GWEN_BUFFER_MODE_DEFAULT; bf->hardLimit=GWEN_BUFFER_DEFAULT_HARDLIMIT; bf->step=GWEN_BUFFER_DYNAMIC_STEP; return bf; } void GWEN_Buffer_Attach(GWEN_BUFFER *bf) { assert(bf->_refCount); bf->_refCount++; } void GWEN_Buffer_free(GWEN_BUFFER *bf) { if (bf) { assert(bf->_refCount); if (bf->_refCount==1) { if (bf->flags & GWEN_BUFFER_FLAGS_OWNED) GWEN_Memory_dealloc(bf->realPtr); GWEN_FREE_OBJECT(bf); } else bf->_refCount--; } } GWEN_BUFFER *GWEN_Buffer_dup(GWEN_BUFFER *bf) { GWEN_BUFFER *newbf; uint32_t i; GWEN_NEW_OBJECT(GWEN_BUFFER, newbf); newbf->_refCount=1; if (bf->realPtr && bf->realBufferSize) { newbf->realPtr=(char *)GWEN_Memory_malloc((bf->realBufferSize)?(bf->realBufferSize+1):0); newbf->ptr=newbf->realPtr+(bf->ptr-bf->realPtr); newbf->realBufferSize=bf->realBufferSize; newbf->bufferSize=bf->bufferSize; newbf->bytesUsed=bf->bytesUsed; if (newbf->bytesUsed) { unsigned int toCopy; toCopy=bf->bytesUsed+1; if (toCopy>(newbf->bufferSize)) { fprintf(stderr, "Panic: Too many bytes in buffer"); abort(); } memmove(newbf->ptr, bf->ptr, toCopy); } newbf->pos=bf->pos; } newbf->flags=bf->flags | GWEN_BUFFER_FLAGS_OWNED; newbf->mode=bf->mode&GWEN_BUFFER_MODE_COPYMASK; newbf->hardLimit=bf->hardLimit; newbf->step=bf->step; for (i=0; ibookmarks[i]=bf->bookmarks[i]; return newbf; } int GWEN_Buffer_Relinquish(GWEN_BUFFER *bf) { assert(bf); if (!(bf->flags & GWEN_BUFFER_FLAGS_OWNED)) return GWEN_ERROR_INVALID; if (bf->realPtr!=bf->ptr) return GWEN_ERROR_INVALID; bf->flags&=~GWEN_BUFFER_FLAGS_OWNED; return 0; } int GWEN_Buffer_ReserveBytes(GWEN_BUFFER *bf, uint32_t res) { assert(bf); if (!res) return 0; if (bf->bytesUsed) { /* we need to move data */ if (GWEN_Buffer_AllocRoom(bf, res)) return -1; memmove(bf->ptr+res, bf->ptr, bf->bytesUsed); bf->ptr+=res; bf->bufferSize-=res; return 0; } else { /* no data in buffer, so simply move ptrs */ if (GWEN_Buffer_AllocRoom(bf, res)) return -1; bf->ptr+=res; bf->bufferSize-=res; if (bf->bufferSize) bf->ptr[0]=0; return 0; } } uint32_t GWEN_Buffer_GetMode(GWEN_BUFFER *bf) { assert(bf); return bf->mode; } void GWEN_Buffer_SetMode(GWEN_BUFFER *bf, uint32_t mode) { assert(bf); bf->mode=mode; } void GWEN_Buffer_AddMode(GWEN_BUFFER *bf, uint32_t mode) { assert(bf); bf->mode|=mode; } void GWEN_Buffer_SubMode(GWEN_BUFFER *bf, uint32_t mode) { assert(bf); bf->mode&=~mode; } uint32_t GWEN_Buffer_GetHardLimit(GWEN_BUFFER *bf) { assert(bf); return bf->hardLimit; } void GWEN_Buffer_SetHardLimit(GWEN_BUFFER *bf, uint32_t l) { assert(bf); assert(l); bf->hardLimit=l; } char *GWEN_Buffer_GetStart(const GWEN_BUFFER *bf) { assert(bf); return bf->ptr; } uint32_t GWEN_Buffer_GetSize(const GWEN_BUFFER *bf) { assert(bf); if (bf->mode & GWEN_BUFFER_MODE_DYNAMIC) return bf->hardLimit; return bf->bufferSize; } uint32_t GWEN_Buffer_GetPos(const GWEN_BUFFER *bf) { assert(bf); return bf->pos; } int GWEN_Buffer_SetPos(GWEN_BUFFER *bf, uint32_t i) { assert(bf); if (i>=bf->bufferSize) { DBG_ERROR(GWEN_LOGDOMAIN, "Position %d outside buffer boundaries (%d bytes)", i, (int)(bf->bufferSize)); return GWEN_ERROR_BUFFER_OVERFLOW; } bf->pos=i; return 0; } uint32_t GWEN_Buffer_GetUsedBytes(const GWEN_BUFFER *bf) { assert(bf); return bf->bytesUsed; } int GWEN_Buffer_AllocRoom(GWEN_BUFFER *bf, uint32_t size) { assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } /*DBG_VERBOUS(GWEN_LOGDOMAIN, "Allocating %d bytes", size);*/ if (bf->bytesUsed+(size+1) > bf->bufferSize) { /* need to realloc */ uint32_t nsize; uint32_t noffs; uint32_t reserved; void *p; /* check for dynamic mode */ if (!(bf->mode & GWEN_BUFFER_MODE_DYNAMIC)) { DBG_ERROR(GWEN_LOGDOMAIN, "Not in dynamic mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_BUFFER_OVERFLOW; } /* calculate reserved bytes (to set ptr later) */ reserved=bf->ptr-bf->realPtr; /* this is the raw number of bytes we need (we always add a NULL * character) */ nsize=bf->bytesUsed+(size+1)-bf->bufferSize; /* round it up */ nsize=(nsize+(bf->step-1)); nsize&=~(bf->step-1); /* store number of additional bytes to allocate */ noffs=nsize; /* add current size to it */ nsize+=bf->realBufferSize; if (nsize>bf->hardLimit) { DBG_ERROR(GWEN_LOGDOMAIN, "Size is beyond hard limit (%d>%d)", (int) nsize, (int)(bf->hardLimit)); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_BUFFER_OVERFLOW; } /*DBG_VERBOUS(GWEN_LOGDOMAIN, "Reallocating from %d to %d bytes", bf->bufferSize, nsize);*/ if (bf->realPtr==NULL) { p=GWEN_Memory_malloc(nsize?(nsize+1):0); } else { p=GWEN_Memory_realloc(bf->realPtr, nsize?(nsize+1):0); } if (!p) { DBG_ERROR(GWEN_LOGDOMAIN, "Realloc failed."); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_MEMORY_FULL; } /* store new size and pointer */ bf->realPtr=(char *)p; bf->ptr=bf->realPtr+reserved; bf->realBufferSize=nsize; bf->bufferSize+=noffs; } return 0; } int GWEN_Buffer_AppendBytes(GWEN_BUFFER *bf, const char *buffer, uint32_t size) { int rv; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } rv=GWEN_Buffer_AllocRoom(bf, size+1); if (rv<0) { DBG_DEBUG(GWEN_LOGDOMAIN, "called from here"); return rv; } memmove(bf->ptr+bf->bytesUsed, buffer, size); if (bf->pos==bf->bytesUsed) bf->pos+=size; bf->bytesUsed+=size; /* append a NULL to allow using the buffer as ASCIIZ string */ bf->ptr[bf->bytesUsed]=0; return 0; } int GWEN_Buffer_AppendByte(GWEN_BUFFER *bf, char c) { int rv; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } if (bf->bytesUsed+1+1 > bf->bufferSize) { rv=GWEN_Buffer_AllocRoom(bf, 1+1); if (rv<0) { DBG_DEBUG(GWEN_LOGDOMAIN, "here"); return rv; } } bf->ptr[bf->bytesUsed]=c; if (bf->pos == bf->bytesUsed) bf->pos++; /* append a NULL to allow using the buffer as ASCIIZ string */ bf->ptr[++(bf->bytesUsed)]=0; return 0; } int GWEN_Buffer_PeekByte(GWEN_BUFFER *bf) { assert(bf); if (bf->pos>=bf->bytesUsed) { return GWEN_ERROR_EOF; } return (unsigned char)(bf->ptr[bf->pos]); } int GWEN_Buffer_ReadByte(GWEN_BUFFER *bf) { assert(bf); if (bf->pos>=bf->bytesUsed) { return GWEN_ERROR_EOF; } return (unsigned char)(bf->ptr[bf->pos++]); } int GWEN_Buffer_IncrementPos(GWEN_BUFFER *bf, uint32_t i) { assert(bf); if (i+bf->pos>=bf->bufferSize) { DBG_DEBUG(GWEN_LOGDOMAIN, "Position %d outside buffer boundaries (%d bytes)\n" "Incrementing anyway", i+bf->pos, bf->bufferSize); } bf->pos+=i; return 0; } int GWEN_Buffer_AdjustUsedBytes(GWEN_BUFFER *bf) { assert(bf); if (bf->pos<=bf->bufferSize) { if (bf->pos>bf->bytesUsed) { DBG_DEBUG(GWEN_LOGDOMAIN, "Adjusted buffer (uses now %d bytes)", bf->pos); bf->bytesUsed=bf->pos; } /* append a NULL to allow using the buffer as ASCIIZ string */ bf->ptr[bf->bytesUsed]=0; /* TODO: This has to be checked (is it okay to add a byte here?)! */ return 0; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Pointer outside buffer size (%d bytes)", (int)(bf->bufferSize)); return GWEN_ERROR_BUFFER_OVERFLOW; } } int GWEN_Buffer_DecrementPos(GWEN_BUFFER *bf, uint32_t i) { assert(bf); if (bf->pospos-i, bf->bufferSize); return GWEN_ERROR_BUFFER_OVERFLOW; } bf->pos-=i; return 0; } int GWEN_Buffer_AppendBuffer(GWEN_BUFFER *bf, GWEN_BUFFER *sf) { assert(bf); assert(sf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } if (sf->bytesUsed) return GWEN_Buffer_AppendBytes(bf, sf->ptr, sf->bytesUsed); return 0; } uint32_t GWEN_Buffer_GetMaxUnsegmentedWrite(GWEN_BUFFER *bf) { assert(bf); return (bf->bufferSize-(bf->bytesUsed+1)); } uint32_t GWEN_Buffer_GetBytesLeft(GWEN_BUFFER *bf) { assert(bf); if (bf->posbytesUsed) return bf->bytesUsed-bf->pos; else return 0; } char *GWEN_Buffer_GetPosPointer(const GWEN_BUFFER *bf) { assert(bf); return bf->ptr+bf->pos; } void GWEN_Buffer_OverwriteContent(GWEN_BUFFER *bf, int c) { assert(bf); if (bf->realPtr && bf->realBufferSize) { memset(bf->realPtr, c, bf->realBufferSize); } } uint32_t GWEN_Buffer_GetBookmark(const GWEN_BUFFER *bf, unsigned int idx) { assert(bf); assert(idxbookmarks[idx]; } void GWEN_Buffer_SetBookmark(GWEN_BUFFER *bf, unsigned int idx, uint32_t v) { assert(bf); assert(idxbookmarks[idx]=v; } void GWEN_Buffer_Dump(GWEN_BUFFER *bf, unsigned int insert) { uint32_t k; for (k=0; kpos, bf->pos); for (k=0; kbufferSize); for (k=0; krealBufferSize); for (k=0; khardLimit); for (k=0; kbytesUsed); for (k=0; kptr-bf->realPtr)); for (k=0; kflags); if (bf->flags & GWEN_BUFFER_FLAGS_OWNED) fprintf(stderr, "OWNED "); fprintf(stderr, ")\n"); for (k=0; kmode); if (bf->mode & GWEN_BUFFER_MODE_DYNAMIC) fprintf(stderr, "DYNAMIC "); if (bf->mode & GWEN_BUFFER_MODE_READONLY) fprintf(stderr, "READONLY "); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) fprintf(stderr, "ABORT_ON_MEMFULL "); fprintf(stderr, ")\n"); for (k=0; kbookmarks[k]); fprintf(stderr, "\n"); if (bf->ptr && bf->bytesUsed) { for (k=0; kptr, bf->bytesUsed, insert+1); } } void GWEN_Buffer_Reset(GWEN_BUFFER *bf) { assert(bf); bf->pos=0; bf->bytesUsed=0; bf->ptr[0]=0; } void GWEN_Buffer_Rewind(GWEN_BUFFER *bf) { assert(bf); bf->pos=0; } int GWEN_Buffer_ReadBytes(GWEN_BUFFER *bf, char *buffer, uint32_t *size) { /* optimized for speed */ uint32_t i; char *pdst; DBG_VERBOUS(GWEN_LOGDOMAIN, "About to copy up to %d bytes", *size); i=0; pdst=buffer; while (i<*size) { int j; int srcLeft; if (bf->pos>=bf->bytesUsed) break; srcLeft=bf->bytesUsed - bf->pos; if (srcLeft==0) break; j=(*size)-i; if (j>srcLeft) j=srcLeft; DBG_VERBOUS(GWEN_LOGDOMAIN, "Copying %d bytes", j); memmove(pdst, bf->ptr + bf->pos, j); pdst+=j; i+=j; bf->pos+=j; } /* while */ *size=i; DBG_VERBOUS(GWEN_LOGDOMAIN, "Copied %d bytes", *size); return 0; } uint32_t GWEN_Buffer_GetStep(GWEN_BUFFER *bf) { assert(bf); return bf->step; } void GWEN_Buffer_SetStep(GWEN_BUFFER *bf, uint32_t step) { assert(bf); bf->step=step; } void GWEN_Buffer_AdjustBookmarks(GWEN_BUFFER *bf, uint32_t pos, int offset) { uint32_t i; assert(bf); for (i=0; ibookmarks[i]>=pos) bf->bookmarks[i]+=offset; } /* for */ } int GWEN_Buffer_InsertRoom(GWEN_BUFFER *bf, uint32_t size) { char *p; int i; int rv; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } if (bf->pos==0) { if (bf->bytesUsed==0) { /* no bytes used, simply return */ rv=GWEN_Buffer_AllocRoom(bf, size); if (rv) { DBG_DEBUG(GWEN_LOGDOMAIN, "called from here"); return rv; } bf->bytesUsed+=size; /* append "0" behind buffer */ bf->ptr[bf->bytesUsed]=0; return 0; } else { if ((bf->ptr - bf->realPtr) >= (int)size) { /* simply occupy the reserved space */ bf->ptr-=size; bf->bytesUsed+=size; bf->bufferSize+=size; GWEN_Buffer_AdjustBookmarks(bf, bf->pos, size); return 0; } } } rv=GWEN_Buffer_AllocRoom(bf, size); if (rv<0) { DBG_DEBUG(GWEN_LOGDOMAIN, "called from here"); return rv; } assert(bf->pos<=bf->bytesUsed); p=bf->ptr+bf->pos; i=bf->bytesUsed-bf->pos; if (i>0) /* move current data at pos out of the way */ memmove(p+size, p, i); bf->bytesUsed+=size; /* append "0" behind buffer */ bf->ptr[bf->bytesUsed]=0; GWEN_Buffer_AdjustBookmarks(bf, bf->pos, size); return 0; } int GWEN_Buffer_RemoveRoom(GWEN_BUFFER *bf, uint32_t size) { char *p; int i; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } if (bf->bytesUsedpos) { /* can't remove more bytes than we have */ return GWEN_ERROR_INVALID; } if (bf->pos==0) { /* simply add to reserved space */ bf->ptr+=size; bf->bytesUsed-=size; bf->bufferSize-=size; } else { /* we need to get the rest closer */ p=bf->ptr+bf->pos+size; i=bf->bytesUsed-bf->pos-size; memmove(bf->ptr+bf->pos, p, i); bf->bytesUsed-=size; } /* append "0" behind buffer */ bf->ptr[bf->bytesUsed]=0; GWEN_Buffer_AdjustBookmarks(bf, bf->pos, -((int)size)); return 0; } int GWEN_Buffer_ReplaceBytes(GWEN_BUFFER *bf, uint32_t rsize, const char *buffer, uint32_t size) { int32_t d; int rv; if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } /* either insert or remove bytes */ d=size-rsize; if (d<0) { rv=GWEN_Buffer_RemoveRoom(bf, -d); } else if (d>0) { rv=GWEN_Buffer_InsertRoom(bf, d); } else /* nothing to adjust if sizes are the same */ rv=0; if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Error replacing %d bytes with %d bytes (%d)", rsize, size, rv); return rv; } /* write new bytes */ if (size) memmove(bf->ptr+bf->pos, buffer, size); return 0; } int GWEN_Buffer_InsertBytes(GWEN_BUFFER *bf, const char *buffer, uint32_t size) { int rv; assert(bf); assert(buffer); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } rv=GWEN_Buffer_InsertRoom(bf, size); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } memmove(bf->ptr+bf->pos, buffer, size); return 0; } int GWEN_Buffer_InsertByte(GWEN_BUFFER *bf, char c) { int rv; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } rv=GWEN_Buffer_InsertRoom(bf, 1); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } bf->ptr[bf->pos]=c; return 0; } int GWEN_Buffer_InsertBuffer(GWEN_BUFFER *bf, GWEN_BUFFER *sf) { assert(bf); assert(sf); return GWEN_Buffer_InsertBytes(bf, sf->ptr, sf->bytesUsed); } int GWEN_Buffer_Crop(GWEN_BUFFER *bf, uint32_t pos, uint32_t l) { int offset; if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } if (pos>=bf->bufferSize) { DBG_ERROR(GWEN_LOGDOMAIN, "Position outside buffer"); return -1; } if (bf->bytesUsed-posptr+=pos; bf->bufferSize-=pos; if (bf->pos>pos) offset=pos; else offset=bf->pos; bf->pos-=offset; bf->bytesUsed=l; /* adjust position after possible truncation */ if (bf->pos>bf->bytesUsed) bf->pos=bf->bytesUsed; bf->ptr[bf->bytesUsed]=0; GWEN_Buffer_AdjustBookmarks(bf, offset, -offset); return 0; } int GWEN_Buffer_AppendString(GWEN_BUFFER *bf, const char *buffer) { assert(bf); assert(buffer); return GWEN_Buffer_AppendBytes(bf, buffer, strlen(buffer)); } int GWEN_Buffer_InsertString(GWEN_BUFFER *bf, const char *buffer) { assert(bf); assert(buffer); return GWEN_Buffer_InsertBytes(bf, buffer, strlen(buffer)); } int GWEN_Buffer_FillWithBytes(GWEN_BUFFER *bf, unsigned char c, uint32_t size) { int rv; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } rv=GWEN_Buffer_AllocRoom(bf, size+1); if (rv<0) { DBG_DEBUG(GWEN_LOGDOMAIN, "called from here"); return rv; } memset(bf->ptr+bf->bytesUsed, c, size); if (bf->pos==bf->bytesUsed) bf->pos+=size; bf->bytesUsed+=size; /* append a NULL to allow using the buffer as ASCIIZ string */ bf->ptr[bf->bytesUsed]=0; return 0; } int GWEN_Buffer_FillLeftWithBytes(GWEN_BUFFER *bf, unsigned char c, uint32_t size) { int rv; assert(bf); if (bf->mode & GWEN_BUFFER_MODE_READONLY) { DBG_ERROR(GWEN_LOGDOMAIN, "Read-only mode"); if (bf->mode & GWEN_BUFFER_MODE_ABORT_ON_MEMFULL) { abort(); } return GWEN_ERROR_PERMISSIONS; } rv=GWEN_Buffer_InsertRoom(bf, size); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return -1; } memset(bf->ptr+bf->pos, c, size); return 0; } int GWENHYWFAR_CB GWEN_Buffer_CacheFn_Attach(void *ptr) { GWEN_Buffer_Attach((GWEN_BUFFER *) ptr); return 0; } int GWENHYWFAR_CB GWEN_Buffer_CacheFn_Free(void *ptr) { GWEN_Buffer_free((GWEN_BUFFER *) ptr); return 0; } int GWEN_Buffer_AppendArgs(GWEN_BUFFER *bf, const char *fmt, ...) { va_list list; char *p; int maxUnsegmentedWrite; int rv; GWEN_Buffer_AllocRoom(bf, 256); maxUnsegmentedWrite=GWEN_Buffer_GetMaxUnsegmentedWrite(bf); p=GWEN_Buffer_GetStart(bf)+GWEN_Buffer_GetPos(bf); /* prepare list for va_arg */ va_start(list, fmt); rv=vsnprintf(p, maxUnsegmentedWrite, fmt, list); va_end(list); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on vnsprintf (%d)", rv); return GWEN_ERROR_GENERIC; } else if (rv>=maxUnsegmentedWrite) { GWEN_Buffer_AllocRoom(bf, rv+1); maxUnsegmentedWrite=GWEN_Buffer_GetMaxUnsegmentedWrite(bf); p=GWEN_Buffer_GetStart(bf)+GWEN_Buffer_GetPos(bf); va_start(list, fmt); rv=vsnprintf(p, maxUnsegmentedWrite, fmt, list); va_end(list); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error on vnsprintf (%d)", rv); return GWEN_ERROR_GENERIC; } } if (rv>0) { GWEN_Buffer_IncrementPos(bf, rv); GWEN_Buffer_AdjustUsedBytes(bf); } return 0; } int GWEN_Buffer_KeepTextBetweenStrings(GWEN_BUFFER *bf, const char *openingString, const char *closingString, int onlyBetween) { const char *ptr; ptr=GWEN_Text_StrCaseStr(bf->ptr, openingString); if (ptr) { int startPos=-1; int endPos=-1; startPos=(ptr-bf->ptr); if (onlyBetween) startPos+=strlen(openingString); ptr+=strlen(openingString); ptr=GWEN_Text_StrCaseStr(ptr, closingString); if (ptr) { endPos=(ptr-bf->ptr); if (!onlyBetween) endPos+=strlen(closingString); } if (endPos!=-1) GWEN_Buffer_Crop(bf, startPos, (endPos-startPos)); else GWEN_Buffer_Crop(bf, startPos, (bf->bytesUsed-startPos)+1); return 0; } return GWEN_ERROR_NOT_FOUND; } #include "buffer-t.c" gwenhywfar-5.12.1/src/base/i18n.h0000644000175000017500000000475013142134463013342 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Fri Sep 12 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_I18N_H #define GWENHYWFAR_I18N_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API int GWEN_I18N_SetLocale(const char *s); /** * Gwenhywfar remains the owner of the object returned (if any), so you * MUST NOT free it. */ GWENHYWFAR_API GWEN_STRINGLIST *GWEN_I18N_GetCurrentLocaleList(void); GWENHYWFAR_API const char *GWEN_I18N_GetCurrentLocale(void); GWENHYWFAR_API const char *GWEN_I18N_Translate(const char *textdomain, const char *text); GWENHYWFAR_API int GWEN_I18N_BindTextDomain_Dir(const char *textdomain, const char *folder); GWENHYWFAR_API int GWEN_I18N_BindTextDomain_Codeset(const char *textdomain, const char *cs); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/base/memcache_p.h0000644000175000017500000000541713142134475014650 00000000000000/*************************************************************************** begin : Mon Jul 14 2008 copyright : (C) 2008 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_MEMCACHE_P_H #define GWENHYWFAR_MEMCACHE_P_H #include #include #include GWEN_IDMAP_FUNCTION_DEFS(GWEN_MEMCACHE_ENTRY, GWEN_MemCacheEntry) struct GWEN_MEMCACHE_ENTRY { GWEN_MEMCACHE *memCache; uint32_t id; int useCounter; time_t unusedSince; void *dataPtr; size_t dataLen; int isValid; }; GWEN_MEMCACHE_ENTRY *GWEN_MemCacheEntry_new(GWEN_MEMCACHE *memCache, uint32_t id, void *dataPtr, size_t dataLen); int GWEN_MemCacheEntry_GetUseCounter(const GWEN_MEMCACHE_ENTRY *me); time_t GWEN_MemCacheEntry_GetUnusedSince(GWEN_MEMCACHE_ENTRY *me); void GWEN_MemCacheEntry_SetIsValid(GWEN_MEMCACHE_ENTRY *me, int b); struct GWEN_MEMCACHE { GWEN_MEMCACHE_ENTRY_IDMAP *idMap; size_t maxCacheMemory; uint32_t maxCacheEntries; size_t currentCacheMemory; uint32_t currentCacheEntries; GWEN_MUTEX *mutex; }; int GWEN_MemCache_Lock(GWEN_MEMCACHE *mc); int GWEN_MemCache_Unlock(GWEN_MEMCACHE *mc); int GWEN_MemCache__MakeRoom(GWEN_MEMCACHE *mc, size_t neededSize); #endif gwenhywfar-5.12.1/src/base/idmap.c0000644000175000017500000002762613142134475013662 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: idlist.c 705 2005-02-23 02:16:57Z aquamaniac $ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "idmap_p.h" #include #include #include #include #include GWEN_IDMAP *GWEN_IdMap_new(GWEN_IDMAP_ALGO algo) { GWEN_IDMAP *map; GWEN_NEW_OBJECT(GWEN_IDMAP, map); map->algo=algo; switch (algo) { case GWEN_IdMapAlgo_Hex4: GWEN_IdMapHex4_Extend(map); break; case GWEN_IdMapAlgo_Unknown: default: DBG_ERROR(GWEN_LOGDOMAIN, "Unknown algo %d", algo); GWEN_IdMap_free(map); return 0; } return map; } void GWEN_IdMap_free(GWEN_IDMAP *map) { assert(map); if (map->freeDataFn) map->freeDataFn(map); GWEN_FREE_OBJECT(map); } GWEN_IDMAP_RESULT GWEN_IdMap_Insert(GWEN_IDMAP *map, uint32_t id, void *ptr) { assert(map); assert(ptr); assert(map->setPairFn); return map->setPairFn(map, id, ptr); } GWEN_IDMAP_RESULT GWEN_IdMap_Remove(GWEN_IDMAP *map, uint32_t id) { assert(map); assert(map->setPairFn); return map->setPairFn(map, id, 0); } void *GWEN_IdMap_Find(GWEN_IDMAP *map, uint32_t id) { assert(map); assert(map->getPairFn); return map->getPairFn(map, id); } GWEN_IDMAP_RESULT GWEN_IdMap_GetFirst(const GWEN_IDMAP *map, uint32_t *pid) { assert(map); assert(map->findFirstFn); return map->findFirstFn(map, pid); } GWEN_IDMAP_RESULT GWEN_IdMap_GetNext(const GWEN_IDMAP *map, uint32_t *pid) { assert(map); assert(map->findNextFn); return map->findNextFn(map, pid); } uint32_t GWEN_IdMap_GetSize(const GWEN_IDMAP *map) { assert(map); return map->count; } void GWEN_IdMap_Clear(GWEN_IDMAP *map) { assert(map); if (map->freeDataFn) map->freeDataFn(map); map->algoData=0; switch (map->algo) { case GWEN_IdMapAlgo_Hex4: GWEN_IdMapHex4_Extend(map); break; case GWEN_IdMapAlgo_Unknown: default: DBG_ERROR(GWEN_LOGDOMAIN, "Unknown algo %d", map->algo); } } void GWEN_IdMap_Dump(GWEN_IDMAP *map, FILE *f, int indent) { assert(map); if (map->dumpFn) map->dumpFn(map, f, indent); else { DBG_ERROR(GWEN_LOGDOMAIN, "No dump fn"); } } /* _________________________________________________________________________ * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * Algo: HEX4 * YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY */ void GWEN_IdMapHex4_Extend(GWEN_IDMAP *map) { GWEN_IDMAP_HEX4 *xmap; GWEN_NEW_OBJECT(GWEN_IDMAP_HEX4, xmap); xmap->table=GWEN_IdMapHex4Map_new(0, 0); map->algoData=(void *)xmap; map->setPairFn=GWEN_IdMapHex4_Insert; map->getPairFn=GWEN_IdMapHex4_Find; map->findFirstFn=GWEN_IdMapHex4_FindFirst; map->findNextFn=GWEN_IdMapHex4_FindNext; map->freeDataFn=GWEN_IdMapHex4_free; map->dumpFn=GWEN_IdMapHex4_Dump; } void GWEN_IdMapHex4_free(GWEN_IDMAP *map) { GWEN_IDMAP_HEX4 *xmap; xmap=(GWEN_IDMAP_HEX4 *)map->algoData; GWEN_IdMapHex4Map_free(xmap->table); GWEN_FREE_OBJECT(xmap); } GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4Map_new(GWEN_IDMAP_HEX4_TABLE *p, int isPtrTable) { GWEN_IDMAP_HEX4_TABLE *t; GWEN_NEW_OBJECT(GWEN_IDMAP_HEX4_TABLE, t); t->parent=p; t->isPtrTable=isPtrTable; return t; } void GWEN_IdMapHex4Map_free(GWEN_IDMAP_HEX4_TABLE *t) { if (t) { if (!(t->isPtrTable)) { int i; for (i=0; i<16; i++) { if (t->ptrs[i]) GWEN_IdMapHex4Map_free(t->ptrs[i]); } } GWEN_FREE_OBJECT(t); } } GWEN_IDMAP_RESULT GWEN_IdMapHex4_Insert(GWEN_IDMAP *map, uint32_t id, void *ptr) { GWEN_IDMAP_HEX4 *xmap; void **p; GWEN_IDMAP_HEX4_TABLE *t; xmap=(GWEN_IDMAP_HEX4 *)map->algoData; t=xmap->table; p=&(t->ptrs[(id>>28) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 0); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>24) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 0); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>20) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 0); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>16) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 0); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>12) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 0); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>8) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 0); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>4) & 0xf]); if (!*p) { if (ptr==0) return GWEN_IdMapResult_NotFound; *p=(void *)GWEN_IdMapHex4Map_new(t, 1); } t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[id & 0xf]); *p=ptr; if (ptr==0) { assert(map->count); map->count--; /* do some cleanup */ for (;;) { GWEN_IDMAP_HEX4_TABLE *parent; int i; parent=t->parent; id>>=4; if (parent==0) break; for (i=0; i<16; i++) { if (t->ptrs[i]!=0) break; } if (i<16) break; /* DBG_ERROR(0, "Deleting table %x", id); */ GWEN_IdMapHex4Map_free(t); parent->ptrs[id & 0xf]=0; t=parent; } } else map->count++; return GWEN_IdMapResult_Ok; } void *GWEN_IdMapHex4_Find(GWEN_IDMAP *map, uint32_t id) { GWEN_IDMAP_HEX4 *xmap; GWEN_IDMAP_HEX4_TABLE *t; xmap=(GWEN_IDMAP_HEX4 *)map->algoData; t=xmap->table; if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>28)&0xf]); if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>24)&0xf]); if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>20)&0xf]); if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>16)&0xf]); if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>12)&0xf]); if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>8)&0xf]); if (!t) return 0; t=(GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[(id>>4)&0xf]); if (!t) return 0; return (t->ptrs[id & 0xf]); } GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4__GetTable(GWEN_IDMAP_HEX4_TABLE *t, uint32_t id) { void **p; p=&(t->ptrs[(id>>28) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>24) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>20) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>16) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>12) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>8) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; p=&(t->ptrs[(id>>4) & 0xf]); if (!*p) return 0; t=(GWEN_IDMAP_HEX4_TABLE *) *p; return t; } GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4__GetFirstTable(GWEN_IDMAP_HEX4_TABLE *t, uint32_t *pid) { uint32_t id; int i; /* id=*pid; */ id=0; for (i=0; i<16; i++) { if (t->ptrs[i]) { uint32_t lid; lid=(id<<4) | i; if (t->isPtrTable) { *pid=lid; return t; } else { GWEN_IDMAP_HEX4_TABLE *dt; dt=GWEN_IdMapHex4__GetFirstTable((GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[i]), &lid); if (dt) { *pid=lid; return dt; } } } } return 0; } GWEN_IDMAP_HEX4_TABLE *GWEN_IdMapHex4__GetNextTable(GWEN_IDMAP_HEX4_TABLE *t, uint32_t *pid, int incr) { uint32_t id; id=*pid; while (t) { int i; if (incr) { while (t && (id & 0xf)==0xf) { t=t->parent; id>>=4; } if (!t) return 0; id++; } for (i=id & 0xf; i<16; i++) { if (t->ptrs[i]) { uint32_t lid; lid=((id & 0xfffffff0) | i); if (t->isPtrTable) { *pid=lid; return t; } else { GWEN_IDMAP_HEX4_TABLE *dt; lid=lid<<4; dt=GWEN_IdMapHex4__GetNextTable((GWEN_IDMAP_HEX4_TABLE *)(t->ptrs[i]), &lid, 0); if (dt) { *pid=lid; return dt; } } } } id>>=4; t=t->parent; } return 0; } GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindFirst(const GWEN_IDMAP *map, uint32_t *pid) { GWEN_IDMAP_HEX4_TABLE *t; GWEN_IDMAP_HEX4 *xmap; uint32_t id; xmap=(GWEN_IDMAP_HEX4 *)map->algoData; t=GWEN_IdMapHex4__GetFirstTable(xmap->table, &id); if (t) { *pid=id; return GWEN_IdMapResult_Ok; } return GWEN_IdMapResult_NotFound; } GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindNext(const GWEN_IDMAP *map, uint32_t *pid) { GWEN_IDMAP_HEX4_TABLE *t; GWEN_IDMAP_HEX4 *xmap; uint32_t id; xmap=(GWEN_IDMAP_HEX4 *)map->algoData; id=*pid; t=GWEN_IdMapHex4__GetTable(xmap->table, id); assert(t); t=GWEN_IdMapHex4__GetNextTable(t, &id, 1); if (t) { *pid=id; return GWEN_IdMapResult_Ok; } return GWEN_IdMapResult_NotFound; } void GWEN_IdMapHex4__Dump(GWEN_IDMAP_HEX4_TABLE *tbl, FILE *f, int indent) { int i; for (i=0; i<16; i++) { int j; if (tbl->ptrs[i]) { for (j=0; jptrs[i]); if (!(tbl->isPtrTable)) GWEN_IdMapHex4__Dump(tbl->ptrs[i], f, indent+2); } } } void GWEN_IdMapHex4_Dump(GWEN_IDMAP *map, FILE *f, int indent) { GWEN_IDMAP_HEX4 *xmap; xmap=(GWEN_IDMAP_HEX4 *)map->algoData; GWEN_IdMapHex4__Dump(xmap->table, f, indent); } gwenhywfar-5.12.1/src/base/debug_p.h0000644000175000017500000000632713142134474014174 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Sun Jan 04 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_DEBUG_P_H #define GWEN_DEBUG_P_H #include typedef enum { GWEN_MemoryDebugEntryTypeUnknown=0, GWEN_MemoryDebugEntryTypeCreate, GWEN_MemoryDebugEntryTypeAttach, GWEN_MemoryDebugEntryTypeFree } GWEN_MEMORY_DEBUG_ENTRY_TYPE; typedef struct GWEN_MEMORY_DEBUG_ENTRY GWEN_MEMORY_DEBUG_ENTRY; struct GWEN_MEMORY_DEBUG_ENTRY { GWEN_MEMORY_DEBUG_ENTRY *next; GWEN_MEMORY_DEBUG_ENTRY_TYPE type; char *file; int line; }; GWEN_MEMORY_DEBUG_ENTRY * GWEN_MemoryDebugEntry_new(GWEN_MEMORY_DEBUG_ENTRY_TYPE t, const char *wFile, int wLine); void GWEN_MemoryDebugEntry_free(GWEN_MEMORY_DEBUG_ENTRY *e); struct GWEN_MEMORY_DEBUG_OBJECT { GWEN_MEMORY_DEBUG_OBJECT *next; char *name; long int count; GWEN_MEMORY_DEBUG_ENTRY *entries; }; GWEN_MEMORY_DEBUG_OBJECT *GWEN_MemoryDebugObject_new(const char *name); void GWEN_MemoryDebugObject_free(GWEN_MEMORY_DEBUG_OBJECT *o); GWEN_MEMORY_DEBUG_OBJECT *GWEN_MemoryDebug__FindObject(const char *name); void GWEN_MemoryDebug__DumpObject(GWEN_MEMORY_DEBUG_OBJECT *o, uint32_t mode); uint32_t GWEN_Debug_PrintDec(char *buffer, uint32_t size, uint32_t num, int leadingZero, uint32_t length); uint32_t GWEN_Debug_PrintHex(char *buffer, uint32_t size, uint32_t num, int leadingZero, int up, uint32_t length); #endif gwenhywfar-5.12.1/src/base/gwen_param_tree.tm20000644000175000017500000000033013644653711016174 00000000000000 GWEN_PARAM_TREE GWEN_Param_Tree gwenhywfar-5.12.1/src/base/idlist64.c0000664000175000017500000005505014125675316014232 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "idlist64_p.h" #include #include #include #include /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static GWENHYWFAR_CB void _attachToTable(GWEN_SIMPLEPTRLIST *pl, void *p); static GWENHYWFAR_CB void _detachFromTable(GWEN_SIMPLEPTRLIST *pl, void *p); static int GWEN_IdList64__Sort(GWEN_IDLIST64 *idl, int ascending); static int __compAscending(const void *pa, const void *pb); static int __compDescending(const void *pa, const void *pb); static GWEN_IDTABLE64 *GWEN_IdTable64_new(); static void GWEN_IdTable64_free(GWEN_IDTABLE64 *ft); static void GWEN_IdTable64_Attach(GWEN_IDTABLE64 *ft); static GWEN_IDTABLE64 *GWEN_IdTable64_dup(const GWEN_IDTABLE64 *ftOrig); static GWEN_IDTABLE64 *GWEN_IdTable64_Create(uint64_t maxEntries); static uint64_t GWEN_IdTable64_GetMaxEntries(const GWEN_IDTABLE64 *ft); static uint64_t GWEN_IdTable64_GetFreeEntries(const GWEN_IDTABLE64 *ft); static void GWEN_IdTable64_DecFreeEntries(GWEN_IDTABLE64 *ft); static uint64_t GWEN_IdTable64_GetHighestEntry(const GWEN_IDTABLE64 *ft); static void GWEN_IdTable64_CheckAndSetHighestEntry(GWEN_IDTABLE64 *ft, uint64_t i); static uint32_t GWEN_IdTable64_GetRuntimeFlags(const GWEN_IDTABLE64 *ft); static void GWEN_IdTable64_AddRuntimeFlags(GWEN_IDTABLE64 *ft, uint32_t i); static uint64_t *GWEN_IdTable64_GetPtrEntries(const GWEN_IDTABLE64 *ft); static void GWEN_IdTable64_SetPtrEntries(GWEN_IDTABLE64 *ft, uint64_t *ptr); static GWEN_IDTABLE64 *GWEN_IdList64_GetTableAt(const GWEN_IDLIST64 *tl, uint64_t idx); /*static int GWEN_IdList64_SetIdAt(GWEN_IDLIST64 *tl, uint64_t idx, uint64_t entry);*/ static int64_t GWEN_IdList64_AddTable(GWEN_IDLIST64 *idl, GWEN_IDTABLE64 *t); static uint64_t GWEN_IdList64__GetFirstId(const GWEN_IDLIST64 *idl, uint64_t *pos); static uint64_t GWEN_IdList64__GetNextId(const GWEN_IDLIST64 *idl, uint64_t *pos); /* ------------------------------------------------------------------------------------------------ * GWEN_IdList64 * ------------------------------------------------------------------------------------------------ */ GWEN_IDLIST64 *GWEN_IdList64_new() { return GWEN_IdList64_newWithSteps(GWEN_IDLIST64_ENTRIES_PER_TABLE); } GWEN_IDLIST64 *GWEN_IdList64_newWithSteps(uint64_t steps) { GWEN_IDLIST64 *idl; idl=GWEN_SimplePtrList_new(GWEN_IDLIST64_INITIAL_ENTRYCOUNT, GWEN_IDLIST64_STEPS); GWEN_SimplePtrList_SetAttachObjectFn(idl, _attachToTable); GWEN_SimplePtrList_SetFreeObjectFn(idl, _detachFromTable); GWEN_SimplePtrList_AddFlags(idl, GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS); GWEN_SimplePtrList_AddFlags(idl, GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS); GWEN_SimplePtrList_SetUserIntData(idl, steps); return idl; } GWEN_IDLIST64 *GWEN_IdList64_dup(const GWEN_IDLIST64 *oldList) { GWEN_IDLIST64 *idl; uint64_t tableCount; uint64_t i; idl=GWEN_IdList64_newWithSteps(GWEN_SimplePtrList_GetUserIntData(oldList)); tableCount=GWEN_SimplePtrList_GetUsedEntries(oldList); for (i=0; i=0) pTableCurrent=GWEN_IdList64_GetTableAt(idl, idxTableCurrent); /* check last table for existence and free entries, possibly create and add new table */ if (pTableCurrent==NULL || GWEN_IdTable64_GetFreeEntries(pTableCurrent)==0) { /* create new table */ if (pTableCurrent==NULL) { DBG_VERBOUS(GWEN_LOGDOMAIN, "No table, need to create one"); } else if (GWEN_IdTable64_GetFreeEntries(pTableCurrent)==0) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Current table has no free entries, need to create new one"); } DBG_VERBOUS(GWEN_LOGDOMAIN, "Creating table with %d entries", entriesPerTable); pTableCurrent=GWEN_IdTable64_Create(entriesPerTable); GWEN_IdTable64_AddRuntimeFlags(pTableCurrent, GWEN_IDTABLE64_RUNTIME_FLAGS_ISCOPY); /* no need to copy later */ /* add table to list */ idxTableCurrent=GWEN_IdList64_AddTable(idl, pTableCurrent); if (idxTableCurrent<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", (int) idxTableCurrent); GWEN_IdTable64_free(pTableCurrent); return idxTableCurrent; } GWEN_IdTable64_free(pTableCurrent); } /* if (pTableCurrent || GWEN_IdTable64_GetFreeEntries(pTableCurrent)==0) */ /* allocate free entry in current table */ if (pTableCurrent && GWEN_IdTable64_GetFreeEntries(pTableCurrent)) { uint64_t *ptr; int64_t index=idxTableCurrent*entriesPerTable; int64_t entryPos; /* copy table if necessary (copy-on-write) */ if (!(GWEN_IdTable64_GetRuntimeFlags(pTableCurrent) & GWEN_IDTABLE64_RUNTIME_FLAGS_ISCOPY)) { GWEN_IDTABLE64 *pTableCopy; DBG_VERBOUS(GWEN_LOGDOMAIN, "Copying table at idx %lu", (unsigned long) idxTableCurrent); pTableCopy=GWEN_IdTable64_dup(pTableCurrent); GWEN_IdList64_SetTableAt(idl, idxTableCurrent, pTableCopy); GWEN_IdTable64_free(pTableCopy); pTableCurrent=pTableCopy; GWEN_IdTable64_AddRuntimeFlags(pTableCurrent, GWEN_IDTABLE64_RUNTIME_FLAGS_ISCOPY); } ptr=GWEN_IdTable64_GetPtrEntries(pTableCurrent); /* find entryPos of free entry in pTableCurrent */ DBG_VERBOUS(GWEN_LOGDOMAIN, "Current table (ptr=%p, %d entriesPerTable):", (void *)ptr, entriesPerTable); /*GWEN_IdTable64_Dump(pTableCurrent);*/ if (GWEN_IdTable64_GetFreeEntries(pTableCurrent)==GWEN_IdTable64_GetMaxEntries(pTableCurrent)) { /** all entries are free, this is simple */ entryPos=0; } else { if (GWEN_IdTable64_GetHighestEntry(pTableCurrent)+1ptrEntries[i]==wantedId) { return 1; } } } } return 0; } int GWEN_IdList64_DelId(GWEN_IDLIST64 *idl, uint64_t wantedId) { uint32_t idx; int entriesPerTable=GWEN_IdList64_GetTableMaxEntries(idl); int numTables=GWEN_IdList64_GetUsedTables(idl); for (idx=0; idxptrEntries[i]==wantedId) { idt->ptrEntries[i]=0; GWEN_IdList64_DecIdCounter(idl); return 1; } } } } return 0; } static GWENHYWFAR_CB void _attachToTable(GWEN_UNUSED GWEN_SIMPLEPTRLIST *pl, void *p) { GWEN_IDTABLE64 *ft; ft=(GWEN_IDTABLE64 *) p; GWEN_IdTable64_Attach(ft); } static GWENHYWFAR_CB void _detachFromTable(GWEN_UNUSED GWEN_SIMPLEPTRLIST *pl, void *p) { GWEN_IDTABLE64 *ft; ft=(GWEN_IDTABLE64 *) p; GWEN_IdTable64_free(ft); } uint64_t GWEN_IdList64__GetFirstId(const GWEN_IDLIST64 *idl, uint64_t *pos) { uint32_t idx; int idIndex=0; int entriesPerTable=GWEN_IdList64_GetTableMaxEntries(idl); int numTables=GWEN_IdList64_GetUsedTables(idl); *pos=0; for (idx=0; idxptrEntries[i]!=0) { id=idt->ptrEntries[i]; *pos=idIndex+i+1; return id; } } } idIndex+=entriesPerTable; } return 0; } uint64_t GWEN_IdList64__GetNextId(const GWEN_IDLIST64 *idl, uint64_t *pos) { if (*pos) { int entriesPerTable=GWEN_IdList64_GetTableMaxEntries(idl); int numTables=GWEN_IdList64_GetUsedTables(idl); uint64_t tableNum; uint64_t tableIdx; int idIndex=0; uint32_t idx; tableNum=*pos / entriesPerTable; tableIdx=*pos % entriesPerTable; if (tableNum>numTables) { DBG_ERROR(GWEN_LOGDOMAIN, "Table number out of range"); *pos=0; return 0; } idIndex=(tableNum*entriesPerTable); for (idx=tableNum; idxptrEntries[i]!=0) { id=idt->ptrEntries[i]; *pos=idIndex+i+1; return id; } } } else { for (i=0; iptrEntries[i]!=0) { id=idt->ptrEntries[i]; *pos=idIndex+i+1; return id; } } } } idIndex+=entriesPerTable; } *pos=0; } return 0; } int GWEN_IdList64__Sort(GWEN_IDLIST64 *idl, int ascending) { uint64_t entryCount; assert(idl); entryCount=GWEN_IdList64_GetEntryCount(idl); if (entryCount) { GWEN_IDLIST64_ITERATOR *it; uint64_t *ptr; unsigned int i; assert(idl); /* move ids to a temporary list */ ptr=(uint64_t *)malloc(sizeof(uint64_t)*entryCount); assert(ptr); it=GWEN_IdList64_Iterator_new(idl); for (i=0; ib) return 1; else return 0; } int __compDescending(const void *pa, const void *pb) { uint64_t a=*((const uint64_t *)pa); uint64_t b=*((const uint64_t *)pb); if (ab) return -1; else return 0; } /* ------------------------------------------------------------------------------------------------ * GWEN_IdList64_Iterator * ------------------------------------------------------------------------------------------------ */ GWEN_IDLIST64_ITERATOR *GWEN_IdList64_Iterator_new(const GWEN_IDLIST64 *idl) { GWEN_IDLIST64_ITERATOR *it; assert(idl); GWEN_NEW_OBJECT(GWEN_IDLIST64_ITERATOR, it); it->list=idl; return it; } void GWEN_IdList64_Iterator_free(GWEN_IDLIST64_ITERATOR *it) { if (it) { GWEN_FREE_OBJECT(it); } } uint64_t GWEN_IdList64_Iterator_GetFirstId(GWEN_IDLIST64_ITERATOR *it) { return GWEN_IdList64__GetFirstId(it->list, &(it->nextIndex)); } uint64_t GWEN_IdList64_Iterator_GetNextId(GWEN_IDLIST64_ITERATOR *it) { return GWEN_IdList64__GetNextId(it->list, &(it->nextIndex)); } /* ------------------------------------------------------------------------------------------------ * GWEN_IdTable64 * ------------------------------------------------------------------------------------------------ */ GWEN_IDTABLE64 *GWEN_IdTable64_new() { GWEN_IDTABLE64 *ft; GWEN_NEW_OBJECT(GWEN_IDTABLE64, ft); ft->refCount=1; return ft; } void GWEN_IdTable64_Attach(GWEN_IDTABLE64 *ft) { assert(ft && ft->refCount); if (ft && ft->refCount) { ft->refCount++; } } void GWEN_IdTable64_free(GWEN_IDTABLE64 *ft) { if (ft) { assert(ft->refCount); if (ft->refCount==1) { ft->refCount=0; free(ft->ptrEntries); GWEN_FREE_OBJECT(ft); } else { ft->refCount--; } } } int GWEN_IdTable64_GetRefCounter(const GWEN_IDTABLE64 *ft) { assert(ft); return ft->refCount; } GWEN_IDTABLE64 *GWEN_IdTable64_dup(const GWEN_IDTABLE64 *ftOrig) { GWEN_IDTABLE64 *ft; assert(ftOrig); assert(ftOrig->refCount); ft=GWEN_IdTable64_new(); ft->maxEntries=ftOrig->maxEntries; ft->freeEntries=ftOrig->freeEntries; ft->highestEntry=ftOrig->highestEntry; ft->runtimeFlags=ftOrig->runtimeFlags; /* copy offset entries */ if (ftOrig->maxEntries && ftOrig->ptrEntries) { uint64_t offsetArraySize; offsetArraySize=ftOrig->maxEntries*sizeof(uint64_t); ft->ptrEntries=(uint64_t *) malloc(offsetArraySize); assert(ft->ptrEntries); memmove(ft->ptrEntries, ftOrig->ptrEntries, offsetArraySize); } return ft; } GWEN_IDTABLE64 *GWEN_IdTable64_Create(uint64_t maxEntries) { GWEN_IDTABLE64 *ft; uint64_t offsetArraySize; uint64_t *ptr; ft=GWEN_IdTable64_new(); ft->maxEntries=maxEntries; ft->freeEntries=maxEntries; offsetArraySize=ft->maxEntries*sizeof(uint64_t); ptr=(uint64_t *) malloc(offsetArraySize); assert(ptr); memset(ptr, 0, offsetArraySize); GWEN_IdTable64_SetPtrEntries(ft, ptr); return ft; } uint64_t GWEN_IdTable64_GetMaxEntries(const GWEN_IDTABLE64 *ft) { assert(ft); assert(ft->refCount); return ft->maxEntries; } uint64_t GWEN_IdTable64_GetFreeEntries(const GWEN_IDTABLE64 *ft) { assert(ft); assert(ft->refCount); return ft->freeEntries; } void GWEN_IdTable64_DecFreeEntries(GWEN_IDTABLE64 *ft) { assert(ft); assert(ft->refCount); if (ft->freeEntries>0) ft->freeEntries--; } uint64_t GWEN_IdTable64_GetHighestEntry(const GWEN_IDTABLE64 *ft) { assert(ft); assert(ft->refCount); return ft->highestEntry; } void GWEN_IdTable64_CheckAndSetHighestEntry(GWEN_IDTABLE64 *ft, uint64_t i) { assert(ft); assert(ft->refCount); if (i>ft->highestEntry) ft->highestEntry=i; } uint64_t *GWEN_IdTable64_GetPtrEntries(const GWEN_IDTABLE64 *ft) { assert(ft); assert(ft->refCount); return ft->ptrEntries; } void GWEN_IdTable64_SetPtrEntries(GWEN_IDTABLE64 *ft, uint64_t *ptr) { assert(ft); assert(ft->refCount); if (ft->ptrEntries && ft->ptrEntries!=ptr) free(ft->ptrEntries); ft->ptrEntries=ptr; } uint32_t GWEN_IdTable64_GetRuntimeFlags(const GWEN_IDTABLE64 *ft) { assert(ft); return ft->runtimeFlags; } void GWEN_IdTable64_AddRuntimeFlags(GWEN_IDTABLE64 *ft, uint32_t i) { assert(ft); ft->runtimeFlags|=i; } /* include tests */ #include "idlist64-t.c" gwenhywfar-5.12.1/src/base/error_l.h0000644000175000017500000000361013142134463014221 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Tue Oct 02 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_ERROR_L_H #define GWENHYWFAR_ERROR_L_H #include /** * Initializes this module. */ int GWEN_Error_ModuleInit(void); /** * Deinitializes this module. */ int GWEN_Error_ModuleFini(void); #endif /* MOD_ERROR_L_H */ gwenhywfar-5.12.1/src/base/tree2.c0000666000175000017500000001245413507454524013613 00000000000000/*************************************************************************** begin : Thu Jul 04 2019 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "tree2_p.h" #include #include GWEN_TREE2_ELEMENT *GWEN_Tree2Element_new(void *d) { GWEN_TREE2_ELEMENT *el; GWEN_NEW_OBJECT(GWEN_TREE2_ELEMENT, el); el->data=d; return el; } void GWEN_Tree2Element_free(GWEN_TREE2_ELEMENT *el) { if (el) { if (el->firstChild) { DBG_ERROR(GWEN_LOGDOMAIN, "Tree element still has children"); assert(0); } GWEN_FREE_OBJECT(el); } } void GWEN_Tree2_Unlink(GWEN_TREE2_ELEMENT *el) { /* unlink from previous */ if (el->prevElement) el->prevElement->nextElement=el->nextElement; /* unlink from next */ if (el->nextElement) el->nextElement->prevElement=el->prevElement; /* unlink from parent */ if (el->parent) { if (el->parent->firstChild==el) el->parent->firstChild=el->nextElement; if (el->parent->lastChild==el) el->parent->lastChild=el->prevElement; } el->nextElement=NULL; el->prevElement=NULL; el->parent=NULL; } void GWEN_Tree2_Replace(GWEN_TREE2_ELEMENT *elToReplace, GWEN_TREE2_ELEMENT *elReplacement) { elReplacement->nextElement=NULL; elReplacement->prevElement=NULL; elReplacement->parent=NULL; /* relink with previous */ if (elToReplace->prevElement) elToReplace->prevElement->nextElement=elReplacement; elReplacement->prevElement=elToReplace->prevElement; /* relink with next */ if (elToReplace->nextElement) elToReplace->nextElement->prevElement=elReplacement; elReplacement->nextElement=elToReplace->nextElement; /* relink with parent */ if (elToReplace->parent) { elReplacement->parent=elToReplace->parent; if (elToReplace->parent->firstChild==elToReplace) elToReplace->parent->firstChild=elReplacement; if (elToReplace->parent->lastChild==elToReplace) elToReplace->parent->lastChild=elReplacement; } elToReplace->nextElement=NULL; elToReplace->prevElement=NULL; elToReplace->parent=NULL; } void GWEN_Tree2_AddChild(GWEN_TREE2_ELEMENT *where, GWEN_TREE2_ELEMENT *el) { if (where->firstChild==NULL) where->firstChild=el; el->prevElement=where->lastChild; if (where->lastChild) where->lastChild->nextElement=el; where->lastChild=el; el->parent=where; } void GWEN_Tree2_InsertChild(GWEN_TREE2_ELEMENT *where, GWEN_TREE2_ELEMENT *el) { el->nextElement=where->firstChild; where->firstChild=el; if (where->lastChild==NULL) where->lastChild=el; el->parent=where; } void *GWEN_Tree2Element_GetPrevious(const GWEN_TREE2_ELEMENT *el) { if (el->prevElement) return el->prevElement->data; return 0; } void *GWEN_Tree2Element_GetNext(const GWEN_TREE2_ELEMENT *el) { if (el->nextElement) return el->nextElement->data; return 0; } void *GWEN_Tree2Element_GetBelow(const GWEN_TREE2_ELEMENT *el) { if (el->firstChild) /* look down */ return el->firstChild->data; else if (el->nextElement) /* look right */ return el->nextElement->data; else { /* look for a parent which has a right neighbour */ while (el && el->parent) { if (el->parent->nextElement) /* look right of parent */ return el->parent->nextElement->data; /* parent has no right neighbour, consult its parent */ el=el->parent; } } return NULL; } void *GWEN_Tree2Element_GetFirstChild(const GWEN_TREE2_ELEMENT *el) { if (el->firstChild) return el->firstChild->data; return NULL; } void *GWEN_Tree2Element_GetLastChild(const GWEN_TREE2_ELEMENT *el) { if (el->lastChild) return el->lastChild->data; return NULL; } void *GWEN_Tree2Element_GetParent(const GWEN_TREE2_ELEMENT *el) { if (el->parent) return el->parent->data; return NULL; } gwenhywfar-5.12.1/src/base/error.h0000644000175000017500000001357213142134463013716 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Tue Oct 02 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /** * @file base/error.h * @short This file contains the module for error handling. */ #ifndef GWENHYWFAR_ERROR_H #define GWENHYWFAR_ERROR_H #include #include /** * @defgroup MOD_ERROR Error module * @ingroup MOD_BASE * @short This module does all error handling * @author Martin Preuss * */ /*@{*/ /* * Allow this to be used from C and C++ */ #ifdef __cplusplus extern "C" { #endif /** @defgroup MOD_ERROR_SIMPLE Simplified Error Codes * */ /*@{*/ #define GWEN_SUCCESS 0 /* generic errors */ #define GWEN_ERROR_GENERIC (-1) #define GWEN_ERROR_ABORTED (-2) #define GWEN_ERROR_NOT_AVAILABLE (-3) #define GWEN_ERROR_USER_ABORTED (-4) #define GWEN_ERROR_OPEN (-5) #define GWEN_ERROR_INVALID (-6) /* socket errors */ #define GWEN_ERROR_BAD_SOCKETTYPE (-32) #define GWEN_ERROR_NOT_OPEN (-33) #define GWEN_ERROR_TIMEOUT (-34) #define GWEN_ERROR_IN_PROGRESS (-35) #define GWEN_ERROR_STARTUP (-36) #define GWEN_ERROR_INTERRUPTED (-37) #define GWEN_ERROR_BROKEN_PIPE (-39) /* inet address errors */ #define GWEN_ERROR_MEMORY_FULL (-40) #define GWEN_ERROR_BAD_ADDRESS (-41) #define GWEN_ERROR_BUFFER_OVERFLOW (-42) #define GWEN_ERROR_HOST_NOT_FOUND (-43) #define GWEN_ERROR_NO_ADDRESS (-44) #define GWEN_ERROR_NO_RECOVERY (-45) #define GWEN_ERROR_TRY_AGAIN (-46) #define GWEN_ERROR_UNKNOWN_DNS_ERROR (-47) #define GWEN_ERROR_BAD_ADDRESS_FAMILY (-48) /* libloader errors */ #define GWEN_ERROR_COULD_NOT_LOAD (-49) #define GWEN_ERROR_COULD_NOT_RESOLVE (-50) #define GWEN_ERROR_NOT_FOUND (-51) /* buffered IO errors */ #define GWEN_ERROR_READ (-52) #define GWEN_ERROR_WRITE (-53) #define GWEN_ERROR_CLOSE (-54) #define GWEN_ERROR_NO_DATA (-55) #define GWEN_ERROR_PARTIAL (-56) #define GWEN_ERROR_EOF (-57) /* crypt errors */ #define GWEN_ERROR_ALREADY_REGISTERED (-58) #define GWEN_ERROR_NOT_REGISTERED (-59) #define GWEN_ERROR_BAD_SIZE (-60) #define GWEN_ERROR_ENCRYPT (-62) #define GWEN_ERROR_DECRYPT (-63) #define GWEN_ERROR_SIGN (-64) #define GWEN_ERROR_VERIFY (-65) #define GWEN_ERROR_SSL (-66) /* crypt token errors */ #define GWEN_ERROR_NOT_IMPLEMENTED (-67) #define GWEN_ERROR_NOT_SUPPORTED (-68) #define GWEN_ERROR_BAD_NAME (-69) #define GWEN_ERROR_BAD_PIN (-70) #define GWEN_ERROR_BAD_PIN_0_LEFT (-71) #define GWEN_ERROR_BAD_PIN_1_LEFT (-72) #define GWEN_ERROR_BAD_PIN_2_LEFT (-73) #define GWEN_ERROR_NO_KEY (-74) #define GWEN_ERROR_REMOVED (-75) #define GWEN_ERROR_DEFAULT_VALUE (-76) /* new error codes in GWEN2 */ #define GWEN_ERROR_NOT_CONNECTED (-100) #define GWEN_ERROR_BAD_DATA (-101) #define GWEN_ERROR_FOUND (-102) #define GWEN_ERROR_IO (-103) #define GWEN_ERROR_INTERNAL (-104) #define GWEN_ERROR_PERMISSIONS (-105) #define GWEN_ERROR_CONN_REFUSED (-106) #define GWEN_ERROR_NET_UNREACHABLE (-107) #define GWEN_ERROR_SSL_SECURITY (-108) #define GWEN_ERROR_LOCK (-109) #define GWEN_ERROR_SSL_PREMATURE_CLOSE (-110) #define GWEN_ERROR_USEROFFSET (-1000) /*@}*/ /** * @name Verbosity * * Composing error messages. */ /*@{*/ /** * Dumps the string corresponding to the given erro code. * @return 1 detailed error message created, 0 otherwise * @param c error code * @param buffer pointer to a buffer to receive the message * @param bsize size of that buffer in bytes */ GWENHYWFAR_API int GWEN_Error_ToString(int c, char *buffer, int bsize); /** * @brief Returns a (very) short string describing the given GWEN error code, or "Unknown error" for unknown codes * @param i The error code * @return A fixed static string that must not be free'd */ GWENHYWFAR_API const char *GWEN_Error_SimpleToString(int i); /*@}*/ /*@}*/ #ifdef __cplusplus } #endif /*@} group mod_error */ #endif /* MOD_ERROR_H */ gwenhywfar-5.12.1/src/base/tree.c0000644000175000017500000002137213503750241013513 00000000000000/*************************************************************************** begin : Fri Jan 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "tree_p.h" #include #include GWEN_TREE *GWEN_Tree_new(void) { GWEN_TREE *l; GWEN_NEW_OBJECT(GWEN_TREE, l); return l; } void GWEN_Tree_free(GWEN_TREE *l) { if (l) { GWEN_FREE_OBJECT(l); } } int GWEN_Tree_GetCount(const GWEN_TREE *l) { assert(l); return l->count; } void GWEN_Tree_Add(GWEN_TREE *l, GWEN_TREE_ELEMENT *el) { assert(l); assert(el); if (el->treePtr) { /* element is already part of another list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is already part of a list"); assert(0); } else { if (l->firstElement==0) l->firstElement=el; el->prevElement=l->lastElement; if (l->lastElement) l->lastElement->nextElement=el; l->lastElement=el; el->treePtr=l; el->parent=NULL; l->count++; } } void GWEN_Tree_AddList(GWEN_TREE *dest, GWEN_TREE *l) { GWEN_TREE_ELEMENT *el; assert(dest); assert(l); while ((el=l->firstElement)) { GWEN_Tree_Del(el); GWEN_Tree_Add(dest, el); } } void GWEN_Tree_Insert(GWEN_TREE *l, GWEN_TREE_ELEMENT *el) { assert(l); assert(el); if (el->treePtr) { /* element is already part of another list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is already part of a list"); } else { el->nextElement=l->firstElement; l->firstElement=el; if (l->lastElement==0) l->lastElement=el; el->treePtr=l; el->parent=NULL; l->count++; } } void GWEN_Tree_Del(GWEN_TREE_ELEMENT *el) { GWEN_TREE *l; l=el->treePtr; if (l==0) { /* not part of any list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is not part of any list"); } else { /* unlink from previous */ if (el->prevElement) el->prevElement->nextElement=el->nextElement; /* unlink from next */ if (el->nextElement) el->nextElement->prevElement=el->prevElement; /* unlink from list */ if (l->firstElement==el) l->firstElement=el->nextElement; if (l->lastElement==el) l->lastElement=el->prevElement; l->count--; /* unlink from parent */ if (el->parent) { if (el->parent->firstChild==el) el->parent->firstChild=el->nextElement; if (el->parent->lastChild==el) el->parent->lastChild=el->prevElement; el->parent->count--; } el->nextElement=NULL; el->prevElement=NULL; el->parent=NULL; el->treePtr=NULL; } } void GWEN_Tree_Replace(GWEN_TREE_ELEMENT *elToReplace, GWEN_TREE_ELEMENT *elReplacement) { GWEN_TREE *l; l=elToReplace->treePtr; if (l==0) { /* not part of any list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is not part of any tree"); assert(0); } else { if (elReplacement->treePtr!=NULL) { /* replacement already is a part of another tree */ DBG_ERROR(GWEN_LOGDOMAIN, "Replacement element already is part of a tree"); assert(0); } else { elReplacement->nextElement=NULL; elReplacement->prevElement=NULL; elReplacement->parent=NULL; elReplacement->treePtr=elToReplace->treePtr; /* relink with previous */ if (elToReplace->prevElement) elToReplace->prevElement->nextElement=elReplacement; /* relink with next */ if (elToReplace->nextElement) elToReplace->nextElement->prevElement=elReplacement; /* relink with tree */ if (l->firstElement==elToReplace) l->firstElement=elReplacement; if (l->lastElement==elToReplace) l->lastElement=elReplacement; l->count-=(elToReplace->count)+1; l->count+=(elReplacement->count)+1; /* relink with parent */ if (elToReplace->parent) { elReplacement->parent=elToReplace->parent; if (elToReplace->parent->firstChild==elToReplace) elToReplace->parent->firstChild=elToReplace; if (elToReplace->parent->lastChild==elToReplace) elToReplace->parent->lastChild=elToReplace; elToReplace->count-=(elToReplace->count)+1; elToReplace->count+=(elReplacement->count)+1; } elToReplace->nextElement=NULL; elToReplace->prevElement=NULL; elToReplace->parent=NULL; elToReplace->treePtr=NULL; } } } void GWEN_Tree_AddChild(GWEN_TREE_ELEMENT *where, GWEN_TREE_ELEMENT *el) { if (el->treePtr) { /* element is already part of another tree */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is already part of a tree"); assert(0); } else { if (where->firstChild==0) where->firstChild=el; el->prevElement=where->lastChild; if (where->lastChild) where->lastChild->nextElement=el; where->lastChild=el; el->parent=where; el->treePtr=where->treePtr; el->treePtr->count++; where->count++; } } void GWEN_Tree_InsertChild(GWEN_TREE_ELEMENT *where, GWEN_TREE_ELEMENT *el) { if (el->treePtr) { /* element is already part of another list */ DBG_ERROR(GWEN_LOGDOMAIN, "Element is already part of a tree"); assert(0); } else { el->nextElement=where->firstChild; where->firstChild=el; if (where->lastChild==NULL) where->lastChild=el; el->parent=where; el->treePtr=where->treePtr; el->treePtr->count++; where->count++; } } void *GWEN_Tree_GetFirst(const GWEN_TREE *l) { if (l->firstElement) return l->firstElement->data; return 0; } void *GWEN_Tree_GetLast(const GWEN_TREE *l) { if (l->lastElement) return l->lastElement->data; return 0; } GWEN_TREE_ELEMENT *GWEN_TreeElement_new(void *d) { GWEN_TREE_ELEMENT *el; GWEN_NEW_OBJECT(GWEN_TREE_ELEMENT, el); el->data=d; return el; } void GWEN_TreeElement_free(GWEN_TREE_ELEMENT *el) { if (el) { if (el->treePtr) GWEN_Tree_Del(el); if (el->firstChild) { DBG_ERROR(GWEN_LOGDOMAIN, "Tree element still has children"); assert(0); } GWEN_FREE_OBJECT(el); } } void *GWEN_TreeElement_GetPrevious(const GWEN_TREE_ELEMENT *el) { if (el->prevElement) return el->prevElement->data; return 0; } void *GWEN_TreeElement_GetNext(const GWEN_TREE_ELEMENT *el) { if (el->nextElement) return el->nextElement->data; return 0; } void *GWEN_TreeElement_GetBelow(const GWEN_TREE_ELEMENT *el) { if (el->firstChild) /* look down */ return el->firstChild->data; else if (el->nextElement) /* look right */ return el->nextElement->data; else { /* look for a parent which has a right neighbour */ while (el && el->parent) { if (el->parent->nextElement) /* look right of parent */ return el->parent->nextElement->data; /* parent has no right neighbour, consult its parent */ el=el->parent; } } return NULL; } void *GWEN_TreeElement_GetFirstChild(const GWEN_TREE_ELEMENT *el) { if (el->firstChild) return el->firstChild->data; return NULL; } void *GWEN_TreeElement_GetLastChild(const GWEN_TREE_ELEMENT *el) { if (el->lastChild) return el->lastChild->data; return NULL; } void *GWEN_TreeElement_GetParent(const GWEN_TREE_ELEMENT *el) { if (el->parent) return el->parent->data; return NULL; } uint32_t GWEN_TreeElement_GetChildrenCount(const GWEN_TREE_ELEMENT *el) { assert(el); return el->count; } gwenhywfar-5.12.1/src/gwenhywfar.c0000664000175000017500000003273514152154072014033 00000000000000/*************************************************************************** begin : Thu Sep 11 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif /* Internationalization */ #ifdef ENABLE_NLS # include # include #endif #include #include #include #include "base/debug.h" #include "base/logger_l.h" #include "base/error_l.h" #include "base/pathmanager_l.h" #include "base/plugin_l.h" #include "base/i18n_l.h" #include "os/inetaddr_l.h" #include "os/inetsocket_l.h" #include "os/libloader_l.h" #include "os/process_l.h" #include "parser/dbio_l.h" #include "parser/configmgr_l.h" #include "crypt3/cryptkey_l.h" #include "crypttoken/ctplugin_l.h" #include "gui/gui_l.h" #include "binreloc.h" #include /* for regkey stuff */ #ifdef OS_WIN32 # define DIRSEP "\\" # include #else # define DIRSEP "/" #endif /* Watch out: Make sure these are identical with the identifiers in gwenhywfar.iss.in ! */ #define GWEN_REGKEY_PATHS "Software\\Gwenhywfar\\Paths" #define GWEN_REGNAME_PREFIX "prefix" #define GWEN_REGNAME_LIBDIR "libdir" #define GWEN_REGNAME_PLUGINDIR "plugindir" #define GWEN_REGNAME_SYSCONFDIR "sysconfdir" #define GWEN_REGNAME_LOCALEDIR "localedir" #define GWEN_REGNAME_DATADIR "pkgdatadir" #define GWEN_REGNAME_SYSDATADIR "sysdatadir" static unsigned int gwen_is_initialized=0; static int gwen_binreloc_initialized=0; char *GWEN__get_plugindir(const char *default_dir); int GWEN_Init(void) { int err; if (gwen_is_initialized==0) { err=GWEN_Logger_ModuleInit(); if (err) return err; gnutls_global_init(); if (gwen_binreloc_initialized==0) { #ifdef ENABLE_BINRELOC BrInitError br_error; /* Init binreloc. Note: It is not totally clear whether the correct function might still be br_init() instead of br_init_lib(). */ if (!br_init_lib(&br_error)) { DBG_INFO(GWEN_LOGDOMAIN, "Error on br_init: %d\n", br_error); gwen_binreloc_initialized=-1; } else gwen_binreloc_initialized=1; #else gwen_binreloc_initialized=1; #endif } GWEN_Error_ModuleInit(); err=GWEN_PathManager_ModuleInit(); if (err) return err; /* Define some paths used by gwenhywfar; add the windows registry entries first, because on Unix those functions simply do nothing and on windows they will ensure that the most valid paths (which are those from the registry) are first in the path lists. */ /* --------------------------------------------------------------------- * $sysconfdir e.g. "/etc" */ GWEN_PathManager_DefinePath(GWEN_PM_LIBNAME, GWEN_PM_SYSCONFDIR); GWEN_PathManager_AddPathFromWinReg(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_SYSCONFDIR, GWEN_REGKEY_PATHS, GWEN_REGNAME_SYSCONFDIR); #if defined(OS_WIN32) || defined(ENABLE_LOCAL_INSTALL) /* add folder relative to EXE */ GWEN_PathManager_AddRelPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_SYSCONFDIR, GWEN_SYSCONF_DIR, GWEN_PathManager_RelModeExe); #else /* add absolute folder */ GWEN_PathManager_AddPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_SYSCONFDIR, GWEN_SYSCONF_DIR); #endif /* --------------------------------------------------------------------- * $localedir e.g. "/usr/share/locale" */ GWEN_PathManager_DefinePath(GWEN_PM_LIBNAME, GWEN_PM_LOCALEDIR); GWEN_PathManager_AddPathFromWinReg(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_LOCALEDIR, GWEN_REGKEY_PATHS, GWEN_REGNAME_LOCALEDIR); #if defined(OS_WIN32) || defined(ENABLE_LOCAL_INSTALL) /* add folder relative to EXE */ GWEN_PathManager_AddRelPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_LOCALEDIR, LOCALEDIR, GWEN_PathManager_RelModeExe); #else /* add absolute folder */ GWEN_PathManager_AddPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_LOCALEDIR, LOCALEDIR); #endif /* --------------------------------------------------------------------- * $plugindir e.g. "/usr/lib/gwenhywfar/plugins/0" */ GWEN_PathManager_DefinePath(GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR); GWEN_PathManager_AddPathFromWinReg(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR, GWEN_REGKEY_PATHS, GWEN_REGNAME_PLUGINDIR); #if defined(OS_WIN32) || defined(ENABLE_LOCAL_INSTALL) /* add folder relative to EXE */ GWEN_PathManager_AddRelPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR, PLUGINDIR, GWEN_PathManager_RelModeExe); #else /* add absolute folder */ GWEN_PathManager_AddPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR, PLUGINDIR); #endif /* --------------------------------------------------------------------- * datadir e.g. "/usr/share/gwenhywfar" */ GWEN_PathManager_DefinePath(GWEN_PM_LIBNAME, GWEN_PM_DATADIR); GWEN_PathManager_AddPathFromWinReg(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_DATADIR, GWEN_REGKEY_PATHS, GWEN_REGNAME_DATADIR); #if defined(OS_WIN32) || defined(ENABLE_LOCAL_INSTALL) /* add folder relative to EXE */ GWEN_PathManager_AddRelPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_DATADIR, GWEN_DATADIR, GWEN_PathManager_RelModeExe); #else /* add absolute folder */ GWEN_PathManager_AddPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_DATADIR, GWEN_DATADIR); #endif /* --------------------------------------------------------------------- * system datadir e.g. "/usr/share" */ GWEN_PathManager_DefinePath(GWEN_PM_LIBNAME, GWEN_PM_SYSDATADIR); GWEN_PathManager_AddPathFromWinReg(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_SYSDATADIR, GWEN_REGKEY_PATHS, GWEN_REGNAME_SYSDATADIR); #if defined(OS_WIN32) || defined(ENABLE_LOCAL_INSTALL) /* add folder relative to EXE */ GWEN_PathManager_AddRelPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_SYSDATADIR, GWEN_SYSDATADIR, GWEN_PathManager_RelModeExe); #else /* add absolute folder */ GWEN_PathManager_AddPath(GWEN_PM_LIBNAME, GWEN_PM_LIBNAME, GWEN_PM_SYSDATADIR, GWEN_SYSDATADIR); #endif /* Initialize other modules. */ DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing I18N module"); err=GWEN_I18N_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing InetAddr module"); err=GWEN_InetAddr_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing Socket module"); err=GWEN_Socket_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing Libloader module"); err=GWEN_LibLoader_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing Crypt3 module"); err=GWEN_Crypt3_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing Process module"); err=GWEN_Process_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing Plugin module"); err=GWEN_Plugin_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing DataBase IO module"); err=GWEN_DBIO_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing ConfigMgr module"); err=GWEN_ConfigMgr_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing CryptToken2 module"); err=GWEN_Crypt_Token_ModuleInit(); if (err) return err; DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing GUI module"); err=GWEN_Gui_ModuleInit(); if (err) return err; /* add more modules here */ } gwen_is_initialized++; return 0; } int GWEN_Fini(void) { int err; err=0; if (gwen_is_initialized==0) return 0; gwen_is_initialized--; if (gwen_is_initialized==0) { int lerr; /* add more modules here */ GWEN_Gui_ModuleFini(); lerr=GWEN_Crypt_Token_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module CryptToken2"); } lerr=GWEN_ConfigMgr_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module ConfigMgr"); } lerr=GWEN_DBIO_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module DBIO"); } lerr=GWEN_Plugin_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module Plugin"); } lerr=GWEN_Process_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module Process"); } lerr=GWEN_Crypt3_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module Crypt3"); } lerr=GWEN_LibLoader_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module LibLoader"); } lerr=GWEN_Socket_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module Socket"); } lerr=GWEN_InetAddr_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module InetAddr"); } lerr=GWEN_I18N_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module I18N"); } lerr=GWEN_PathManager_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module PathManager"); } GWEN_Error_ModuleFini(); /* these two modules must be deinitialized at last */ lerr=GWEN_Logger_ModuleFini(); if (lerr) { err=lerr; DBG_ERROR(GWEN_LOGDOMAIN, "GWEN_Fini: " "Could not deinitialze module Logger"); } gnutls_global_deinit(); } return err; } int GWEN_Fini_Forced(void) { if (gwen_is_initialized) gwen_is_initialized=1; return GWEN_Fini(); } void GWEN_Version(int *major, int *minor, int *patchlevel, int *build) { *major=GWENHYWFAR_VERSION_MAJOR; *minor=GWENHYWFAR_VERSION_MINOR; *patchlevel=GWENHYWFAR_VERSION_PATCHLEVEL; *build=GWENHYWFAR_VERSION_BUILD; } gwenhywfar-5.12.1/src/ressource.rc.in0000644000175000017500000000656513142134464014454 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Wed Mar 27 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* Changes */ #include // Language: 407=DE, 409=US, 809=UK // German resources LANGUAGE LANG_GERMAN, SUBLANG_GERMAN #pragma code_page(1252) // AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA // Version VS_VERSION_INFO VERSIONINFO FILEVERSION @GWENHYWFAR_VERSION_MAJOR@, @GWENHYWFAR_VERSION_MINOR@, @GWENHYWFAR_VERSION_PATCHLEVEL@, @GWENHYWFAR_VERSION_BUILD@ PRODUCTVERSION @GWENHYWFAR_VERSION_MAJOR@, @GWENHYWFAR_VERSION_MINOR@, @GWENHYWFAR_VERSION_PATCHLEVEL@, @GWENHYWFAR_VERSION_BUILD@ FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L // Windows NT FILETYPE 0x2L // DLL FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040704b0" BEGIN //VALUE "Comments", "\0" VALUE "CompanyName", " Aquamaniac\0" VALUE "FileDescription", "Multi purpose library\0" VALUE "FileVersion", "v@GWENHYWFAR_VERSION_RELEASE_STRING@\0" VALUE "InternalName", "Gwenhywfar\0" VALUE "LegalCopyright", "Copyright © 2003 by Martin Preuss\0" VALUE "LegalTrademarks", "Aquamaniac\0" VALUE "OriginalFilename", "GWENHYWFAR32.DLL\0" //VALUE "PrivateBuild", "\0" VALUE "ProductName", "Gwenhywfar\0" VALUE "ProductVersion", "v@GWENHYWFAR_VERSION_FULL_STRING@\0" VALUE "Author", "Martin Preuss\0" VALUE "Email", "martin@libchipcard.de\0" VALUE "Homepage", "http://gwenhywfar.sf.net/\0" VALUE "Description", "OS abstraction, Crypto API, IPC Framework\0" VALUE "License", "LGPL\0" //VALUE "SpecialBuild", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x407, 1200 END END gwenhywfar-5.12.1/src/version.h.in0000644000175000017500000000445313142134464013744 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Wed Sep 24 2003 copyright : (C) 2003 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFAR_VERSION_H #define GWENHYWFAR_VERSION_H #define GWEN_VERSION_MAJOR @GWENHYWFAR_VERSION_MAJOR@ #define GWENHYWFAR_VERSION_MAJOR @GWENHYWFAR_VERSION_MAJOR@ #define GWENHYWFAR_VERSION_MINOR @GWENHYWFAR_VERSION_MINOR@ #define GWENHYWFAR_VERSION_PATCHLEVEL @GWENHYWFAR_VERSION_PATCHLEVEL@ #define GWENHYWFAR_VERSION_BUILD @GWENHYWFAR_VERSION_BUILD@ #define GWENHYWFAR_VERSION_TAG "@GWENHYWFAR_VERSION_TAG@" #define GWENHYWFAR_VERSION_FULL_STRING "@GWENHYWFAR_VERSION_FULL_STRING@" #define GWENHYWFAR_VERSION_STRING "@GWENHYWFAR_VERSION_STRING@" #define GWENHYWFAR_SO_EFFECTIVE @GWENHYWFAR_SO_EFFECTIVE@ #define GWENHYWFAR_SO_EFFECTIVE_STR "@GWENHYWFAR_SO_EFFECTIVE@" #endif /* GWENHYWFAR_VERSION_H */ gwenhywfar-5.12.1/src/ressource.rc0000644000175000017500000000616615032533625014046 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Wed Mar 27 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ /* Changes */ #include // Language: 407=DE, 409=US, 809=UK // German resources LANGUAGE LANG_GERMAN, SUBLANG_GERMAN #pragma code_page(1252) // AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA // Version VS_VERSION_INFO VERSIONINFO FILEVERSION 5, 12, 1, 0 PRODUCTVERSION 5, 12, 1, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L // Windows NT FILETYPE 0x2L // DLL FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040704b0" BEGIN //VALUE "Comments", "\0" VALUE "CompanyName", " Aquamaniac\0" VALUE "FileDescription", "Multi purpose library\0" VALUE "FileVersion", "v5.12.1\0" VALUE "InternalName", "Gwenhywfar\0" VALUE "LegalCopyright", "Copyright © 2003 by Martin Preuss\0" VALUE "LegalTrademarks", "Aquamaniac\0" VALUE "OriginalFilename", "GWENHYWFAR32.DLL\0" //VALUE "PrivateBuild", "\0" VALUE "ProductName", "Gwenhywfar\0" VALUE "ProductVersion", "v5.12.1stable-0\0" VALUE "Author", "Martin Preuss\0" VALUE "Email", "martin@libchipcard.de\0" VALUE "Homepage", "http://gwenhywfar.sf.net/\0" VALUE "Description", "OS abstraction, Crypto API, IPC Framework\0" VALUE "License", "LGPL\0" //VALUE "SpecialBuild", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x407, 1200 END END gwenhywfar-5.12.1/src/gwenhywfarapi.h0000664000175000017500000001257714125675316014545 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Wed Sep 02 2002 copyright : (C) 2002 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWENHYWFARAPI_H #define GWENHYWFARAPI_H #include #ifdef GWENHYWFAR_IS_SUBPROJECT # define GWENHYWFAR_API # define GWENHYWFAR_EXPORT # define GWENHYWFAR_NOEXPORT # define GWEN_UNUSED #else # ifdef BUILDING_GWENHYWFAR /* building Gwenhywfar */ # if GWENHYWFAR_SYS_IS_WINDOWS /* for windows */ # ifdef __declspec # define GWENHYWFAR_API __declspec (dllexport) # else /* if __declspec */ # define GWENHYWFAR_API # endif /* if NOT __declspec */ # else /* for non-win32 */ # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE # define GWENHYWFAR_API __attribute__((visibility("default"))) # else # define GWENHYWFAR_API # endif # endif # else /* not building Gwenhywfar */ # if GWENHYWFAR_SYS_IS_WINDOWS /* for windows */ # ifdef __declspec # define GWENHYWFAR_API __declspec (dllimport) # else /* if __declspec */ # define GWENHYWFAR_API # endif /* if NOT __declspec */ # else /* for non-win32 */ # define GWENHYWFAR_API # endif # endif # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE # define GWENHYWFAR_EXPORT __attribute__((visibility("default"))) # define GWENHYWFAR_NOEXPORT __attribute__((visibility("hidden"))) # else # define GWENHYWFAR_EXPORT # define GWENHYWFAR_NOEXPORT # endif # ifdef __GNUC__ # define GWEN_UNUSED __attribute__((unused)) # else # define GWEN_UNUSED # endif #endif #if GWENHYWFAR_SYS_IS_WINDOWS # define GWENHYWFAR_CB __stdcall #else # define GWENHYWFAR_CB #endif #if GWENHYWFAR_SYS_IS_WINDOWS #ifdef __MINGW32__ # define GWEN_DIR_SEPARATOR '/' # define GWEN_DIR_SEPARATOR_S "/" #else # define GWEN_DIR_SEPARATOR '\\' # define GWEN_DIR_SEPARATOR_S "\\" #endif # define GWEN_SEARCHPATH_SEPARATOR ';' # define GWEN_SEARCHPATH_SEPARATOR_S ";" #else /** The directory separator character. This is '/' on UNIX machines and '\' under Windows. Since gwenhywfar-2.5.4. */ # define GWEN_DIR_SEPARATOR '/' /** The directory separator as a string. This is "/" on UNIX machines and "\" under Windows. Since gwenhywfar-2.5.4. */ # define GWEN_DIR_SEPARATOR_S "/" /** The search path separator character. This is ':' on UNIX machines and ';' under Windows. Since gwenhywfar-2.5.4. */ # define GWEN_SEARCHPATH_SEPARATOR ':' /** The search path separator as a string. This is ":" on UNIX machines and ";" under Windows. Since gwenhywfar-2.5.4. */ # define GWEN_SEARCHPATH_SEPARATOR_S ":" #endif /* Convenience macros to test the versions of glibc and gcc. Taken from which does not contain this on MinGW systems. */ #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif /* __GNUC_PREREQ */ /* Taken from which does not contain this on MinGW systems. */ #ifndef __STRING # define __STRING(x) #x #endif /* __STRING */ /* This is needed for PalmOS, because it define some functions needed */ #include #include #if __GNUC_PREREQ(3, 0) /* Only available in gcc >= 3.0.x */ # define GWEN_DEPRECATED __attribute__((deprecated)) # define GWEN_UNUSED __attribute__((unused)) # define GWEN_LIKELY(cond) __builtin_expect(!!(cond), 1) # define GWEN_UNLIKELY(cond) __builtin_expect(!!(cond), 0) #else # define GWEN_DEPRECATED # define GWEN_UNUSED # define GWEN_LIKELY(cond) (!!(cond)) # define GWEN_UNLIKELY(cond) (!!(cond)) #endif /* __GNUC__ */ #if defined(__GNUC__) && !defined(__MINGW32__) # define GWEN_FORMAT(fmt, pos, argstart) \ __attribute__ ((format (fmt, pos, argstart))) #else # define GWEN_FORMAT(fmt, pos, argstart) #endif #define GWEN_TIMEOUT_NONE (0) #define GWEN_TIMEOUT_FOREVER (-1) #endif gwenhywfar-5.12.1/src/testlib.c0000664000175000017500000002475714460564441013334 00000000000000 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gwenhywfar.h" int check1() { const char *testString="01234567890123456789"; int rv; GWEN_BUFFER *buf1; GWEN_BUFFER *buf2; const char *p1, *p2; int i; int len; fprintf(stderr, "Check 1 ..."); buf1=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Base64_Encode((const unsigned char *)testString, strlen(testString), buf1, 0); if (rv) { fprintf(stderr, "FAILED: Could not encode.\n"); return 2; } buf2=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Base64_Decode((const unsigned char *)GWEN_Buffer_GetStart(buf1), 0, buf2); if (rv) { fprintf(stderr, "FAILED: Could not decode.\n"); return 2; } p1=testString; len=strlen(testString); p2=GWEN_Buffer_GetStart(buf2); if (GWEN_Buffer_GetUsedBytes(buf2)!=len) { fprintf(stderr, "Data differs in size\n"); return 3; } rv=0; for (i=0; i1) cmd=argv[1]; else cmd="check"; if (strcasecmp(cmd, "check")==0) { rv=check1() || check2() || test_gui(0) || check_directory() || check_list() || check_constlist() || print_paths() ; } else if (strcasecmp(cmd, "gui")==0) { rv=test_gui(1); } else if (strcasecmp(cmd, "date")==0) { rv=test_date(); } else if (strcasecmp(cmd, "json")==0) { if (argc<4) { fprintf(stderr, "args: FILENAME SEARCHPATH.\n"); return 1; } rv=test_json(argv[2], argv[3]); } else { fprintf(stderr, "Unknown command \"%s\"\n", cmd); return 1; } return rv; } gwenhywfar-5.12.1/src/xmlcmd/0000755000175000017500000000000015032533713013037 500000000000000gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_p.h0000666000175000017500000000353113702435660014745 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_P_H #define GWEN_XMLCMD_P_H #include #include #include struct GWEN_XMLCOMMANDER { GWEN_INHERIT_ELEMENT(GWEN_XMLCOMMANDER) GWEN_XMLCMD_HANDLECHILDREN_FN handleChildrenFn; }; #endif /* GWEN_XML2DB_P_H */ gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml_todb.h0000666000175000017500000000377013702435660016472 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_GXML_TODB_H #define GWEN_XMLCMD_GXML_TODB_H #include #include #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API GWEN_XMLCOMMANDER *GWEN_XmlCommanderGwenXml_toDb_new(GWEN_XMLNODE *xmlNodeDocument, GWEN_DB_NODE *dbDestination); #ifdef __cplusplus } #endif #endif /* GWEN_XML2DB_H */ gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml_p.h0000666000175000017500000000435413702435660016000 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_GXMLP_H #define GWEN_XMLCMD_GXMLP_H #include #include #include typedef struct GWEN_XMLCMD_GXML GWEN_XMLCMD_GXML; struct GWEN_XMLCMD_GXML { GWEN_XMLNODE *docRoot; /* provided by caller (dont free) */ GWEN_XMLNODE *currentDocNode; /* pointer, dont free */ GWEN_XMLNODE_LIST2 *xmlNodeStack; /* do free */ GWEN_DB_NODE *dbRoot; /* provided by caller (dont free) */ GWEN_DB_NODE *currentDbGroup; /* pointer, dont free */ GWEN_DB_NODE *tempDbRoot; /* do free */ GWEN_DB_NODE *currentTempDbGroup; /* pointer, dont free */ }; #endif /* GWEN_XML2DB_P_H */ gwenhywfar-5.12.1/src/xmlcmd/Makefile.am0000666000175000017500000000166513702435660015033 00000000000000AM_CPPFLAGS= -I$(gwenhywfar_symlinkdir) \ -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/os \ -I$(top_srcdir)/src/parser @all_includes@ AM_CFLAGS=@visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR noinst_LTLIBRARIES=libxmlcmd.la noinst_HEADERS=\ xmlcmd_p.h \ xmlcmd_gxml_p.h iheaderdir=$(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS=\ xmlcmd.h \ xmlcmd_gxml.h \ xmlcmd_gxml_todb.h \ xmlcmd_gxml_fromdb.h libxmlcmd_la_SOURCES=\ xmlcmd.c \ xmlcmd_gxml.c \ xmlcmd_gxml_todb.c \ xmlcmd_gxml_fromdb.c if WITH_LIBXML2_CODE AM_CPPFLAGS += $(LIBXML_CFLAGS) noinst_HEADERS += \ xmlcmd_lxml_p.h iheader_HEADERS += \ xmlcmd_lxml.h \ xmlcmd_lxml_todb.h libxmlcmd_la_SOURCES += \ xmlcmd_lxml.c \ xmlcmd_lxml_todb.c endif # WITH_LIBXML2_CODE sources: for f in $(libxmlcmd_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/src/xmlcmd/xmlcmd.c0000666000175000017500000000501513702435660014420 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xmlcmd_p.h" #include #include GWEN_INHERIT_FUNCTIONS(GWEN_XMLCOMMANDER) GWEN_XMLCOMMANDER *GWEN_XmlCommander_new(void) { GWEN_XMLCOMMANDER *cmd; GWEN_NEW_OBJECT(GWEN_XMLCOMMANDER, cmd); assert(cmd); GWEN_INHERIT_INIT(GWEN_XMLCOMMANDER, cmd); return cmd; } void GWEN_XmlCommander_free(GWEN_XMLCOMMANDER *cmd) { if (cmd) { GWEN_INHERIT_FINI(GWEN_XMLCOMMANDER, cmd); GWEN_FREE_OBJECT(cmd); } } GWEN_XMLCMD_HANDLECHILDREN_FN GWEN_XmlCommander_SetHandleChildrenFn(GWEN_XMLCOMMANDER *cmd, GWEN_XMLCMD_HANDLECHILDREN_FN f) { GWEN_XMLCMD_HANDLECHILDREN_FN oldFn; oldFn=cmd->handleChildrenFn; cmd->handleChildrenFn=f; return oldFn; } int GWEN_XmlCommander_HandleChildren(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { if (cmd->handleChildrenFn) return (cmd->handleChildrenFn)(cmd, xmlNode); else return GWEN_ERROR_NOT_IMPLEMENTED; } gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_lxml_todb.h0000666000175000017500000000401513702435660016470 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_LXML_TODB_H #define GWEN_XMLCMD_LXML_TODB_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API GWEN_XMLCOMMANDER *GWEN_XmlCommanderLibXml_toDb_new(xmlNodePtr xmlNodeDocument, GWEN_DB_NODE *dbDestination); #ifdef __cplusplus } #endif #endif /* GWEN_XML2DB_H */ gwenhywfar-5.12.1/src/xmlcmd/Makefile.in0000644000175000017500000007074615032533614015042 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @WITH_LIBXML2_CODE_TRUE@am__append_1 = $(LIBXML_CFLAGS) @WITH_LIBXML2_CODE_TRUE@am__append_2 = \ @WITH_LIBXML2_CODE_TRUE@ xmlcmd_lxml_p.h @WITH_LIBXML2_CODE_TRUE@am__append_3 = \ @WITH_LIBXML2_CODE_TRUE@ xmlcmd_lxml.h \ @WITH_LIBXML2_CODE_TRUE@ xmlcmd_lxml_todb.h @WITH_LIBXML2_CODE_TRUE@am__append_4 = \ @WITH_LIBXML2_CODE_TRUE@ xmlcmd_lxml.c \ @WITH_LIBXML2_CODE_TRUE@ xmlcmd_lxml_todb.c subdir = src/xmlcmd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__iheader_HEADERS_DIST) \ $(am__noinst_HEADERS_DIST) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxmlcmd_la_LIBADD = am__libxmlcmd_la_SOURCES_DIST = xmlcmd.c xmlcmd_gxml.c \ xmlcmd_gxml_todb.c xmlcmd_gxml_fromdb.c xmlcmd_lxml.c \ xmlcmd_lxml_todb.c @WITH_LIBXML2_CODE_TRUE@am__objects_1 = xmlcmd_lxml.lo \ @WITH_LIBXML2_CODE_TRUE@ xmlcmd_lxml_todb.lo am_libxmlcmd_la_OBJECTS = xmlcmd.lo xmlcmd_gxml.lo xmlcmd_gxml_todb.lo \ xmlcmd_gxml_fromdb.lo $(am__objects_1) libxmlcmd_la_OBJECTS = $(am_libxmlcmd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xmlcmd.Plo \ ./$(DEPDIR)/xmlcmd_gxml.Plo ./$(DEPDIR)/xmlcmd_gxml_fromdb.Plo \ ./$(DEPDIR)/xmlcmd_gxml_todb.Plo ./$(DEPDIR)/xmlcmd_lxml.Plo \ ./$(DEPDIR)/xmlcmd_lxml_todb.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxmlcmd_la_SOURCES) DIST_SOURCES = $(am__libxmlcmd_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__iheader_HEADERS_DIST = xmlcmd.h xmlcmd_gxml.h xmlcmd_gxml_todb.h \ xmlcmd_gxml_fromdb.h xmlcmd_lxml.h xmlcmd_lxml_todb.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(iheaderdir)" am__noinst_HEADERS_DIST = xmlcmd_p.h xmlcmd_gxml_p.h xmlcmd_lxml_p.h HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/os -I$(top_srcdir)/src/parser \ @all_includes@ $(am__append_1) AM_CFLAGS = @visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR noinst_LTLIBRARIES = libxmlcmd.la noinst_HEADERS = xmlcmd_p.h xmlcmd_gxml_p.h $(am__append_2) iheaderdir = $(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS = xmlcmd.h xmlcmd_gxml.h xmlcmd_gxml_todb.h \ xmlcmd_gxml_fromdb.h $(am__append_3) libxmlcmd_la_SOURCES = xmlcmd.c xmlcmd_gxml.c xmlcmd_gxml_todb.c \ xmlcmd_gxml_fromdb.c $(am__append_4) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xmlcmd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xmlcmd/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxmlcmd.la: $(libxmlcmd_la_OBJECTS) $(libxmlcmd_la_DEPENDENCIES) $(EXTRA_libxmlcmd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxmlcmd_la_OBJECTS) $(libxmlcmd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcmd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcmd_gxml.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcmd_gxml_fromdb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcmd_gxml_todb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcmd_lxml.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcmd_lxml_todb.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xmlcmd.Plo -rm -f ./$(DEPDIR)/xmlcmd_gxml.Plo -rm -f ./$(DEPDIR)/xmlcmd_gxml_fromdb.Plo -rm -f ./$(DEPDIR)/xmlcmd_gxml_todb.Plo -rm -f ./$(DEPDIR)/xmlcmd_lxml.Plo -rm -f ./$(DEPDIR)/xmlcmd_lxml_todb.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iheaderHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xmlcmd.Plo -rm -f ./$(DEPDIR)/xmlcmd_gxml.Plo -rm -f ./$(DEPDIR)/xmlcmd_gxml_fromdb.Plo -rm -f ./$(DEPDIR)/xmlcmd_gxml_todb.Plo -rm -f ./$(DEPDIR)/xmlcmd_lxml.Plo -rm -f ./$(DEPDIR)/xmlcmd_lxml_todb.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iheaderHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-iheaderHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-iheaderHEADERS .PRECIOUS: Makefile sources: for f in $(libxmlcmd_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_lxml.c0000664000175000017500000003607414460564441015465 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xmlcmd_lxml_p.h" #include #include #include GWEN_INHERIT(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML) /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static void GWENHYWFAR_CB _freeData(void *bp, void *p); static void *_handleXmlPath(const char *entry, void *data, int idx, uint32_t flags); GWEN_XMLCMD_LXML_TWOSTRINGS *_twoStrings_new(); void _twoStrings_free(GWEN_XMLCMD_LXML_TWOSTRINGS *ts); GWEN_XMLCMD_LXML_TWOSTRINGS *_twoStrings_fromString(const char *source, uint8_t delimiter); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ GWEN_XMLCOMMANDER *GWEN_XmlCommanderLibXml_new(xmlNodePtr documentRoot, GWEN_DB_NODE *dbRoot) { GWEN_XMLCOMMANDER *cmd; GWEN_XMLCMD_LXML *xcmd; cmd=GWEN_XmlCommander_new(); GWEN_NEW_OBJECT(GWEN_XMLCMD_LXML, xcmd); GWEN_INHERIT_SETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd, xcmd, _freeData); xcmd->docRoot=documentRoot; xcmd->dbRoot=dbRoot; xcmd->tempDbRoot=GWEN_DB_Group_new("dbTempRoot"); xcmd->currentDbGroup=xcmd->dbRoot; xcmd->currentTempDbGroup=xcmd->tempDbRoot; xcmd->currentDocNode=documentRoot; return cmd; } void _freeData(GWEN_UNUSED void *bp, void *p) { GWEN_XMLCMD_LXML *xcmd; xcmd=(GWEN_XMLCMD_LXML*) p; GWEN_DB_Group_free(xcmd->tempDbRoot); GWEN_FREE_OBJECT(xcmd); } xmlNodePtr GWEN_XmlCommanderLibXml_GetDocRoot(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); return xcmd->docRoot; } xmlNodePtr GWEN_XmlCommanderLibXml_GetCurrentDocNode(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); return xcmd->currentDocNode; } void GWEN_XmlCommanderLibXml_SetCurrentDocNode(GWEN_XMLCOMMANDER *cmd, xmlNodePtr n) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); xcmd->currentDocNode=n; } GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetDbRoot(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); return xcmd->dbRoot; } GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetCurrentDbGroup(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); return xcmd->currentDbGroup; } void GWEN_XmlCommanderLibXml_SetCurrentDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); xcmd->currentDbGroup=db; } GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetTempDbRoot(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); return xcmd->tempDbRoot; } GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); return xcmd->currentTempDbGroup; } void GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); xcmd->currentTempDbGroup=db; } void GWEN_XmlCommanderLibXml_EnterDocNode(GWEN_XMLCOMMANDER *cmd, xmlNodePtr xNode) { GWEN_XMLCMD_LXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); assert(xNode); if (xcmd->currentStackPosxmlNodeStack[xcmd->currentStackPos]=xNode; xcmd->currentStackPos++; xcmd->currentDocNode=xNode; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Stack full, SNH!"); abort(); } } void GWEN_XmlCommanderLibXml_LeaveDocNode(GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_LXML *xcmd; xmlNodePtr xNode; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_LXML, cmd); assert(xcmd); if (xcmd->currentStackPos>0) { xNode=xcmd->xmlNodeStack[xcmd->currentStackPos-1]; if (xNode==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Nothing on stack"); assert(xNode); } xcmd->currentStackPos--; xcmd->currentDocNode=xNode; } } xmlNodePtr GWEN_XmlCommanderLibXml_GetXmlNode(xmlNodePtr n, const char *path, uint32_t flags) { return (xmlNodePtr)GWEN_Path_HandleWithIdx(path, n, flags, _handleXmlPath); } xmlNodePtr GWEN_XmlCommanderLibXml_FindFirstElement(xmlNodePtr parent, const char *elemName) { xmlNodePtr n; n=parent->children; while (n) { if (n->type==XML_ELEMENT_NODE) { if (n->name && strcmp((const char *)n->name, elemName)==0) { return n; } } n=n->next; } /* while */ return NULL; } xmlNodePtr GWEN_XmlCommanderLibXml_FindNextElement(xmlNodePtr elem, const char *elemName) { xmlNodePtr n; assert(elem); n=elem->next; while (n) { if (n->type==XML_ELEMENT_NODE) { if (n->name && strcmp((const char *)n->name, elemName)==0) { return n; } } n=n->next; } /* while */ return NULL; } int GWEN_XmlCommanderLibXml_SetXmlCharValue(xmlNodePtr n, const char *path, const char *value) { xmlNodePtr node; node=GWEN_XmlCommanderLibXml_GetXmlNode(n, path, 0); if (!node) { DBG_INFO(GWEN_LOGDOMAIN, "here"); return GWEN_ERROR_GENERIC; } xmlNodeSetContent(node, BAD_CAST value); return 0; } const char *GWEN_XmlCommanderLibXml_GetXmlCharValue(xmlNodePtr n, const char *path, const char *defValue) { xmlNodePtr node; node=GWEN_XmlCommanderLibXml_GetXmlNode(n, path, GWEN_PATH_FLAGS_NAMEMUSTEXIST); if (!node) { DBG_INFO(GWEN_LOGDOMAIN, "path [%s] not found", path); return defValue; } node=node->children; if (node==0) return defValue; while (node) { if (node->type==XML_TEXT_NODE) { return (const char *)node->content; } node=node->next; } return defValue; } int GWEN_XmlCommanderLibXml_SetIntValue(xmlNodePtr n, const char *path, int value) { char numbuf[32]; snprintf(numbuf, sizeof(numbuf)-1, "%d", value); numbuf[sizeof(numbuf)-1]=0; return GWEN_XmlCommanderLibXml_SetXmlCharValue(n, path, numbuf); } int GWEN_XmlCommanderLibXml_GetIntValue(xmlNodePtr n, const char *path, int defValue) { const char *s; int i; s=GWEN_XmlCommanderLibXml_GetXmlCharValue(n, path, NULL); if (s==NULL) return defValue; if (1!=sscanf(s, "%i", &i)) return defValue; return i; } const char *GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(xmlNodePtr elem, const char *path, const char *defValue) { GWEN_XMLCMD_LXML_TWOSTRINGS *tsLevel1; tsLevel1=_twoStrings_fromString(path, '@'); if (tsLevel1->string2) { xmlNodePtr n; /* really two strings, so string1 is node, string2 is property name */ n=GWEN_XmlCommanderLibXml_GetXmlNode(elem, tsLevel1->string1, GWEN_PATH_FLAGS_PATHMUSTEXIST); if (n) { GWEN_XMLCMD_LXML_TWOSTRINGS *tsLevel2; const char *result=NULL; tsLevel2=_twoStrings_fromString(tsLevel1->string2, ':'); if (tsLevel2->string2) { /* really two strings, so string1 is namespace, string2 is property name */ result=(const char*) xmlGetNsProp(n, BAD_CAST tsLevel2->string2, BAD_CAST tsLevel2->string1); } else { /* only one string, so no namespace given */ result=(const char*) xmlGetNoNsProp(n, BAD_CAST tsLevel2->string1); } if (result) { _twoStrings_free(tsLevel2); _twoStrings_free(tsLevel1); return result; } /* else fall-through */ _twoStrings_free(tsLevel2); } /* else fall-through */ } else { xmlNodePtr n; /* only one string, so string1 is node */ n=GWEN_XmlCommanderLibXml_GetXmlNode(elem, tsLevel1->string1, GWEN_PATH_FLAGS_PATHMUSTEXIST); if (n) { n=n->children; while (n) { if (n->type==XML_TEXT_NODE) { _twoStrings_free(tsLevel1); return (const char *)n->content; } n=n->next; } } } _twoStrings_free(tsLevel1); DBG_INFO(GWEN_LOGDOMAIN, "path [%s] not found", path); return defValue; } void GWEN_XmlCommanderLibXml_SetXmlCharValueByPath(xmlNodePtr elem, const char *path, const char *value) { GWEN_XMLCMD_LXML_TWOSTRINGS *tsLevel1; tsLevel1=_twoStrings_fromString(path, '@'); if (tsLevel1->string2) { xmlNodePtr n; /* really two strings, so string1 is node, string2 is property name */ n=GWEN_XmlCommanderLibXml_GetXmlNode(elem, tsLevel1->string1, 0); if (n) { GWEN_XMLCMD_LXML_TWOSTRINGS *tsLevel2; tsLevel2=_twoStrings_fromString(tsLevel1->string2, ':'); if (tsLevel2->string2) { xmlNsPtr nameSpace; /* really two strings, so string1 is namespace, string2 is property name */ nameSpace=xmlSearchNs(n->doc, n, BAD_CAST tsLevel2->string1); xmlNewNsProp(n, nameSpace, BAD_CAST tsLevel2->string2, BAD_CAST value); } else { /* only one string, so no namespace given */ xmlNewProp(n, BAD_CAST tsLevel2->string1, BAD_CAST value); } _twoStrings_free(tsLevel2); } /* else fall-through */ } else { xmlNodePtr n; /* only one string, so string1 is node */ n=GWEN_XmlCommanderLibXml_GetXmlNode(elem, tsLevel1->string1, 0); if (n) xmlNodeSetContent(n, BAD_CAST value); } _twoStrings_free(tsLevel1); } void *_handleXmlPath(const char *entry, void *data, int idx, uint32_t flags) { xmlNodePtr n; xmlNodePtr nn; int i; xmlNsPtr nameSpace=NULL; const char *p; const char *name; n=(xmlNodePtr)data; name=entry; p=strchr(entry, ':'); if (p) { char prefix[32]; int plen; plen=p-entry; if (plen) { if (plen>=sizeof(prefix)) { DBG_ERROR(GWEN_LOGDOMAIN, "Prefix too long (%d>%d)", (int)plen, (int)sizeof(prefix)); return 0; } strncpy(prefix, entry, plen); prefix[plen]=0; nameSpace=xmlSearchNs(n->doc, n, BAD_CAST prefix); if (!nameSpace) { DBG_ERROR(GWEN_LOGDOMAIN, "Namespace \"%s\" not found", prefix); return 0; } } name=p+1; } /* check whether we are allowed to simply create the node */ if ( ((flags & GWEN_PATH_FLAGS_LAST) && (((flags & GWEN_PATH_FLAGS_VARIABLE) && (flags & GWEN_PATH_FLAGS_CREATE_VAR)) || (!(flags & GWEN_PATH_FLAGS_VARIABLE) && (flags & GWEN_PATH_FLAGS_CREATE_GROUP))) ) || ( !(flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_PATHCREATE)) ) { /* simply create the new variable/group */ if (idx!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "Index is not 0, not creating %s[%d]", entry, idx); return 0; } DBG_VERBOUS(GWEN_LOGDOMAIN, "Unconditionally creating entry \"%s\"", entry); nn=xmlNewChild(n, nameSpace, BAD_CAST name, NULL); return nn; } /* find the node */ nn=n->children; i=idx; while (nn) { if (nn->type==XML_ELEMENT_NODE) { if (nn->name && strcmp((const char *)nn->name, name)==0) { if (i--==0) break; } } nn=nn->next; } /* while */ if (!nn) { /* node not found, check, if we are allowed to create it */ if ( (!(flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_PATHMUSTEXIST)) || (flags & GWEN_PATH_FLAGS_NAMEMUSTEXIST) ) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Entry \"%s\" does not exist", entry); return 0; } /* create the new variable/group */ if (idx!=0) { DBG_INFO(GWEN_LOGDOMAIN, "Index is not 0, not creating %s[%d]", entry, idx); return 0; } DBG_VERBOUS(GWEN_LOGDOMAIN, "Entry \"%s\" not found, creating", entry); nn=xmlNewChild(n, nameSpace, BAD_CAST name, NULL); } /* if node not found */ else { /* node does exist, check whether this is ok */ if ( ((flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_NAMEMUSTNOTEXIST)) || (!(flags & GWEN_PATH_FLAGS_LAST) && (flags & GWEN_PATH_FLAGS_PATHMUSTNOTEXIST)) ) { DBG_VERBOUS(GWEN_LOGDOMAIN, "Entry \"%s\" already exists", entry); return 0; } } return nn; } GWEN_XMLCMD_LXML_TWOSTRINGS *_twoStrings_new() { GWEN_XMLCMD_LXML_TWOSTRINGS *ts; GWEN_NEW_OBJECT(GWEN_XMLCMD_LXML_TWOSTRINGS, ts); return ts; } void _twoStrings_free(GWEN_XMLCMD_LXML_TWOSTRINGS *ts) { if (ts) { if (ts->ownStringsBitmap & 1) { if (ts->string1) free(ts->string1); } if (ts->ownStringsBitmap & 2) { if (ts->string2) free(ts->string2); } GWEN_FREE_OBJECT(ts); } } GWEN_XMLCMD_LXML_TWOSTRINGS *_twoStrings_fromString(const char *source, uint8_t delimiter) { const char *s; GWEN_XMLCMD_LXML_TWOSTRINGS *ts; ts=_twoStrings_new(); s=strchr(source, delimiter); if (s) { int idx; idx=s-source; ts->string1=GWEN_Text_strndup(source, idx); ts->ownStringsBitmap|=1; s++; if (s &&*s) ts->string2=(char*)s; return ts; } else { ts->string1=(char*)source; return ts; } } gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml.h0000666000175000017500000000614313702435660015457 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_GXML_H #define GWEN_XMLCMD_GXML_H #include #include #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API GWEN_XMLCOMMANDER *GWEN_XmlCommanderGwenXml_new(GWEN_XMLNODE *documentRoot, GWEN_DB_NODE *dbRoot); GWENHYWFAR_API GWEN_XMLNODE *GWEN_XmlCommanderGwenXml_GetDocRoot(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API GWEN_XMLNODE *GWEN_XmlCommanderGwenXml_GetCurrentDocNode(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderGwenXml_SetCurrentDocNode(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *n); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetDbRoot(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetTempDbRoot(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderGwenXml_SetTempDbRoot(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetCurrentTempDbGroup(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderGwenXml_SetCurrentTempDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db); GWENHYWFAR_API void GWEN_XmlCommanderGwenXml_EnterDocNode(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); GWENHYWFAR_API void GWEN_XmlCommanderGwenXml_LeaveDocNode(GWEN_XMLCOMMANDER *cmd); #ifdef __cplusplus } #endif #endif /* GWEN_XML2DB_H */ gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_lxml_p.h0000666000175000017500000000474013702435660016004 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_LXMLP_H #define GWEN_XMLCMD_LXMLP_H #include #include #include #define GWEN_XMLCMD_LXML_PATH_MAXDEPTH 128 typedef struct GWEN_XMLCMD_LXML GWEN_XMLCMD_LXML; struct GWEN_XMLCMD_LXML { xmlNodePtr docRoot; /* provided by caller (dont free) */ xmlNodePtr currentDocNode; /* pointer, dont free */ xmlNodePtr xmlNodeStack[GWEN_XMLCMD_LXML_PATH_MAXDEPTH]; int currentStackPos; GWEN_DB_NODE *dbRoot; /* provided by caller (dont free) */ GWEN_DB_NODE *currentDbGroup; /* pointer, dont free */ GWEN_DB_NODE *tempDbRoot; /* do free */ GWEN_DB_NODE *currentTempDbGroup; /* pointer, dont free */ }; typedef struct GWEN_XMLCMD_LXML_TWOSTRINGS GWEN_XMLCMD_LXML_TWOSTRINGS; struct GWEN_XMLCMD_LXML_TWOSTRINGS { char *string1; char *string2; uint8_t ownStringsBitmap; }; #endif /* GWEN_XML2DB_P_H */ gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml_fromdb.h0000666000175000017500000000367013702435660017012 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_GXML_FROMDB_H #define GWEN_XMLCMD_GXML_FROMDB_H #include #include #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API GWEN_XMLCOMMANDER *GWEN_XmlCommanderGwenXml_fromDb_new(GWEN_XMLNODE *xmlNodeDestination,GWEN_DB_NODE *dbSource); #ifdef __cplusplus } #endif #endif /* GWEN_XML2DB_H */ gwenhywfar-5.12.1/src/xmlcmd/xmlcmd.h0000666000175000017500000000464213702435660014432 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_H #define GWEN_XMLCMD_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_XMLCOMMANDER GWEN_XMLCOMMANDER; GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_XMLCOMMANDER, GWENHYWFAR_API) typedef int (*GWEN_XMLCMD_HANDLECHILDREN_FN)(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); GWENHYWFAR_API GWEN_XMLCOMMANDER *GWEN_XmlCommander_new(void); GWENHYWFAR_API void GWEN_XmlCommander_free(GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API GWEN_XMLCMD_HANDLECHILDREN_FN GWEN_XmlCommander_SetHandleChildrenFn(GWEN_XMLCOMMANDER *cmd, GWEN_XMLCMD_HANDLECHILDREN_FN f); GWENHYWFAR_API int GWEN_XmlCommander_HandleChildren(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); #ifdef __cplusplus } #endif #endif /* GWEN_XML2DB_H */ gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml_todb.c0000664000175000017500000005234114043240674016457 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xmlcmd_gxml_todb.h" #include "xmlcmd_gxml.h" #include #include #include #include /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static int _handleChildren_toDb(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static const char *_getCharValueByPath(GWEN_XMLNODE *xmlNode, const char *path, const char *defValue); static int _convertAndSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value); static int _handleDbSetCharValue_internal(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent); static int _handleXmlEnter(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlForEvery(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbCreateAndEnterGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbCreateAndEnterTempGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbSetTempCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfNotCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfNotHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfNotPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ GWEN_XMLCOMMANDER *GWEN_XmlCommanderGwenXml_toDb_new(GWEN_XMLNODE *xmlNodeDocument, GWEN_DB_NODE *dbDestination) { GWEN_XMLCOMMANDER *cmd; cmd=GWEN_XmlCommanderGwenXml_new(xmlNodeDocument, dbDestination); GWEN_XmlCommander_SetHandleChildrenFn(cmd, _handleChildren_toDb); return cmd; } int _handleChildren_toDb(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_INFO(GWEN_LOGDOMAIN, "Handling element \"%s\"", name); if (strcasecmp(name, "XmlEnter")==0) rv=_handleXmlEnter(cmd, n); else if (strcasecmp(name, "XmlForEvery")==0) rv=_handleXmlForEvery(cmd, n); else if (strcasecmp(name, "DbCreateAndEnterGroup")==0) rv=_handleDbCreateAndEnterGroup(cmd, n); else if (strcasecmp(name, "DbCreateAndEnterTempGroup")==0) rv=_handleDbCreateAndEnterTempGroup(cmd, n); else if (strcasecmp(name, "DbSetCharValue")==0) rv=_handleDbSetCharValue(cmd, n); else if (strcasecmp(name, "DbSetTempCharValue")==0) rv=_handleDbSetTempCharValue(cmd, n); else if (strcasecmp(name, "XmlIfCharDataMatches")==0) rv=_handleXmlIfCharDataMatches(cmd, n); else if (strcasecmp(name, "XmlIfNotCharDataMatches")==0) rv=_handleXmlIfNotCharDataMatches(cmd, n); else if (strcasecmp(name, "XmlIfHasCharData")==0) rv=_handleXmlIfHasCharData(cmd, n); else if (strcasecmp(name, "XmlIfNotHasCharData")==0) rv=_handleXmlIfNotHasCharData(cmd, n); else if (strcasecmp(name, "XmlIfPathExists")==0) rv=_handleXmlIfPathExists(cmd, n); else if (strcasecmp(name, "XmlIfNotPathExists")==0) rv=_handleXmlIfNotPathExists(cmd, n); else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown element \"%s\", aborting", name); return GWEN_ERROR_INVALID; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } const char *_getCharValueByPath(GWEN_XMLNODE *xmlNode, const char *path, const char *defValue) { const char *s; s=strchr(path, '@'); if (s) { int idx; char *cpyOfPath; char *property; GWEN_XMLNODE *n; idx=s-path; cpyOfPath=strdup(path); assert(cpyOfPath); cpyOfPath[idx]=0; property=cpyOfPath+idx+1; if (*cpyOfPath) { n=GWEN_XMLNode_GetNodeByXPath(xmlNode, cpyOfPath, GWEN_PATH_FLAGS_PATHMUSTEXIST); } else n=xmlNode; if (n) { const char *result; result=GWEN_XMLNode_GetProperty(n, property, defValue); DBG_INFO(GWEN_LOGDOMAIN, "Got XML property: %s = %s (%s)", property, result, path); free(cpyOfPath); return result; } free(cpyOfPath); return defValue; } else return GWEN_XMLNode_GetCharValueByPath(xmlNode, path, defValue); } /* TODO: optimize later */ int _convertAndSetCharValue(GWEN_UNUSED GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value) { if (value && *value) { const char *name; const char *typ; const char *mode; int doTrim=0; GWEN_BUFFER *vbuf; GWEN_BUFFER *resultBuf; doTrim=GWEN_XMLNode_GetIntProperty(xmlNode, "trim", 0); vbuf=GWEN_Buffer_new(0, 256, 0, 1); resultBuf=GWEN_Buffer_new(0, 256, 0, 1); name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } typ=GWEN_XMLNode_GetProperty(xmlNode, "type", "string"); if (!(typ && *typ)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty type in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } mode=GWEN_XMLNode_GetProperty(xmlNode, "mode", "add"); if (strcasecmp(typ, "string")==0) { GWEN_Buffer_AppendString(vbuf, value); if (doTrim) GWEN_Text_CondenseBuffer(vbuf); } else if (strcasecmp(typ, "date")==0) { const char *tmpl; GWEN_DATE *dt=NULL; tmpl=GWEN_XMLNode_GetProperty(xmlNode, "template", "YYYYMMDD"); if (!(tmpl && *tmpl)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty date template in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } dt=GWEN_Date_fromStringWithTemplate(value, tmpl); if (dt) { GWEN_Buffer_AppendString(vbuf, GWEN_Date_GetString(dt)); GWEN_Date_free(dt); } } else if (strcasecmp(typ, "time")==0) { const char *tmpl; GWEN_TIME *ti=NULL; tmpl=GWEN_XMLNode_GetProperty(xmlNode, "template", "YYYYMMDDhhmmss"); if (!(tmpl && *tmpl)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty time template in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } ti=GWEN_Time_fromString(value, tmpl); if (ti) { GWEN_Time_toString(ti, "YYYYMMDDhhmmss", vbuf); GWEN_Time_free(ti); } else { DBG_INFO(GWEN_LOGDOMAIN, "Invalid timespec \"%s\" according to template \"%s\"", value?value:"", tmpl); return GWEN_ERROR_INVALID; } } if (strcasecmp(mode, "add")==0) { /* just exchange the buffer */ GWEN_Buffer_free(resultBuf); resultBuf=vbuf; vbuf=NULL; } else if (strcasecmp(mode, "append")==0) { const char *s; s=GWEN_DB_GetCharValue(dbCurrent, name, 0, NULL); if (s && *s) { const char *delimiter; /* write previous data into resultBuffer */ GWEN_Buffer_AppendString(resultBuf, s); /* possibly write delimiter into resultBuffer */ delimiter=GWEN_XMLNode_GetProperty(xmlNode, "delimiter", NULL); if (delimiter && *delimiter) { if (strcasecmp(delimiter, "\\n")==0) GWEN_Buffer_AppendByte(resultBuf, '\n'); else if (strcasecmp(delimiter, "\\t")==0) GWEN_Buffer_AppendByte(resultBuf, '\t'); else GWEN_Buffer_AppendString(resultBuf, delimiter); } } /* if previous value */ /* write value into resultBuffer */ GWEN_Buffer_AppendString(resultBuf, GWEN_Buffer_GetStart(vbuf)); GWEN_DB_DeleteVar(dbCurrent, name); } else if (strcasecmp(mode, "replace")==0) { /* just exchange the buffer */ GWEN_Buffer_free(resultBuf); resultBuf=vbuf; vbuf=NULL; GWEN_DB_DeleteVar(dbCurrent, name); } DBG_INFO(GWEN_LOGDOMAIN, "Setting value: %s = %s", name, GWEN_Buffer_GetStart(resultBuf)); GWEN_DB_SetCharValue(dbCurrent, GWEN_DB_FLAGS_DEFAULT, name, GWEN_Buffer_GetStart(resultBuf)); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); } return 0; } int _handleXmlEnter(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; GWEN_XMLNODE *n; int rv; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (path==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing path in \"EnterPath\""); return GWEN_ERROR_INVALID; } n=GWEN_XMLNode_GetNodeByXPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_PATHMUSTEXIST); if (n==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "XmlEnter: Path \"%s\" does not exist", path); return GWEN_ERROR_INVALID; } /* enter given document node */ GWEN_XmlCommanderGwenXml_EnterDocNode(cmd, n); rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } /* leave given document node, re-select previously active one, thus restoring status from the beginning */ GWEN_XmlCommanderGwenXml_LeaveDocNode(cmd); return 0; } int _handleXmlForEvery(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; GWEN_XMLNODE *n; int rv; path=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (path==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing name in \"ForEvery\""); return GWEN_ERROR_INVALID; } n=GWEN_XMLNode_FindFirstTag(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, NULL, NULL); if (n==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "XmlForEvery: Path \"%s\" not found, not entering", path); /* GWEN_XMLNode_Dump(cmd->currentDocNode, 2); */ } while (n) { DBG_INFO(GWEN_LOGDOMAIN, "XmlForEvery: Entering path \"%s\"", path); /* enter given document node */ GWEN_XmlCommanderGwenXml_EnterDocNode(cmd, n); /* handle all children of this parser XML node with the current document node */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* leave given document node, re-select previously active one, thus restoring status from the beginning */ GWEN_XmlCommanderGwenXml_LeaveDocNode(cmd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } n=GWEN_XMLNode_FindNextTag(n, path, NULL, NULL); } return 0; } int _handleDbCreateAndEnterGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbLast; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"CreateAnEnterDbGroup\""); return GWEN_ERROR_INVALID; } /* push group */ dbLast=GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd); /* create group */ GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(cmd, GWEN_DB_GetGroup(dbLast, GWEN_PATH_FLAGS_CREATE_GROUP, name)); /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* pop group */ GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(cmd, dbLast); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int _handleDbCreateAndEnterTempGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbLast; GWEN_DB_NODE *dbCurrent; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"CreateAnEnterTempDbGroup\""); return GWEN_ERROR_INVALID; } /* push group */ dbLast=GWEN_XmlCommanderGwenXml_GetCurrentTempDbGroup(cmd); /* create group */ dbCurrent=GWEN_DB_GetGroup(dbLast, GWEN_PATH_FLAGS_CREATE_GROUP, name); GWEN_XmlCommanderGwenXml_SetCurrentTempDbGroup(cmd, dbCurrent); /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* delete temp group */ GWEN_DB_UnlinkGroup(dbCurrent); GWEN_DB_Group_free(dbCurrent); /* pop group */ GWEN_XmlCommanderGwenXml_SetCurrentTempDbGroup(cmd, dbLast); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int _handleDbSetCharValue_internal(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent) { const char *name; const char *value; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"SetCharValue\""); return GWEN_ERROR_INVALID; } value=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (value) { GWEN_BUFFER *dbuf; int rv; dbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_DB_ReplaceVars(GWEN_XmlCommanderGwenXml_GetCurrentTempDbGroup(cmd), value, dbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(dbuf); return rv; } _convertAndSetCharValue(cmd, xmlNode, dbCurrent, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } else { const char *path; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"SetCharValue\""); return GWEN_ERROR_INVALID; } value=_getCharValueByPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, NULL); if (value && *value) { _convertAndSetCharValue(cmd, xmlNode, dbCurrent, value); } #if 0 else { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_XMLNode_GetXPath(NULL, GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), tbuf); DBG_ERROR(GWEN_LOGDOMAIN, "No value in path \"%s\" (%s)", path, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); /* GWEN_XMLNode_Dump(cmd->currentDocNode, 2); */ } #endif } return 0; } int _handleDbSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { return _handleDbSetCharValue_internal(cmd, xmlNode, GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd)); } int _handleDbSetTempCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { return _handleDbSetCharValue_internal(cmd, xmlNode, GWEN_XmlCommanderGwenXml_GetCurrentTempDbGroup(cmd)); } int _handleXmlIfCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *pattern; const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfCharDataMatches\""); return GWEN_ERROR_INVALID; } pattern=GWEN_XMLNode_GetProperty(xmlNode, "pattern", NULL); if (!(pattern && *pattern)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty pattern in \"IfCharDataMatches\""); return GWEN_ERROR_INVALID; } value=_getCharValueByPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, NULL); if (value) { if (-1!=GWEN_Text_ComparePattern(value, pattern, 0)) { int rv; /* pattern matches, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } int _handleXmlIfNotCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *pattern; const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfNotCharDataMatches\""); return GWEN_ERROR_INVALID; } pattern=GWEN_XMLNode_GetProperty(xmlNode, "pattern", NULL); if (!(pattern && *pattern)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty pattern in \"IfNotCharDataMatches\""); return GWEN_ERROR_INVALID; } value=_getCharValueByPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, NULL); if (value) { if (-1==GWEN_Text_ComparePattern(value, pattern, 0)) { int rv; /* pattern doesnt match, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } int _handleXmlIfHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfCharDataMatches\""); return GWEN_ERROR_INVALID; } value=_getCharValueByPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, NULL); if (value && *value) { int rv; /* there is a value, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "XmlIfHasCharData: No value for path \"%s\"", path); } return 0; } int _handleXmlIfNotHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfNotCharDataMatches\""); return GWEN_ERROR_INVALID; } value=_getCharValueByPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, NULL); if (!(value && *value)) { int rv; /* there is a value, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _handleXmlIfPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfPathExists\""); return GWEN_ERROR_INVALID; } if (GWEN_XMLNode_GetNodeByXPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_PATHMUSTEXIST)) { int rv; /* path exists, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "XmlIfPathExists: Path \"%s\" does not exist", path); } return 0; } int _handleXmlIfNotPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfNotPathExists\""); return GWEN_ERROR_INVALID; } if (NULL==GWEN_XMLNode_GetNodeByXPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_PATHMUSTEXIST)) { int rv; /* path does not exist, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "Path \"%s\" exists", path); } return 0; } gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml.c0000666000175000017500000001324413702435660015452 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xmlcmd_gxml_p.h" #include #include GWEN_INHERIT(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML) static void GWENHYWFAR_CB _freeData(void *bp, void *p); GWEN_XMLCOMMANDER *GWEN_XmlCommanderGwenXml_new(GWEN_XMLNODE *documentRoot, GWEN_DB_NODE *dbRoot) { GWEN_XMLCOMMANDER *cmd; GWEN_XMLCMD_GXML *xcmd; cmd=GWEN_XmlCommander_new(); GWEN_NEW_OBJECT(GWEN_XMLCMD_GXML, xcmd); GWEN_INHERIT_SETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd, xcmd, _freeData); xcmd->docRoot=documentRoot; xcmd->xmlNodeStack=GWEN_XMLNode_List2_new(); xcmd->dbRoot=dbRoot; xcmd->tempDbRoot=GWEN_DB_Group_new("dbTempRoot"); xcmd->currentDbGroup=xcmd->dbRoot; xcmd->currentTempDbGroup=xcmd->tempDbRoot; xcmd->currentDocNode=documentRoot; return cmd; } void GWENHYWFAR_CB _freeData(GWEN_UNUSED void *bp, void *p) { GWEN_XMLCMD_GXML *xcmd; xcmd=(GWEN_XMLCMD_GXML*) p; GWEN_XMLNode_List2_free(xcmd->xmlNodeStack); xcmd->xmlNodeStack=NULL; GWEN_DB_Group_free(xcmd->tempDbRoot); GWEN_FREE_OBJECT(xcmd); } GWEN_XMLNODE *GWEN_XmlCommanderGwenXml_GetDocRoot(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); return xcmd->docRoot; } GWEN_XMLNODE *GWEN_XmlCommanderGwenXml_GetCurrentDocNode(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); return xcmd->currentDocNode; } void GWEN_XmlCommanderGwenXml_SetCurrentDocNode(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *n) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); xcmd->currentDocNode=n; } GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetDbRoot(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); return xcmd->dbRoot; } GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); return xcmd->currentDbGroup; } void GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); xcmd->currentDbGroup=db; } GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetTempDbRoot(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); return xcmd->tempDbRoot; } GWEN_DB_NODE *GWEN_XmlCommanderGwenXml_GetCurrentTempDbGroup(const GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); return xcmd->currentTempDbGroup; } void GWEN_XmlCommanderGwenXml_SetCurrentTempDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); xcmd->currentTempDbGroup=db; } void GWEN_XmlCommanderGwenXml_EnterDocNode(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLCMD_GXML *xcmd; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); assert(xmlNode); GWEN_XMLNode_List2_PushBack(xcmd->xmlNodeStack, xcmd->currentDocNode); xcmd->currentDocNode=xmlNode; } void GWEN_XmlCommanderGwenXml_LeaveDocNode(GWEN_XMLCOMMANDER *cmd) { GWEN_XMLCMD_GXML *xcmd; GWEN_XMLNODE *xmlNode; assert(cmd); xcmd=GWEN_INHERIT_GETDATA(GWEN_XMLCOMMANDER, GWEN_XMLCMD_GXML, cmd); assert(xcmd); xmlNode=GWEN_XMLNode_List2_GetBack(xcmd->xmlNodeStack); if (xmlNode==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Nothing on stack"); assert(xmlNode); } xcmd->currentDocNode=xmlNode; GWEN_XMLNode_List2_PopBack(xcmd->xmlNodeStack); } gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_gxml_fromdb.c0000666000175000017500000004176013702435660017007 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xmlcmd_gxml_fromdb.h" #include "xmlcmd_gxml.h" #include #include #include #include /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static int _handleChildren_fromDb(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbEnter(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbForEvery(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _xmlCreateAndEnterElement(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _xmlSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbIfCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbIfNotCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbIfHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbIfNotHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbIfPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _dbIfNotPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _setCharValueByPath(GWEN_XMLNODE *xmlNode, const char *path, const char *value); static int _convertAndSetCharValue(GWEN_XMLNODE *xmlDocNode, GWEN_XMLNODE *xmlSchemaNode, const char *value); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ GWEN_XMLCOMMANDER *GWEN_XmlCommanderGwenXml_fromDb_new(GWEN_XMLNODE *xmlNodeDestination,GWEN_DB_NODE *dbSource) { GWEN_XMLCOMMANDER *cmd; cmd=GWEN_XmlCommanderGwenXml_new(xmlNodeDestination, dbSource); GWEN_XmlCommander_SetHandleChildrenFn(cmd, _handleChildren_fromDb); return cmd; } int _handleChildren_fromDb(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_INFO(GWEN_LOGDOMAIN, "Handling element \"%s\"", name); if (strcasecmp(name, "DbEnter")==0) rv=_dbEnter(cmd, n); else if (strcasecmp(name, "DbForEvery")==0) rv=_dbForEvery(cmd, n); else if (strcasecmp(name, "XmlCreateAndEnterElement")==0) rv=_xmlCreateAndEnterElement(cmd, n); else if (strcasecmp(name, "XmlSetCharValue")==0) rv=_xmlSetCharValue(cmd, n); else if (strcasecmp(name, "DbIfCharDataMatches")==0) rv=_dbIfCharDataMatches(cmd, n); else if (strcasecmp(name, "DbIfNotCharDataMatches")==0) rv=_dbIfNotCharDataMatches(cmd, n); else if (strcasecmp(name, "DbIfHasCharData")==0) rv=_dbIfHasCharData(cmd, n); else if (strcasecmp(name, "DbIfNotHasCharData")==0) rv=_dbIfNotHasCharData(cmd, n); else if (strcasecmp(name, "DbIfPathExists")==0) rv=_dbIfPathExists(cmd, n); else if (strcasecmp(name, "DbIfNotPathExists")==0) rv=_dbIfNotPathExists(cmd, n); else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown element \"%s\", aborting", name); return GWEN_ERROR_INVALID; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _dbIfPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbNew; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"DbIfPathExists\""); return GWEN_ERROR_INVALID; } dbNew=GWEN_DB_GetGroup(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), GWEN_PATH_FLAGS_NAMEMUSTEXIST, name); if (dbNew) { /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _dbIfNotPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbNew; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"DbIfPathExists\""); return GWEN_ERROR_INVALID; } dbNew=GWEN_DB_GetGroup(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), GWEN_PATH_FLAGS_NAMEMUSTEXIST, name); if (dbNew==NULL) { /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _dbEnter(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbLast; GWEN_DB_NODE *dbNew; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"DbEnter\""); return GWEN_ERROR_INVALID; } /* save group */ dbLast=GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd); dbNew=GWEN_DB_GetGroup(dbLast, GWEN_PATH_FLAGS_NAMEMUSTEXIST, name); if (dbNew) { /* push group */ GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(cmd, dbNew); /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* pop group */ GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(cmd, dbLast); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Group \"%s\" does not exist", name); return GWEN_ERROR_INVALID; } return 0; } int _dbForEvery(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbLast; GWEN_DB_NODE *dbNew; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"DbEnter\""); return GWEN_ERROR_INVALID; } /* save group */ dbLast=GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd); dbNew=GWEN_DB_FindFirstGroup(dbLast, name); while (dbNew) { /* push group */ GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(cmd, dbNew); /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* pop group */ GWEN_XmlCommanderGwenXml_SetCurrentDbGroup(cmd, dbLast); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } dbNew=GWEN_DB_FindNextGroup(dbNew, name); } return 0; } int _dbIfCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; const char *pattern; const char *val; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"dbIfCharDataMatches\""); return GWEN_ERROR_INVALID; } pattern=GWEN_XMLNode_GetProperty(xmlNode, "pattern", NULL); if (!(pattern && *pattern)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty pattern in \"dbIfCharDataMatches\""); return GWEN_ERROR_INVALID; } val=GWEN_DB_GetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), name, 0, NULL); if (val && -1!=GWEN_Text_ComparePattern(val, pattern, 0)) { int rv; /* pattern matches, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _dbIfNotCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; const char *pattern; const char *val; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"dbIfCharDataMatches\""); return GWEN_ERROR_INVALID; } pattern=GWEN_XMLNode_GetProperty(xmlNode, "pattern", NULL); if (!(pattern && *pattern)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty pattern in \"dbIfCharDataMatches\""); return GWEN_ERROR_INVALID; } val=GWEN_DB_GetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), name, 0, NULL); if (val==NULL || -1==GWEN_Text_ComparePattern(val, pattern, 0)) { int rv; /* pattern matches, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _dbIfHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; const char *val; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"dbIfHasCharData\""); return GWEN_ERROR_INVALID; } val=GWEN_DB_GetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), name, 0, NULL); if (val && *val) { int rv; /* pattern matches, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _dbIfNotHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; const char *val; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"dbIfNotHasCharData\""); return GWEN_ERROR_INVALID; } val=GWEN_DB_GetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), name, 0, NULL); if (val==NULL || *val==0) { int rv; /* pattern matches, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _xmlCreateAndEnterElement(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; GWEN_XMLNODE *n; int rv; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (path==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing path in \"XmlCreateAndEnterElement\""); return GWEN_ERROR_INVALID; } n=GWEN_XMLNode_GetNodeByXPath(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_CREATE_GROUP | GWEN_PATH_FLAGS_CREATE_VAR); if (n==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Path \"%s\" does not exist", path); return GWEN_ERROR_INVALID; } /* enter given document node */ GWEN_XmlCommanderGwenXml_EnterDocNode(cmd, n); rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } /* leave given document node, re-select previously active one, thus restoring status from the beginning */ GWEN_XmlCommanderGwenXml_LeaveDocNode(cmd); return 0; } int _xmlSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"XmlSetCharValue\""); return GWEN_ERROR_INVALID; } value=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (value) { GWEN_BUFFER *dbuf; int rv; dbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_DB_ReplaceVars(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), value, dbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(dbuf); return rv; } _convertAndSetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), xmlNode, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } else { const char *name; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or name path in \"XmlSetCharValue\""); return GWEN_ERROR_INVALID; } value=GWEN_DB_GetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDbGroup(cmd), name, 0, NULL); if (value && *value) { _convertAndSetCharValue(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), xmlNode, value); } #if 0 else { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_XMLNode_GetXPath(NULL, GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), tbuf); DBG_ERROR(GWEN_LOGDOMAIN, "No value in path \"%s\" (%s)", path, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); /* GWEN_XMLNode_Dump(GWEN_XmlCommanderGwenXml_GetCurrentDocNode(cmd), 2); */ return GWEN_ERROR_INVALID; } #endif } return 0; } int _setCharValueByPath(GWEN_XMLNODE *xmlNode, const char *path, const char *value) { const char *s; s=strchr(path, '@'); if (s) { int idx; char *cpyOfPath; char *property; GWEN_XMLNODE *n; idx=s-path; cpyOfPath=strdup(path); assert(cpyOfPath); cpyOfPath[idx]=0; property=cpyOfPath+idx+1; if (*cpyOfPath) { n=GWEN_XMLNode_GetNodeByXPath(xmlNode, cpyOfPath, 0); } else n=xmlNode; if (n) { GWEN_XMLNode_SetProperty(n, property, value); free(cpyOfPath); return 0; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Path \"%s\" could not be created", path); free(cpyOfPath); return GWEN_ERROR_GENERIC; } } else { int rv; rv=GWEN_XMLNode_SetCharValueByPath(xmlNode, 0, path, value); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } } int _convertAndSetCharValue(GWEN_XMLNODE *xmlDocNode, GWEN_XMLNODE *xmlSchemaNode, const char *value) { if (value && *value) { const char *name; const char *typ; int doTrim=0; GWEN_BUFFER *resultBuf; int rv; doTrim=GWEN_XMLNode_GetIntProperty(xmlSchemaNode, "trim", 0); resultBuf=GWEN_Buffer_new(0, 256, 0, 1); name=GWEN_XMLNode_GetProperty(xmlSchemaNode, "path", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"XmlSetCharValue\""); GWEN_Buffer_free(resultBuf); return GWEN_ERROR_INVALID; } typ=GWEN_XMLNode_GetProperty(xmlSchemaNode, "type", "string"); if (!(typ && *typ)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty type in \"XmlSetCharValue\""); GWEN_Buffer_free(resultBuf); return GWEN_ERROR_INVALID; } if (strcasecmp(typ, "string")==0) { /* escape */ GWEN_Text_EscapeXmlToBuffer(value, resultBuf); if (doTrim) GWEN_Text_CondenseBuffer(resultBuf); } else if (strcasecmp(typ, "date")==0) { const char *tmpl; GWEN_DATE *dt=NULL; tmpl=GWEN_XMLNode_GetProperty(xmlSchemaNode, "template", "YYYYMMDD"); if (!(tmpl && *tmpl)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty template in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); return GWEN_ERROR_INVALID; } dt=GWEN_Date_fromString(value); if (dt) { GWEN_Date_toStringWithTemplate(dt, tmpl, resultBuf); GWEN_Date_free(dt); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Invalid date string for [%s] (value=[%s], tmpl=[%s])", name, value, tmpl); } } if (GWEN_Buffer_GetUsedBytes(resultBuf)) { DBG_INFO(GWEN_LOGDOMAIN, "Setting value: %s = %s", name, GWEN_Buffer_GetStart(resultBuf)); rv=_setCharValueByPath(xmlDocNode, name, GWEN_Buffer_GetStart(resultBuf)); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(resultBuf); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "Not setting empty value for [%s]", name); } GWEN_Buffer_free(resultBuf); } return 0; } gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_lxml_todb.c0000666000175000017500000004622413702435660016473 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "xmlcmd_lxml_todb.h" #include "xmlcmd_lxml.h" #include #include #include #include #include /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static int _handleChildren_toDb(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _convertAndSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value); static int _handleDbSetCharValue_internal(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent); static int _handleXmlEnter(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlForEvery(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbCreateAndEnterGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbCreateAndEnterTempGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleDbSetTempCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfNotCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfNotHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); static int _handleXmlIfNotPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ GWEN_XMLCOMMANDER *GWEN_XmlCommanderLibXml_toDb_new(xmlNodePtr xmlNodeDocument, GWEN_DB_NODE *dbDestination) { GWEN_XMLCOMMANDER *cmd; cmd=GWEN_XmlCommanderLibXml_new(xmlNodeDocument, dbDestination); GWEN_XmlCommander_SetHandleChildrenFn(cmd, _handleChildren_toDb); return cmd; } int _handleChildren_toDb(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_INFO(GWEN_LOGDOMAIN, "Handling element \"%s\"", name); if (strcasecmp(name, "XmlEnter")==0) rv=_handleXmlEnter(cmd, n); else if (strcasecmp(name, "XmlForEvery")==0) rv=_handleXmlForEvery(cmd, n); else if (strcasecmp(name, "DbCreateAndEnterGroup")==0) rv=_handleDbCreateAndEnterGroup(cmd, n); else if (strcasecmp(name, "DbCreateAndEnterTempGroup")==0) rv=_handleDbCreateAndEnterTempGroup(cmd, n); else if (strcasecmp(name, "DbSetCharValue")==0) rv=_handleDbSetCharValue(cmd, n); else if (strcasecmp(name, "DbSetTempCharValue")==0) rv=_handleDbSetTempCharValue(cmd, n); else if (strcasecmp(name, "XmlIfCharDataMatches")==0) rv=_handleXmlIfCharDataMatches(cmd, n); else if (strcasecmp(name, "XmlIfNotCharDataMatches")==0) rv=_handleXmlIfNotCharDataMatches(cmd, n); else if (strcasecmp(name, "XmlIfHasCharData")==0) rv=_handleXmlIfHasCharData(cmd, n); else if (strcasecmp(name, "XmlIfNotHasCharData")==0) rv=_handleXmlIfNotHasCharData(cmd, n); else if (strcasecmp(name, "XmlIfPathExists")==0) rv=_handleXmlIfPathExists(cmd, n); else if (strcasecmp(name, "XmlIfNotPathExists")==0) rv=_handleXmlIfNotPathExists(cmd, n); else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown element \"%s\", aborting", name); return GWEN_ERROR_INVALID; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } /* TODO: optimize later */ int _convertAndSetCharValue(GWEN_UNUSED GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value) { if (value && *value) { const char *name; const char *typ; const char *mode; int doTrim=0; GWEN_BUFFER *vbuf; GWEN_BUFFER *resultBuf; doTrim=GWEN_XMLNode_GetIntProperty(xmlNode, "trim", 0); vbuf=GWEN_Buffer_new(0, 256, 0, 1); resultBuf=GWEN_Buffer_new(0, 256, 0, 1); name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } typ=GWEN_XMLNode_GetProperty(xmlNode, "type", "string"); if (!(typ && *typ)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty type in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } mode=GWEN_XMLNode_GetProperty(xmlNode, "mode", "add"); if (strcasecmp(typ, "string")==0) { GWEN_Buffer_AppendString(vbuf, value); if (doTrim) GWEN_Text_CondenseBuffer(vbuf); } else if (strcasecmp(typ, "date")==0) { const char *tmpl; GWEN_DATE *dt=NULL; tmpl=GWEN_XMLNode_GetProperty(xmlNode, "template", "YYYYMMDD"); if (!(tmpl && *tmpl)) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty template in \"SetCharValue\""); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); return GWEN_ERROR_INVALID; } dt=GWEN_Date_fromStringWithTemplate(value, tmpl); if (dt) { GWEN_Buffer_AppendString(vbuf, GWEN_Date_GetString(dt)); GWEN_Date_free(dt); } } if (strcasecmp(mode, "add")==0) { /* just exchange the buffer */ GWEN_Buffer_free(resultBuf); resultBuf=vbuf; vbuf=NULL; } else if (strcasecmp(mode, "append")==0) { const char *s; s=GWEN_DB_GetCharValue(dbCurrent, name, 0, NULL); if (s && *s) { const char *delimiter; /* write previous data into resultBuffer */ GWEN_Buffer_AppendString(resultBuf, s); /* possibly write delimiter into resultBuffer */ delimiter=GWEN_XMLNode_GetProperty(xmlNode, "delimiter", NULL); if (delimiter && *delimiter) { if (strcasecmp(delimiter, "\\n")==0) GWEN_Buffer_AppendByte(resultBuf, '\n'); else if (strcasecmp(delimiter, "\\t")==0) GWEN_Buffer_AppendByte(resultBuf, '\t'); else GWEN_Buffer_AppendString(resultBuf, delimiter); } } /* if previous value */ /* write value into resultBuffer */ GWEN_Buffer_AppendString(resultBuf, GWEN_Buffer_GetStart(vbuf)); GWEN_DB_DeleteVar(dbCurrent, name); } else if (strcasecmp(mode, "replace")==0) { /* just exchange the buffer */ GWEN_Buffer_free(resultBuf); resultBuf=vbuf; vbuf=NULL; GWEN_DB_DeleteVar(dbCurrent, name); } DBG_INFO(GWEN_LOGDOMAIN, "Setting value: %s = %s", name, GWEN_Buffer_GetStart(resultBuf)); GWEN_DB_SetCharValue(dbCurrent, GWEN_DB_FLAGS_DEFAULT, name, GWEN_Buffer_GetStart(resultBuf)); GWEN_Buffer_free(resultBuf); GWEN_Buffer_free(vbuf); } return 0; } int _handleXmlEnter(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; xmlNodePtr n; int rv; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (path==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing path in \"EnterPath\""); return GWEN_ERROR_INVALID; } n=GWEN_XmlCommanderLibXml_GetXmlNode(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_PATHMUSTEXIST); if (n==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Path \"%s\" does not exist", path); return GWEN_ERROR_INVALID; } /* enter given document node */ GWEN_XmlCommanderLibXml_EnterDocNode(cmd, n); rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } /* leave given document node, re-select previously active one, thus restoring status from the beginning */ GWEN_XmlCommanderLibXml_LeaveDocNode(cmd); return 0; } int _handleXmlForEvery(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; xmlNodePtr n; int rv; path=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (path==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing name in \"ForEvery\""); return GWEN_ERROR_INVALID; } n=GWEN_XmlCommanderLibXml_FindFirstElement(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path); if (n==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Path \"%s\" not found", path); /* GWEN_XMLNode_Dump(cmd->currentDocNode, 2); */ } while (n) { /* enter given document node */ GWEN_XmlCommanderLibXml_EnterDocNode(cmd, n); /* handle all children of this parser XML node with the current document node */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* leave given document node, re-select previously active one, thus restoring status from the beginning */ GWEN_XmlCommanderLibXml_LeaveDocNode(cmd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } n=GWEN_XmlCommanderLibXml_FindNextElement(n, path); } return 0; } int _handleDbCreateAndEnterGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbLast; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"CreateAnEnterDbGroup\""); return GWEN_ERROR_INVALID; } /* push group */ dbLast=GWEN_XmlCommanderLibXml_GetCurrentDbGroup(cmd); /* create group */ GWEN_XmlCommanderLibXml_SetCurrentDbGroup(cmd, GWEN_DB_GetGroup(dbLast, GWEN_PATH_FLAGS_CREATE_GROUP, name)); /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* pop group */ GWEN_XmlCommanderLibXml_SetCurrentDbGroup(cmd, dbLast); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int _handleDbCreateAndEnterTempGroup(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *name; GWEN_DB_NODE *dbLast; GWEN_DB_NODE *dbCurrent; int rv; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"CreateAnEnterTempDbGroup\""); return GWEN_ERROR_INVALID; } /* push group */ dbLast=GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup(cmd); /* create group */ dbCurrent=GWEN_DB_GetGroup(dbLast, GWEN_PATH_FLAGS_CREATE_GROUP, name); GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup(cmd, dbCurrent); /* handle children (nothing special here) */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); /* delete temp group */ GWEN_DB_UnlinkGroup(dbCurrent); GWEN_DB_Group_free(dbCurrent); /* pop group */ GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup(cmd, dbLast); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int _handleDbSetCharValue_internal(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent) { const char *name; const char *value; name=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(name && *name)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty name in \"SetCharValue\""); return GWEN_ERROR_INVALID; } value=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (value) { GWEN_BUFFER *dbuf; int rv; dbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_DB_ReplaceVars(GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup(cmd), value, dbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(dbuf); return rv; } _convertAndSetCharValue(cmd, xmlNode, dbCurrent, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } else { const char *path; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"SetCharValue\""); return GWEN_ERROR_INVALID; } value=GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, NULL); if (value && *value) { _convertAndSetCharValue(cmd, xmlNode, dbCurrent, value); } } return 0; } int _handleDbSetCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { return _handleDbSetCharValue_internal(cmd, xmlNode, GWEN_XmlCommanderLibXml_GetCurrentDbGroup(cmd)); } int _handleDbSetTempCharValue(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { return _handleDbSetCharValue_internal(cmd, xmlNode, GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup(cmd)); } int _handleXmlIfCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *pattern; const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfCharDataMatches\""); return GWEN_ERROR_INVALID; } pattern=GWEN_XMLNode_GetProperty(xmlNode, "pattern", NULL); if (!(pattern && *pattern)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty pattern in \"IfCharDataMatches\""); return GWEN_ERROR_INVALID; } value=GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, NULL); if (value) { if (-1!=GWEN_Text_ComparePattern(value, pattern, 0)) { int rv; /* pattern matches, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } int _handleXmlIfNotCharDataMatches(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *pattern; const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfNotCharDataMatches\""); return GWEN_ERROR_INVALID; } pattern=GWEN_XMLNode_GetProperty(xmlNode, "pattern", NULL); if (!(pattern && *pattern)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty pattern in \"IfNotCharDataMatches\""); return GWEN_ERROR_INVALID; } value=GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, NULL); if (value) { if (-1==GWEN_Text_ComparePattern(value, pattern, 0)) { int rv; /* pattern doesnt match, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } int _handleXmlIfHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfCharDataMatches\""); return GWEN_ERROR_INVALID; } value=GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, NULL); if (value && *value) { int rv; /* there is a value, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "No value for path \"%s\"", path); } return 0; } int _handleXmlIfNotHasCharData(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; const char *value; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfNotCharDataMatches\""); return GWEN_ERROR_INVALID; } value=GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, NULL); if (!(value && *value)) { int rv; /* there is a value, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } return 0; } int _handleXmlIfPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfPathExists\""); return GWEN_ERROR_INVALID; } if (GWEN_XmlCommanderLibXml_GetXmlNode(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_PATHMUSTEXIST)) { int rv; /* path exists, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "Path \"%s\" does not exist", path); } return 0; } int _handleXmlIfNotPathExists(GWEN_XMLCOMMANDER *cmd, GWEN_XMLNODE *xmlNode) { const char *path; path=GWEN_XMLNode_GetProperty(xmlNode, "path", NULL); if (!(path && *path)) { DBG_ERROR(GWEN_LOGDOMAIN, "Missing or empty path in \"IfNotPathExists\""); return GWEN_ERROR_INVALID; } if (NULL==GWEN_XmlCommanderLibXml_GetXmlNode(GWEN_XmlCommanderLibXml_GetCurrentDocNode(cmd), path, GWEN_PATH_FLAGS_PATHMUSTEXIST)) { int rv; /* path does not exist, handle children */ rv=GWEN_XmlCommander_HandleChildren(cmd, xmlNode); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } else { DBG_INFO(GWEN_LOGDOMAIN, "Path \"%s\" exists", path); } return 0; } gwenhywfar-5.12.1/src/xmlcmd/xmlcmd_lxml.h0000666000175000017500000001021413702435660015456 00000000000000/*************************************************************************** begin : Sat Apr 18 2018 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * ***************************************************************************/ #ifndef GWEN_XMLCMD_LXML_H #define GWEN_XMLCMD_LXML_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif GWENHYWFAR_API GWEN_XMLCOMMANDER *GWEN_XmlCommanderLibXml_new(xmlNodePtr documentRoot, GWEN_DB_NODE *dbRoot); GWENHYWFAR_API xmlNodePtr GWEN_XmlCommanderLibXml_GetDocRoot(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API xmlNodePtr GWEN_XmlCommanderLibXml_GetCurrentDocNode(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_SetCurrentDocNode(GWEN_XMLCOMMANDER *cmd, xmlNodePtr n); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetDbRoot(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetCurrentDbGroup(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_SetCurrentDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetTempDbRoot(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_SetTempDbRoot(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db); GWENHYWFAR_API GWEN_DB_NODE *GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup(const GWEN_XMLCOMMANDER *cmd); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup(GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_EnterDocNode(GWEN_XMLCOMMANDER *cmd, xmlNodePtr xNode); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_LeaveDocNode(GWEN_XMLCOMMANDER *cmd); /** @name Helper Functions * */ /*@{*/ GWENHYWFAR_API xmlNodePtr GWEN_XmlCommanderLibXml_GetXmlNode(xmlNodePtr n, const char *path, uint32_t flags); GWENHYWFAR_API xmlNodePtr GWEN_XmlCommanderLibXml_FindFirstElement(xmlNodePtr parent, const char *elemName); GWENHYWFAR_API xmlNodePtr GWEN_XmlCommanderLibXml_FindNextElement(xmlNodePtr elem, const char *elemName); GWENHYWFAR_API int GWEN_XmlCommanderLibXml_SetXmlCharValue(xmlNodePtr n, const char *path, const char *value); GWENHYWFAR_API const char *GWEN_XmlCommanderLibXml_GetXmlCharValue(xmlNodePtr n, const char *path, const char *defValue); GWENHYWFAR_API int GWEN_XmlCommanderLibXml_SetIntValue(xmlNodePtr n, const char *path, int value); GWENHYWFAR_API int GWEN_XmlCommanderLibXml_GetIntValue(xmlNodePtr n, const char *path, int defValue); GWENHYWFAR_API const char *GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(xmlNodePtr elem, const char *path, const char *defValue); GWENHYWFAR_API void GWEN_XmlCommanderLibXml_SetXmlCharValueByPath(xmlNodePtr elem, const char *path, const char *value); /*@}*/ #ifdef __cplusplus } #endif #endif /* GWEN_XML2DB_H */ gwenhywfar-5.12.1/src/binreloc.h0000644000175000017500000000553113142134475013447 00000000000000/* * BinReloc - a library for creating relocatable executables * Written by: Hongli Lai * http://autopackage.org/ * * This source code is public domain. You can relicense this code * under whatever license you want. * * See http://autopackage.org/docs/binreloc/ for * more information and how to use this. */ #ifndef __BINRELOC_H__ #define __BINRELOC_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** These error codes can be returned by br_init(), br_init_lib(), gbr_init() or gbr_init_lib(). */ typedef enum { /** Cannot allocate memory. */ BR_INIT_ERROR_NOMEM, /** Unable to open /proc/self/maps; see errno for details. */ BR_INIT_ERROR_OPEN_MAPS, /** Unable to read from /proc/self/maps; see errno for details. */ BR_INIT_ERROR_READ_MAPS, /** The file format of /proc/self/maps is invalid; kernel bug? */ BR_INIT_ERROR_INVALID_MAPS, /** BinReloc is disabled (the ENABLE_BINRELOC macro is not defined). */ BR_INIT_ERROR_DISABLED } BrInitError; #ifndef BINRELOC_RUNNING_DOXYGEN /* Mangle symbol names to avoid symbol collisions with other ELF objects. */ #define br_init pkND64590836275372_br_init #define br_init_lib pkND64590836275372_br_init_lib #define br_find_exe pkND64590836275372_br_find_exe #define br_find_exe_dir pkND64590836275372_br_find_exe_dir #define br_find_prefix pkND64590836275372_br_find_prefix #define br_find_bin_dir pkND64590836275372_br_find_bin_dir #define br_find_sbin_dir pkND64590836275372_br_find_sbin_dir #define br_find_data_dir pkND64590836275372_br_find_data_dir #define br_find_locale_dir pkND64590836275372_br_find_locale_dir #define br_find_lib_dir pkND64590836275372_br_find_lib_dir #define br_find_libexec_dir pkND64590836275372_br_find_libexec_dir #define br_find_etc_dir pkND64590836275372_br_find_etc_dir #define br_strcat pkND64590836275372_br_strcat #define br_build_path pkND64590836275372_br_build_path #define br_dirname pkND64590836275372_br_dirname #endif int br_init(BrInitError *error); int br_init_lib(BrInitError *error); char *br_find_exe(const char *default_exe); char *br_find_exe_dir(const char *default_dir); char *br_find_prefix(const char *default_prefix); char *br_find_bin_dir(const char *default_bin_dir); char *br_find_sbin_dir(const char *default_sbin_dir); char *br_find_data_dir(const char *default_data_dir); char *br_find_locale_dir(const char *default_locale_dir); char *br_find_lib_dir(const char *default_lib_dir); char *br_find_libexec_dir(const char *default_libexec_dir); char *br_find_etc_dir(const char *default_etc_dir); /* Utility functions */ char *br_strcat(const char *str1, const char *str2); char *br_build_path(const char *dir, const char *file); char *br_dirname(const char *path); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __BINRELOC_H__ */ gwenhywfar-5.12.1/src/test_framework/0000755000175000017500000000000015032533714014610 500000000000000gwenhywfar-5.12.1/src/test_framework/testframework_p.h0000666000175000017500000000112113605711503020112 00000000000000/*************************************************************************** begin : Thu Jan 09 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_TEST_FRAMEWORK_P_H #define GWEN_TEST_FRAMEWORK_P_H #include "testframework.h" struct GWEN_TEST_FRAMEWORK { GWEN_TEST_MODULE *modulesRoot; }; #endif gwenhywfar-5.12.1/src/test_framework/testmodule.c0000666000175000017500000002560713605723441017101 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "testmodule.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "./testmodule_p.h" #include #include /* code headers */ /* macro functions */ GWEN_TREE2_FUNCTIONS(GWEN_TEST_MODULE, GWEN_Test_Module) GWEN_INHERIT_FUNCTIONS(GWEN_TEST_MODULE) GWEN_TEST_MODULE *GWEN_Test_Module_new(void) { GWEN_TEST_MODULE *p_struct; GWEN_NEW_OBJECT(GWEN_TEST_MODULE, p_struct) p_struct->_refCount=1; GWEN_INHERIT_INIT(GWEN_TEST_MODULE, p_struct) GWEN_TREE2_INIT(GWEN_TEST_MODULE, p_struct, GWEN_Test_Module) /* members */ p_struct->id=0; p_struct->name=NULL; p_struct->description=NULL; p_struct->result=0; p_struct->paramsDb=NULL; /* virtual functions */ return p_struct; } void GWEN_Test_Module_free(GWEN_TEST_MODULE *p_struct) { if (p_struct) { assert(p_struct->_refCount); if (p_struct->_refCount==1) { GWEN_INHERIT_FINI(GWEN_TEST_MODULE, p_struct) GWEN_TREE2_FINI(GWEN_TEST_MODULE, p_struct, GWEN_Test_Module) /* members */ free(p_struct->name); p_struct->name=NULL; free(p_struct->description); p_struct->description=NULL; GWEN_DB_Group_free(p_struct->paramsDb); p_struct->paramsDb=NULL; p_struct->_refCount=0; GWEN_FREE_OBJECT(p_struct); } else p_struct->_refCount--; } } void GWEN_Test_Module_Attach(GWEN_TEST_MODULE *p_struct) { assert(p_struct); assert(p_struct->_refCount); p_struct->_refCount++; } GWEN_TEST_MODULE *GWEN_Test_Module_dup(const GWEN_TEST_MODULE *p_src) { GWEN_TEST_MODULE *p_struct; assert(p_src); p_struct=GWEN_Test_Module_new(); /* member "id" */ p_struct->id=p_src->id; /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "description" */ if (p_struct->description) { free(p_struct->description); p_struct->description=NULL; p_struct->description=NULL; } if (p_src->description) { p_struct->description=strdup(p_src->description); } /* member "result" */ p_struct->result=p_src->result; /* member "paramsDb" */ if (p_struct->paramsDb) { GWEN_DB_Group_free(p_struct->paramsDb); p_struct->paramsDb=NULL; p_struct->paramsDb=NULL; } if (p_src->paramsDb) { p_struct->paramsDb=GWEN_DB_Group_dup(p_src->paramsDb); } return p_struct; } GWEN_TEST_MODULE *GWEN_Test_Module_copy(GWEN_TEST_MODULE *p_struct, const GWEN_TEST_MODULE *p_src) { assert(p_struct); assert(p_src); /* member "id" */ p_struct->id=p_src->id; /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "description" */ if (p_struct->description) { free(p_struct->description); p_struct->description=NULL; p_struct->description=NULL; } if (p_src->description) { p_struct->description=strdup(p_src->description); } /* member "result" */ p_struct->result=p_src->result; /* member "paramsDb" */ if (p_struct->paramsDb) { GWEN_DB_Group_free(p_struct->paramsDb); p_struct->paramsDb=NULL; p_struct->paramsDb=NULL; } if (p_src->paramsDb) { p_struct->paramsDb=GWEN_DB_Group_dup(p_src->paramsDb); } return p_struct; } uint32_t GWEN_Test_Module_GetId(const GWEN_TEST_MODULE *p_struct) { assert(p_struct); return p_struct->id; } const char *GWEN_Test_Module_GetName(const GWEN_TEST_MODULE *p_struct) { assert(p_struct); return p_struct->name; } const char *GWEN_Test_Module_GetDescription(const GWEN_TEST_MODULE *p_struct) { assert(p_struct); return p_struct->description; } int GWEN_Test_Module_GetResult(const GWEN_TEST_MODULE *p_struct) { assert(p_struct); return p_struct->result; } const GWEN_DB_NODE *GWEN_Test_Module_GetParamsDb(const GWEN_TEST_MODULE *p_struct) { assert(p_struct); return p_struct->paramsDb; } void GWEN_Test_Module_SetId(GWEN_TEST_MODULE *p_struct, uint32_t p_src) { assert(p_struct); p_struct->id=p_src; } void GWEN_Test_Module_SetName(GWEN_TEST_MODULE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src) { p_struct->name=strdup(p_src); } else { p_struct->name=NULL; } } void GWEN_Test_Module_SetDescription(GWEN_TEST_MODULE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->description) { free(p_struct->description); p_struct->description=NULL; } if (p_src) { p_struct->description=strdup(p_src); } else { p_struct->description=NULL; } } void GWEN_Test_Module_SetResult(GWEN_TEST_MODULE *p_struct, int p_src) { assert(p_struct); p_struct->result=p_src; } void GWEN_Test_Module_SetParamsDb(GWEN_TEST_MODULE *p_struct, const GWEN_DB_NODE *p_src) { assert(p_struct); if (p_struct->paramsDb) { GWEN_DB_Group_free(p_struct->paramsDb); p_struct->paramsDb=NULL; } if (p_src) { p_struct->paramsDb=GWEN_DB_Group_dup(p_src); } else { p_struct->paramsDb=NULL; } } /* code for virtual functions */ int GWEN_Test_Module_Test(GWEN_TEST_MODULE *p_struct) { assert(p_struct); if (p_struct->testFn) return p_struct->testFn(p_struct); else return GWEN_ERROR_NOT_IMPLEMENTED; } /* setters for virtual functions */ GWEN_TEST_MODULE_TEST_FN GWEN_Test_Module_SetTestFn(GWEN_TEST_MODULE *p_struct, GWEN_TEST_MODULE_TEST_FN fn) { GWEN_TEST_MODULE_TEST_FN oldFn; assert(p_struct); oldFn=p_struct->testFn; p_struct->testFn=fn; return oldFn; } void GWEN_Test_Module_ReadDb(GWEN_TEST_MODULE *p_struct, GWEN_DB_NODE *p_db) { assert(p_struct); /* member "id" */ p_struct->id=GWEN_DB_GetIntValue(p_db, "id", 0, 0); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "name", 0, NULL); if (s) p_struct->name=strdup(s); } if (p_struct->name==NULL) { p_struct->name=NULL; } /* member "description" */ if (p_struct->description) { free(p_struct->description); p_struct->description=NULL; } { const char *s; s=GWEN_DB_GetCharValue(p_db, "description", 0, NULL); if (s) p_struct->description=strdup(s); } if (p_struct->description==NULL) { p_struct->description=NULL; } /* member "result" */ p_struct->result=GWEN_DB_GetIntValue(p_db, "result", 0, 0); /* member "paramsDb" */ if (p_struct->paramsDb) { GWEN_DB_Group_free(p_struct->paramsDb); p_struct->paramsDb=NULL; } { GWEN_DB_NODE *dbSrc; dbSrc=GWEN_DB_GetGroup(p_db, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "paramsDb"); if (dbSrc) { p_struct->paramsDb=GWEN_DB_Group_dup(dbSrc); } else p_struct->paramsDb=NULL; } if (p_struct->paramsDb==NULL) { p_struct->paramsDb=NULL; } } int GWEN_Test_Module_WriteDb(const GWEN_TEST_MODULE *p_struct, GWEN_DB_NODE *p_db) { int p_rv; assert(p_struct); /* member "id" */ p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "id", p_struct->id); if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "name" */ if (p_struct->name) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "name", p_struct->name); else { GWEN_DB_DeleteVar(p_db, "name"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "description" */ if (p_struct->description) p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "description", p_struct->description); else { GWEN_DB_DeleteVar(p_db, "description"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "result" */ p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "result", p_struct->result); if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } /* member "paramsDb" */ if (p_struct->paramsDb) { GWEN_DB_NODE *dbCopy; dbCopy=GWEN_DB_GetGroup(p_db, GWEN_DB_FLAGS_DEFAULT, "paramsDb"); assert(dbCopy); p_rv=GWEN_DB_AddGroupChildren(dbCopy, p_struct->paramsDb); } else { GWEN_DB_DeleteGroup(p_db, "paramsDb"); p_rv=0; } if (p_rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv); return p_rv; } return 0; } GWEN_TEST_MODULE *GWEN_Test_Module_fromDb(GWEN_DB_NODE *p_db) { GWEN_TEST_MODULE *p_struct; p_struct=GWEN_Test_Module_new(); GWEN_Test_Module_ReadDb(p_struct, p_db); return p_struct; } int GWEN_Test_Module_toDb(const GWEN_TEST_MODULE *p_struct, GWEN_DB_NODE *p_db) { return GWEN_Test_Module_WriteDb(p_struct, p_db); } GWEN_TEST_MODULE *GWEN_Test_Module_Tree2_GetById(const GWEN_TEST_MODULE *p_object, uint32_t p_cmp) { GWEN_TEST_MODULE *p_struct; assert(p_object); p_struct = GWEN_Test_Module_Tree2_GetFirstChild(p_object); while (p_struct) { int p_rv; if (p_struct->id==p_cmp) p_rv=0; else if (p_cmpid) p_rv=-1; else p_rv=1; if (p_rv == 0) return p_struct; p_struct = GWEN_Test_Module_Tree2_GetBelow(p_struct); } return NULL; } GWEN_TEST_MODULE *GWEN_Test_Module_AddTest(GWEN_TEST_MODULE *st, const char *tName, GWEN_TEST_MODULE_TEST_FN fn, const char *tDescr) { GWEN_TEST_MODULE *mod; mod=GWEN_Test_Module_new(); if (tName && *tName) GWEN_Test_Module_SetName(mod, tName); if (tDescr && *tDescr) GWEN_Test_Module_SetDescription(mod, tDescr); if (fn) GWEN_Test_Module_SetTestFn(mod, fn); GWEN_Test_Module_Tree2_AddChild(st, mod); return mod; } GWEN_TEST_MODULE *GWEN_Test_Module_AddModule(GWEN_TEST_MODULE *st, const char *tName, const char *tDescr) { GWEN_TEST_MODULE *mod; mod=GWEN_Test_Module_new(); if (tName && *tName) GWEN_Test_Module_SetName(mod, tName); if (tDescr && *tDescr) GWEN_Test_Module_SetDescription(mod, tDescr); GWEN_Test_Module_Tree2_AddChild(st, mod); return mod; } const char *GWEN_Test_Module_GetCharParam(const GWEN_TEST_MODULE *st, const char *paramName, const char *defVal) { assert(st); while (st) { if (st->paramsDb) { const char *s; s=GWEN_DB_GetCharValue(st->paramsDb, paramName, 0, NULL); if (s) return s; } st=GWEN_Test_Module_Tree2_GetParent(st); } return defVal; } void GWEN_Test_Module_SetCharParam(GWEN_TEST_MODULE *st, const char *paramName, const char *val) { assert(st); if (st->paramsDb==NULL) st->paramsDb=GWEN_DB_Group_new("params"); GWEN_DB_SetCharValue(st->paramsDb, GWEN_DB_FLAGS_OVERWRITE_VARS, paramName, val); } /* code headers */ gwenhywfar-5.12.1/src/test_framework/testgui.c0000666000175000017500000001642213605706553016400 00000000000000/*************************************************************************** begin : Thu Jan 09 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "testgui_p.h" #include #include #include static GWENHYWFAR_CB void _freeData(void *bp, void *p); static GWENHYWFAR_CB int _logHook(GWEN_GUI *gui, const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s); static void _addLogLineToList(GWEN_GUI *gui, const char *s); static void _addLogLineToFile(GWEN_GUI *gui, const char *s); static void _writeLinesToFile(GWEN_GUI *gui); GWEN_INHERIT(GWEN_GUI, GWEN_GUI_TEST) void TestGui_Extend(GWEN_GUI *gui) { GWEN_GUI_TEST *xgui; GWEN_NEW_OBJECT(GWEN_GUI_TEST, xgui); GWEN_INHERIT_SETDATA(GWEN_GUI, GWEN_GUI_TEST, gui, xgui, _freeData); xgui->logStrings=GWEN_StringList_new(); xgui->previousLogHook=GWEN_Gui_SetLogHookFn(gui, _logHook); xgui->logHookIsActive=1; } void TestGui_Unextend(GWEN_GUI *gui) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); /* reset log hook */ GWEN_Gui_SetLogHookFn(gui, xgui->previousLogHook); GWEN_INHERIT_UNLINK(GWEN_GUI, GWEN_GUI_TEST, gui); free(xgui->logFile); GWEN_StringList_free(xgui->logStrings); GWEN_FREE_OBJECT(xgui); } static GWENHYWFAR_CB void _freeData(GWEN_UNUSED void *bp, void *p) { GWEN_GUI_TEST *xgui; xgui=(GWEN_GUI_TEST *)p; free(xgui->logFile); GWEN_StringList_free(xgui->logStrings); GWEN_FREE_OBJECT(xgui); } void Test_Gui_FlushLogs(GWEN_GUI *gui) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); _writeLinesToFile(gui); GWEN_StringList_Clear(xgui->logStrings); } static GWENHYWFAR_CB int _logHook(GWEN_GUI *gui, const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); if (xgui->logHookIsActive) { GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Logger_CreateLogMessage(logDomain, priority, s, tbuf); if (rv<0) { fprintf(stderr, "Unable to generate log message, turning off logging.\n"); xgui->logHookIsActive=0; GWEN_Buffer_free(tbuf); return 0; } TestGui_AddLogLine(gui, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 1; } return 0; } void TestGui_AddLogLine(GWEN_GUI *gui, const char *s) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); if (xgui->logLastX) _addLogLineToList(gui, s); else _addLogLineToFile(gui, s); } void TestGui_SetLogFile(GWEN_GUI *gui, const char *fname) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); if (xgui->logFile) free(xgui->logFile); if (fname) xgui->logFile=strdup(fname); else xgui->logFile=NULL; } void TestGui_SetLogLastX(GWEN_GUI *gui, int i) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); xgui->logLastX=i; } void _addLogLineToList(GWEN_GUI *gui, const char *s) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); GWEN_StringList_AppendString(xgui->logStrings, s, 0, 0); if (xgui->logLastX>0 && GWEN_StringList_Count(xgui->logStrings)>xgui->logLastX) GWEN_StringList_RemoveFirstString(xgui->logStrings); } void _addLogLineToFile(GWEN_GUI *gui, const char *s) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); if (xgui->logFile) { GWEN_FSLOCK *lck; GWEN_FSLOCK_RESULT res; FILE *f; if (GWEN_Directory_GetPath(xgui->logFile, GWEN_PATH_FLAGS_VARIABLE)) { xgui->logHookIsActive=0; fprintf(stderr, "Unable to get logfile, turning off logging.\n"); return; } lck=GWEN_FSLock_new(xgui->logFile, GWEN_FSLock_TypeFile); res=GWEN_FSLock_Lock(lck, 30, 0); if (res!=GWEN_FSLock_ResultOk) { xgui->logHookIsActive=0; fprintf(stderr, "Unable to lock logfile, turning off logging.\n"); GWEN_FSLock_free(lck); return; } f=fopen(xgui->logFile, "a"); if (f==NULL) { fprintf(stderr, "Unable to open logfile, turning off logging.\n"); xgui->logHookIsActive=0; GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); return; } /* write log message */ fprintf(f, "%s", s); /* close log file */ if (fclose(f)) { fprintf(stderr, "Unable to close logfile, turning off logging.\n"); xgui->logHookIsActive=0; GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); return; } /* unlock log file */ GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } else { fprintf(stderr, "%s\n", s); } } void _writeLinesToFile(GWEN_GUI *gui) { GWEN_GUI_TEST *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, GWEN_GUI_TEST, gui); assert(xgui); if (GWEN_StringList_Count(xgui->logStrings)) { if (xgui->logFile) { GWEN_FSLOCK *lck; GWEN_FSLOCK_RESULT res; FILE *f; GWEN_STRINGLISTENTRY *se; if (GWEN_Directory_GetPath(xgui->logFile, GWEN_PATH_FLAGS_VARIABLE)) { xgui->logHookIsActive=0; fprintf(stderr, "Unable to get logfile, turning off logging.\n"); return; } lck=GWEN_FSLock_new(xgui->logFile, GWEN_FSLock_TypeFile); res=GWEN_FSLock_Lock(lck, 30, 0); if (res!=GWEN_FSLock_ResultOk) { xgui->logHookIsActive=0; fprintf(stderr, "Unable to lock logfile, turning off logging.\n"); GWEN_FSLock_free(lck); return; } f=fopen(xgui->logFile, "a"); if (f==NULL) { fprintf(stderr, "Unable to open logfile, turning off logging.\n"); xgui->logHookIsActive=0; GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); return; } /* write log message */ se=GWEN_StringList_FirstEntry(xgui->logStrings); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) fprintf(f, "%s", s); se=GWEN_StringListEntry_Next(se); } /* close log file */ if (fclose(f)) { fprintf(stderr, "Unable to close logfile, turning off logging.\n"); xgui->logHookIsActive=0; GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); return; } /* unlock log file */ GWEN_FSLock_Unlock(lck); GWEN_FSLock_free(lck); } else { GWEN_STRINGLISTENTRY *se; /* write log message */ se=GWEN_StringList_FirstEntry(xgui->logStrings); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) fprintf(stderr, "%s", s); se=GWEN_StringListEntry_Next(se); } } } } gwenhywfar-5.12.1/src/test_framework/testframework.c0000666000175000017500000001731213605715316017605 00000000000000/*************************************************************************** begin : Thu Jan 09 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "testframework_p.h" #include "testgui_l.h" #include #include #include #include static int _runModule(GWEN_GUI *gui, GWEN_TEST_MODULE *mod, int depth); static int _runTest(GWEN_GUI *gui, GWEN_TEST_MODULE *mod, int depth); static GWEN_GUI *_setupGui(GWEN_TEST_FRAMEWORK *tf, int argc, char **argv); static void _finishGui(GWEN_GUI *gui); static GWEN_DB_NODE *_readCommandLine(int argc, char **argv); int TestFramework_Run(GWEN_TEST_FRAMEWORK *tf, int argc, char **argv) { int rv; GWEN_GUI *gui; assert(tf); gui=_setupGui(tf, argc, argv); if (gui==NULL) { fprintf(stderr, "ERROR: Could not setup GUI\n"); return GWEN_ERROR_INVALID; } rv=_runModule(gui, tf->modulesRoot, 0); _finishGui(gui); return rv; } GWEN_GUI *_setupGui(GWEN_TEST_FRAMEWORK *tf, int argc, char **argv) { GWEN_DB_NODE *dbArgs; GWEN_GUI *gui; const char *s; int i; dbArgs=_readCommandLine(argc, argv); if (dbArgs==NULL) { fprintf(stderr, "ERROR: Could not parse arguments\n"); TestFramework_free(tf); return NULL; } gui=GWEN_Gui_GetGui(); if (gui==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Need to create and set a GUI first!"); return NULL; } TestGui_Extend(gui); s=GWEN_DB_GetCharValue(dbArgs, "logFile", 0, NULL); if (s && *s) TestGui_SetLogFile(gui, s); i=GWEN_DB_GetIntValue(dbArgs, "logLastLines", 0, 0); TestGui_SetLogLastX(gui, i); return gui; } void _finishGui(GWEN_GUI *gui) { Test_Gui_FlushLogs(gui); TestGui_Unextend(gui); } int _runModule(GWEN_GUI *gui, GWEN_TEST_MODULE *mod, int depth) { int rv; GWEN_TEST_MODULE *subMod; int subModsFailed=0; subMod=GWEN_Test_Module_Tree2_GetFirstChild(mod); if (subMod) { const char *sName; GWEN_BUFFER *fbuf; int i; /* has sub modules, so is no test */ sName=GWEN_Test_Module_GetName(mod); fbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fbuf, "==== Module: "); if (sName && *sName) GWEN_Buffer_AppendString(fbuf, sName); GWEN_Buffer_AppendString(fbuf, "==== \n"); TestGui_AddLogLine(gui, GWEN_Buffer_GetStart(fbuf)); GWEN_Buffer_free(fbuf); for (i=0; iFAILED!\n"); GWEN_Buffer_AppendString(fbuf, "FAILED!"); fprintf(stdout, "%s\n", GWEN_Buffer_GetStart(fbuf)); GWEN_Buffer_free(fbuf); return rv; } TestGui_AddLogLine(gui, "->passed\n"); GWEN_Buffer_AppendString(fbuf, "passed."); fprintf(stdout, "%s\n", GWEN_Buffer_GetStart(fbuf)); } GWEN_Buffer_Reset(fbuf); GWEN_Buffer_AppendString(fbuf, "---- Ended Test : "); if (sName && *sName) GWEN_Buffer_AppendString(fbuf, sName); GWEN_Buffer_AppendString(fbuf, "---- \n"); TestGui_AddLogLine(gui, GWEN_Buffer_GetStart(fbuf)); GWEN_Buffer_free(fbuf); return 0; } void TestFramework_AddModule(GWEN_TEST_FRAMEWORK *tf, GWEN_TEST_MODULE *mod) { assert(tf); assert(tf->modulesRoot); GWEN_Test_Module_Tree2_AddChild(tf->modulesRoot, mod); } GWEN_TEST_FRAMEWORK *TestFramework_new() { GWEN_TEST_FRAMEWORK *tf; GWEN_NEW_OBJECT(GWEN_TEST_FRAMEWORK, tf); assert(tf); tf->modulesRoot=GWEN_Test_Module_new(); GWEN_Test_Module_SetName(tf->modulesRoot, "Root"); return tf; } void TestFramework_free(GWEN_TEST_FRAMEWORK *tf) { if (tf) { GWEN_Test_Module_free(tf->modulesRoot); GWEN_FREE_OBJECT(tf); } } GWEN_TEST_MODULE *TestFramework_GetModulesRoot(const GWEN_TEST_FRAMEWORK *tf) { assert(tf); return tf->modulesRoot; } GWEN_DB_NODE *_readCommandLine(int argc, char **argv) { GWEN_DB_NODE *db; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "logFile", /* name */ 0, /* minnum */ 1, /* maxnum */ "L", /* short option */ "logFile", /* long option */ "Specify the log file (default: stdout)", /* short description */ "Specify the log file (default: stdout))" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "logLastLines", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "logLastLines", /* long option */ "Set size of log line buffer (default: unlimited number of lines)", /* short description */ "Set size of log line buffer (default: unlimited number of lines)" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_Group_new("args"); rv=GWEN_Args_Check(argc, argv, 1, 0 /*GWEN_ARGS_MODE_ALLOW_FREEPARAM*/, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); GWEN_DB_Group_free(db); return NULL; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); GWEN_DB_Group_free(db); return NULL; } fprintf(stdout, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); GWEN_DB_Group_free(db); return NULL; } return db; } gwenhywfar-5.12.1/src/test_framework/testgui_l.h0000666000175000017500000000150413605661026016706 00000000000000/*************************************************************************** begin : Thu Jan 09 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_TEST_GUI_L_H #define GWEN_TEST_GUI_L_H #include #include void TestGui_Extend(GWEN_GUI *gui); void TestGui_Unextend(GWEN_GUI *gui); void TestGui_SetLogFile(GWEN_GUI *gui, const char *fname); void TestGui_SetLogLastX(GWEN_GUI *gui, int i); void TestGui_AddLogLine(GWEN_GUI *gui, const char *mark); void Test_Gui_FlushLogs(GWEN_GUI *gui); #endif gwenhywfar-5.12.1/src/test_framework/Makefile.in0000644000175000017500000006707615032533614016614 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/test_framework ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtestframework_la_LIBADD = am_libtestframework_la_OBJECTS = testmodule.lo testframework.lo \ testgui.lo libtestframework_la_OBJECTS = $(am_libtestframework_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/testframework.Plo \ ./$(DEPDIR)/testgui.Plo ./$(DEPDIR)/testmodule.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libtestframework_la_SOURCES) DIST_SOURCES = $(libtestframework_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(iheaderdir)" HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) \ -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/parser \ $(LIBGNUTLS_CFLAGS) \ @all_includes@ AM_CFLAGS = @visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR typefiles = \ testmodule.xml EXTRA_DIST = $(typefiles) noinst_LTLIBRARIES = libtestframework.la noinst_HEADERS = \ testmodule_p.h \ testframework_p.h \ testgui_l.h \ testgui_p.h iheaderdir = $(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS = \ testmodule.h \ testframework.h libtestframework_la_SOURCES = \ testmodule.c \ testframework.c \ testgui.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/test_framework/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/test_framework/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libtestframework.la: $(libtestframework_la_OBJECTS) $(libtestframework_la_DEPENDENCIES) $(EXTRA_libtestframework_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtestframework_la_OBJECTS) $(libtestframework_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testframework.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testmodule.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/testframework.Plo -rm -f ./$(DEPDIR)/testgui.Plo -rm -f ./$(DEPDIR)/testmodule.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iheaderHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/testframework.Plo -rm -f ./$(DEPDIR)/testgui.Plo -rm -f ./$(DEPDIR)/testmodule.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iheaderHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-iheaderHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-iheaderHEADERS .PRECIOUS: Makefile types: $(typefiles) typemaker2 -I $(top_srcdir)/tools/typemaker2/types/c -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) typedefs: $(typefiles) typemaker2 --defs-only -I $(top_srcdir)/tools/typemaker2/types/c -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) format_build_files: for f in $(built_sources) $(build_headers); do \ $(ASTYLE) --style=linux -s2 --min-conditional-indent=0 --indent-labels --pad-oper --suffix=none $$f; \ done sources: for f in $(libtestframework_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/src/test_framework/testmodule.h0000666000175000017500000001304413605723441017076 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "testmodule.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef GWEN_TEST_MODULE_TESTMODULE_H #define GWEN_TEST_MODULE_TESTMODULE_H #ifdef __cplusplus extern "C" { #endif /** @page P_GWEN_TEST_MODULE Structure GWEN_TEST_MODULE

This page describes the properties of GWEN_TEST_MODULE.

GWEN_TEST_MODULE

@anchor GWEN_TEST_MODULE_id

id

Set this property with @ref GWEN_Test_Module_SetId(), get it with @ref GWEN_Test_Module_GetId().

@anchor GWEN_TEST_MODULE_name

name

Set this property with @ref GWEN_Test_Module_SetName(), get it with @ref GWEN_Test_Module_GetName().

@anchor GWEN_TEST_MODULE_description

description

Set this property with @ref GWEN_Test_Module_SetDescription(), get it with @ref GWEN_Test_Module_GetDescription().

@anchor GWEN_TEST_MODULE_result

result

Set this property with @ref GWEN_Test_Module_SetResult(), get it with @ref GWEN_Test_Module_GetResult().

@anchor GWEN_TEST_MODULE_paramsDb

paramsDb

Set this property with @ref GWEN_Test_Module_SetParamsDb(), get it with @ref GWEN_Test_Module_GetParamsDb().

*/ /* needed system headers */ #include #include #include #include /* pre-headers */ #include typedef struct GWEN_TEST_MODULE GWEN_TEST_MODULE; GWEN_TREE2_FUNCTION_LIB_DEFS(GWEN_TEST_MODULE, GWEN_Test_Module, GWENHYWFAR_API) GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_TEST_MODULE, GWENHYWFAR_API) /* post-headers */ /* definitions for virtual functions (post) */ typedef int GWENHYWFAR_CB(*GWEN_TEST_MODULE_TEST_FN)(GWEN_TEST_MODULE *p_struct); /** Constructor. */ GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_new(void); /** Destructor. */ GWENHYWFAR_API void GWEN_Test_Module_free(GWEN_TEST_MODULE *p_struct); GWENHYWFAR_API void GWEN_Test_Module_Attach(GWEN_TEST_MODULE *p_struct); GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_dup(const GWEN_TEST_MODULE *p_struct); GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_copy(GWEN_TEST_MODULE *p_struct, const GWEN_TEST_MODULE *p_src); /** Getter. * Use this function to get the member "id" (see @ref GWEN_TEST_MODULE_id) */ GWENHYWFAR_API uint32_t GWEN_Test_Module_GetId(const GWEN_TEST_MODULE *p_struct); /** Getter. * Use this function to get the member "name" (see @ref GWEN_TEST_MODULE_name) */ GWENHYWFAR_API const char *GWEN_Test_Module_GetName(const GWEN_TEST_MODULE *p_struct); /** Getter. * Use this function to get the member "description" (see @ref GWEN_TEST_MODULE_description) */ GWENHYWFAR_API const char *GWEN_Test_Module_GetDescription(const GWEN_TEST_MODULE *p_struct); /** Getter. * Use this function to get the member "result" (see @ref GWEN_TEST_MODULE_result) */ GWENHYWFAR_API int GWEN_Test_Module_GetResult(const GWEN_TEST_MODULE *p_struct); /** Setter. * Use this function to set the member "id" (see @ref GWEN_TEST_MODULE_id) */ GWENHYWFAR_API void GWEN_Test_Module_SetId(GWEN_TEST_MODULE *p_struct, uint32_t p_src); /** Setter. * Use this function to set the member "name" (see @ref GWEN_TEST_MODULE_name) */ GWENHYWFAR_API void GWEN_Test_Module_SetName(GWEN_TEST_MODULE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "description" (see @ref GWEN_TEST_MODULE_description) */ GWENHYWFAR_API void GWEN_Test_Module_SetDescription(GWEN_TEST_MODULE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "result" (see @ref GWEN_TEST_MODULE_result) */ GWENHYWFAR_API void GWEN_Test_Module_SetResult(GWEN_TEST_MODULE *p_struct, int p_src); /* prototypes for virtual functions */ /** * Returns the list of ABS_ACCOUNT_INFO objects for all known accounts. The caller is responsible for freeing the list returned (if any) via @ref ABS_AccountInfo_List_free. */ GWENHYWFAR_API int GWEN_Test_Module_Test(GWEN_TEST_MODULE *p_struct); /* setters for virtual functions */ GWENHYWFAR_API GWEN_TEST_MODULE_TEST_FN GWEN_Test_Module_SetTestFn(GWEN_TEST_MODULE *p_struct, GWEN_TEST_MODULE_TEST_FN fn); GWENHYWFAR_API void GWEN_Test_Module_ReadDb(GWEN_TEST_MODULE *p_struct, GWEN_DB_NODE *p_db); GWENHYWFAR_API int GWEN_Test_Module_WriteDb(const GWEN_TEST_MODULE *p_struct, GWEN_DB_NODE *p_db); GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_fromDb(GWEN_DB_NODE *p_db); GWENHYWFAR_API int GWEN_Test_Module_toDb(const GWEN_TEST_MODULE *p_struct, GWEN_DB_NODE *p_db); GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_Tree2_GetById(const GWEN_TEST_MODULE *p_object, uint32_t p_cmp); GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_AddTest(GWEN_TEST_MODULE *st, const char *tName, GWEN_TEST_MODULE_TEST_FN fn, const char *tDescr); GWENHYWFAR_API GWEN_TEST_MODULE *GWEN_Test_Module_AddModule(GWEN_TEST_MODULE *st, const char *tName, const char *tDescr); GWENHYWFAR_API const char *GWEN_Test_Module_GetCharParam(const GWEN_TEST_MODULE *st, const char *paramName, const char *defVal); GWENHYWFAR_API void GWEN_Test_Module_SetCharParam(GWEN_TEST_MODULE *st, const char *paramName, const char *val); /* end-headers */ #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/test_framework/testmodule.xml0000666000175000017500000002211313605723356017451 00000000000000 GWEN_TEST_MODULE GWEN_Test_Module testmodule with_inherit with_db with_tree2 with_refcount
gwenhywfar/types.h
Add a test as a submodule below the given module. $(api) $(struct_type) * $(struct_prefix)_AddTest($(struct_type) *st, const char *tName, GWEN_TEST_MODULE_TEST_FN fn, const char *tDescr); $(struct_type) * $(struct_prefix)_AddTest($(struct_type) *st, const char *tName, GWEN_TEST_MODULE_TEST_FN fn, const char *tDescr) { \n $(struct_type) *mod; \n \n mod=$(struct_prefix)_new(); \n if (tName && *tName) \n $(struct_prefix)_SetName(mod, tName); \n if (tDescr && *tDescr) \n $(struct_prefix)_SetDescription(mod, tDescr); \n if (fn) \n GWEN_Test_Module_SetTestFn(mod, fn); \n \n $(struct_prefix)_Tree2_AddChild(st, mod); \n return mod; \n } Add a submodule below the given module. $(api) $(struct_type) * $(struct_prefix)_AddModule($(struct_type) *st, const char *tName, const char *tDescr); $(struct_type) * $(struct_prefix)_AddModule($(struct_type) *st, const char *tName, const char *tDescr) { \n $(struct_type) *mod; \n \n mod=$(struct_prefix)_new(); \n if (tName && *tName) \n $(struct_prefix)_SetName(mod, tName); \n if (tDescr && *tDescr) \n $(struct_prefix)_SetDescription(mod, tDescr); \n \n $(struct_prefix)_Tree2_AddChild(st, mod); \n return mod; \n } Add a submodule below the given module. $(api) const char* $(struct_prefix)_GetCharParam(const $(struct_type) *st, const char *paramName, const char *defVal); const char* $(struct_prefix)_GetCharParam(const $(struct_type) *st, const char *paramName, const char *defVal) \n { \n assert(st); \n while(st) { \n if (st->paramsDb) { \n const char *s; \n \n s=GWEN_DB_GetCharValue(st->paramsDb, paramName, 0, NULL); \n if (s) \n return s; \n } \n st=$(struct_prefix)_Tree2_GetParent(st); \n } \n \n return defVal; \n } $(api) void $(struct_prefix)_SetCharParam($(struct_type) *st, const char *paramName, const char *val); void $(struct_prefix)_SetCharParam($(struct_type) *st, const char *paramName, const char *val) \n { \n assert(st); \n if (st->paramsDb==NULL) \n st->paramsDb=GWEN_DB_Group_new("params"); \n GWEN_DB_SetCharValue(st->paramsDb, GWEN_DB_FLAGS_OVERWRITE_VARS, paramName, val); \n }
0 0 with_getbymember public NULL NULL public own const dup const NULL NULL public own const dup const 0 0 none public NULL NULL own private Returns the list of ABS_ACCOUNT_INFO objects for all known accounts. The caller is responsible for freeing the list returned (if any) via @ref ABS_AccountInfo_List_free. public int GWEN_ERROR_NOT_IMPLEMENTED gwen_cb
gwenhywfar-5.12.1/src/test_framework/testmodule_p.h0000666000175000017500000000217013605723427017417 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "testmodule.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef GWEN_TEST_MODULE_TESTMODULE_P_H #define GWEN_TEST_MODULE_TESTMODULE_P_H #include "./testmodule.h" #ifdef __cplusplus extern "C" { #endif struct GWEN_TEST_MODULE { GWEN_INHERIT_ELEMENT(GWEN_TEST_MODULE) GWEN_TREE2_ELEMENT(GWEN_TEST_MODULE) int _refCount; uint32_t id; char *name; char *description; int result; GWEN_DB_NODE *paramsDb; GWEN_TEST_MODULE_TEST_FN testFn; }; /** Getter. * Use this function to get the member "paramsDb" (see @ref GWEN_TEST_MODULE_paramsDb) */ const GWEN_DB_NODE *GWEN_Test_Module_GetParamsDb(const GWEN_TEST_MODULE *p_struct); /** Setter. * Use this function to set the member "paramsDb" (see @ref GWEN_TEST_MODULE_paramsDb) */ void GWEN_Test_Module_SetParamsDb(GWEN_TEST_MODULE *p_struct, const GWEN_DB_NODE *p_src); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/src/test_framework/testgui_p.h0000666000175000017500000000141013605660370016707 00000000000000/*************************************************************************** begin : Thu Jan 09 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_TEST_GUI_P_H #define GWEN_TEST_GUI_P_H #include "testgui_l.h" #include #include typedef struct GWEN_GUI_TEST GWEN_GUI_TEST; struct GWEN_GUI_TEST { GWEN_STRINGLIST *logStrings; int logHookIsActive; char *logFile; int logLastX; GWEN_GUI_LOG_HOOK_FN previousLogHook; }; #endif gwenhywfar-5.12.1/src/test_framework/Makefile.am0000666000175000017500000000232413605654150016573 00000000000000AM_CPPFLAGS= -I$(gwenhywfar_symlinkdir) \ -I$(top_srcdir)/src/base \ -I$(top_srcdir)/src/parser \ $(LIBGNUTLS_CFLAGS) \ @all_includes@ AM_CFLAGS=@visibility_cflags@ @WERROR@ -DBUILDING_GWENHYWFAR typefiles=\ testmodule.xml EXTRA_DIST=$(typefiles) noinst_LTLIBRARIES=libtestframework.la noinst_HEADERS=\ testmodule_p.h \ testframework_p.h \ testgui_l.h \ testgui_p.h iheaderdir=$(gwenhywfar_headerdir_am)/gwenhywfar iheader_HEADERS=\ testmodule.h \ testframework.h libtestframework_la_SOURCES=\ testmodule.c \ testframework.c \ testgui.c types: $(typefiles) typemaker2 -I $(top_srcdir)/tools/typemaker2/types/c -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) typedefs: $(typefiles) typemaker2 --defs-only -I $(top_srcdir)/tools/typemaker2/types/c -I $(srcdir) --destfolder="$(srcdir)" -D GWENHYWFAR_API $(typefiles) format_build_files: for f in $(built_sources) $(build_headers); do \ $(ASTYLE) --style=linux -s2 --min-conditional-indent=0 --indent-labels --pad-oper --suffix=none $$f; \ done sources: for f in $(libtestframework_la_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/src/test_framework/testframework.h0000664000175000017500000000211514170115332017571 00000000000000/*************************************************************************** begin : Thu Jan 09 2020 copyright : (C) 2020 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_TEST_FRAMEWORK_H #define GWEN_TEST_FRAMEWORK_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct GWEN_TEST_FRAMEWORK GWEN_TEST_FRAMEWORK; GWENHYWFAR_API GWEN_TEST_FRAMEWORK *TestFramework_new(void); GWENHYWFAR_API void TestFramework_AddModule(GWEN_TEST_FRAMEWORK *tf, GWEN_TEST_MODULE *mod); GWENHYWFAR_API int TestFramework_Run(GWEN_TEST_FRAMEWORK *tf, int argc, char **argv); GWENHYWFAR_API GWEN_TEST_MODULE *TestFramework_GetModulesRoot(const GWEN_TEST_FRAMEWORK *tf); GWENHYWFAR_API void TestFramework_free(GWEN_TEST_FRAMEWORK *tf); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/test-driver0000755000175000017500000001141714215102164013100 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <"$log_file" "$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: gwenhywfar-5.12.1/ltmain.sh0000755000175000017500000121240114605317530012532 00000000000000#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 # libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.7 Debian-2.4.7-7~deb12u1" package_revision=2.4.7 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2004-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # These NLS vars are set unconditionally (bootstrap issue #24). Unset those # in case the environment reset is needed later and the $save_* variant is not # defined (see the code above). LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # func_unset VAR # -------------- # Portably unset VAR. # In some shells, an 'unset VAR' statement leaves a non-zero return # status if VAR is already unset, which might be problematic if the # statement is used at the end of a function (thus poisoning its return # value) or when 'set -e' is active (causing even a spurious abort of # the script in this case). func_unset () { { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } } # Make sure CDPATH doesn't cause `cd` commands to output the target dir. func_unset CDPATH # Make sure ${,E,F}GREP behave sanely. func_unset GREP_OPTIONS ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" # require_check_ifs_backslash # --------------------------- # Check if we can use backslash as IFS='\' separator, and set # $check_ifs_backshlash_broken to ':' or 'false'. require_check_ifs_backslash=func_require_check_ifs_backslash func_require_check_ifs_backslash () { _G_save_IFS=$IFS IFS='\' _G_check_ifs_backshlash='a\\b' for _G_i in $_G_check_ifs_backshlash do case $_G_i in a) check_ifs_backshlash_broken=false ;; '') break ;; *) check_ifs_backshlash_broken=: break ;; esac done IFS=$_G_save_IFS require_check_ifs_backslash=: } ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. if test -z "$_G_HAVE_PLUSEQ_OP" && \ __PLUSEQ_TEST="a" && \ __PLUSEQ_TEST+=" b" 2>/dev/null && \ test "a b" = "$__PLUSEQ_TEST"; then _G_HAVE_PLUSEQ_OP=yes fi if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1=\$$1\\ \$func_quote_arg_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_portable EVAL ARG # ---------------------------- # Internal function to portably implement func_quote_arg. Note that we still # keep attention to performance here so we as much as possible try to avoid # calling sed binary (so far O(N) complexity as long as func_append is O(1)). func_quote_portable () { $debug_cmd $require_check_ifs_backslash func_quote_portable_result=$2 # one-time-loop (easy break) while true do if $1; then func_quote_portable_result=`$ECHO "$2" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` break fi # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string # contains the shell wildcard characters. case $check_ifs_backshlash_broken$func_quote_portable_result in :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break ;; esac func_quote_portable_old_IFS=$IFS for _G_char in '\' '`' '"' '$' do # STATE($1) PREV($2) SEPARATOR($3) set start "" "" func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy IFS=$_G_char for _G_part in $func_quote_portable_result do case $1 in quote) func_append func_quote_portable_result "$3$2" set quote "$_G_part" "\\$_G_char" ;; start) set first "" "" func_quote_portable_result= ;; first) set quote "$_G_part" "" ;; esac done done IFS=$func_quote_portable_old_IFS ;; *) ;; esac break done func_quote_portable_unquoted_result=$func_quote_portable_result case $func_quote_portable_result in # double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_portable_result=\"$func_quote_portable_result\" ;; esac } # func_quotefast_eval ARG # ----------------------- # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', # but optimized for speed. Result is stored in $func_quotefast_eval. if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then printf -v _GL_test_printf_tilde %q '~' if test '\~' = "$_GL_test_printf_tilde"; then func_quotefast_eval () { printf -v func_quotefast_eval_result %q "$1" } else # Broken older Bash implementations. Make those faster too if possible. func_quotefast_eval () { case $1 in '~'*) func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result ;; *) printf -v func_quotefast_eval_result %q "$1" ;; esac } fi else func_quotefast_eval () { func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result } fi # func_quote_arg MODEs ARG # ------------------------ # Quote one ARG to be evaled later. MODEs argument may contain zero or more # specifiers listed below separated by ',' character. This function returns two # values: # i) func_quote_arg_result # double-quoted (when needed), suitable for a subsequent eval # ii) func_quote_arg_unquoted_result # has all characters that are still active within double # quotes backslashified. Available only if 'unquoted' is specified. # # Available modes: # ---------------- # 'eval' (default) # - escape shell special characters # 'expand' # - the same as 'eval'; but do not quote variable references # 'pretty' # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might # be used later in func_quote to get output like: 'echo "a b"' instead # of 'echo a\ b'. This is slower than default on some shells. # 'unquoted' # - produce also $func_quote_arg_unquoted_result which does not contain # wrapping double-quotes. # # Examples for 'func_quote_arg pretty,unquoted string': # # string | *_result | *_unquoted_result # ------------+-----------------------+------------------- # " | \" | \" # a b | "a b" | a b # "a b" | "\"a b\"" | \"a b\" # * | "*" | * # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" # # Examples for 'func_quote_arg pretty,unquoted,expand string': # # string | *_result | *_unquoted_result # --------------+---------------------+-------------------- # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" func_quote_arg () { _G_quote_expand=false case ,$1, in *,expand,*) _G_quote_expand=: ;; esac case ,$1, in *,pretty,*|*,expand,*|*,unquoted,*) func_quote_portable $_G_quote_expand "$2" func_quote_arg_result=$func_quote_portable_result func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) # Faster quote-for-eval for some shells. func_quotefast_eval "$2" func_quote_arg_result=$func_quotefast_eval_result ;; esac } # func_quote MODEs ARGs... # ------------------------ # Quote all ARGs to be evaled later and join them into single command. See # func_quote_arg's description for more info. func_quote () { $debug_cmd _G_func_quote_mode=$1 ; shift func_quote_result= while test 0 -lt $#; do func_quote_arg "$_G_func_quote_mode" "$1" if test -n "$func_quote_result"; then func_append func_quote_result " $func_quote_arg_result" else func_append func_quote_result "$func_quote_arg_result" fi shift done } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_arg pretty,expand "$_G_cmd" eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_arg expand,pretty "$_G_cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2010-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # # Set a version string for this script. scriptversion=2019-02-19.15; # UTC ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # in the main code. A hook is just a list of function names that can be # run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of hook functions to be called by # FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_propagate_result FUNC_NAME_A FUNC_NAME_B # --------------------------------------------- # If the *_result variable of FUNC_NAME_A _is set_, assign its value to # *_result variable of FUNC_NAME_B. func_propagate_result () { $debug_cmd func_propagate_result_result=: if eval "test \"\${${1}_result+set}\" = set" then eval "${2}_result=\$${1}_result" else func_propagate_result_result=false fi } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd _G_rc_run_hooks=false case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do func_unset "${_G_hook}_result" eval $_G_hook '${1+"$@"}' func_propagate_result $_G_hook func_run_hooks if $func_propagate_result_result; then eval set dummy "$func_run_hooks_result"; shift fi done } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list from your hook function. You may remove # or edit any options that you action, and then pass back the remaining # unprocessed options in '_result', escaped # suitably for 'eval'. # # The '_result' variable is automatically unset # before your hook gets called; for best performance, only set the # *_result variable when necessary (i.e. don't call the 'func_quote' # function unnecessarily because it can be an expensive operation on some # machines). # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). Leave # # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@" in case we need it later, # # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then # func_quote eval ${1+"$@"} # my_silent_option_result=$func_quote_result # fi # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd func_run_hooks func_options ${1+"$@"} func_propagate_result func_run_hooks func_options_finish } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do func_unset func_${my_func}_result func_unset func_run_hooks_result eval func_$my_func '${1+"$@"}' func_propagate_result func_$my_func func_options if $func_propagate_result_result; then eval set dummy "$func_options_result"; shift _G_options_quoted=: fi done $_G_options_quoted || { # As we (func_options) are top-level options-parser function and # nobody quoted "$@" for us yet, we need to do it explicitly for # caller. func_quote eval ${1+"$@"} func_options_result=$func_quote_result } } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} func_propagate_result func_run_hooks func_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} func_propagate_result func_run_hooks func_parse_options if $func_propagate_result_result; then eval set dummy "$func_parse_options_result"; shift # Even though we may have changed "$@", we passed the "$@" array # down into the hook and it quoted it for us (because we are in # this if-branch). No need to quote it again. _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break # We expect that one of the options parsed in this function matches # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" >&2 $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_parse_options_requote=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac if $_G_match_parse_options; then _G_parse_options_requote=: fi done if $_G_parse_options_requote; then # save modified positional parameters for caller func_quote eval ${1+"$@"} func_parse_options_result=$func_quote_result fi } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables # after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} if test "x$func_split_equals_lhs" = "x$1"; then func_split_equals_rhs= fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. # The version message is extracted from the calling file's header # comments, with leading '# ' stripped: # 1. First display the progname and version # 2. Followed by the header comment line matching /^# Written by / # 3. Then a blank line followed by the first following line matching # /^# Copyright / # 4. Immediately followed by any lines between the previous matches, # except lines preceding the intervening completely blank line. # For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /^# Written by /!b s|^# ||; p; n :fwd2blnk /./ { n b fwd2blnk } p; n :holdwrnt s|^# || s|^# *$|| /^Copyright /!{ /./H n b holdwrnt } s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| G s|\(\n\)\n*|\1|g p; q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.7-7~deb12u1 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= _G_rc_lt_options_prep=: _G_rc_lt_options_prep=: # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote eval ${1+"$@"} libtool_options_prep_result=$func_quote_result fi } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote eval ${1+"$@"} libtool_parse_options_result=$func_quote_result fi } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote eval ${1+"$@"} libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_arg pretty "$libobj" test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_arg pretty "$srcfile" qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wa,FLAG -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_arg pretty "$nonopt" install_prog="$func_quote_arg_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_arg pretty "$arg" func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_arg pretty "$arg" func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then func_quote_arg pretty "$arg2" fi func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_arg pretty "$install_override_mode" func_append install_shared_prog " -m $func_quote_arg_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_arg expand,pretty "$relink_command" eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" func_quote_arg pretty "$ECHO" qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_arg pretty,unquoted "$arg" qarg=$func_quote_arg_unquoted_result func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xassembler) func_append compiler_flags " -Xassembler $qarg" prev= func_append compile_command " -Xassembler $qarg" func_append finalize_command " -Xassembler $qarg" continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. -pthread) case $host in *solaris2*) ;; *) case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac ;; esac continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $func_quote_arg_result" func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $wl$func_quote_arg_result" func_append compiler_flags " $wl$func_quote_arg_result" func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xassembler) prev=xassembler continue ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -static-* direct GCC to link specific libraries statically # -fcilkplus Cilk Plus language extension features for C/C++ # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_arg pretty "$arg" arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty "$var_value" relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done func_quote eval cd "`pwd`" func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty,unquoted "$var_value" relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. func_quote eval cd "`pwd`" relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" func_quote_arg pretty,unquoted "$relink_command" relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: gwenhywfar-5.12.1/gwenhywfar-config-version.cmake.in0000644000175000017500000000050013142134462017413 00000000000000set(PACKAGE_VERSION "@GWENHYWFAR_VERSION_STRING@") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") set(PACKAGE_VERSION_EXACT TRUE) endif() endif() gwenhywfar-5.12.1/configure.ac0000644000175000017500000013237115032533601013175 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # ###------------------------------------------------------------------------- # # The following line makes sure that this file is always touched when a new # revision is checked out. # # $Rev$ # # info GWENHYWFAR_AUTHOR="Martin Preuss" GWENHYWFAR_BUGREPORT_ADDR="" AC_PREREQ(2.60) AC_INIT AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CONFIG_SRCDIR([src/gwenhywfarapi.h]) AC_CONFIG_HEADERS([config.h]) ###------------------------------------------------------------------------- # # versions # GWENHYWFAR_VERSION_MAJOR=5 GWENHYWFAR_VERSION_MINOR=12 GWENHYWFAR_VERSION_PATCHLEVEL=1 GWENHYWFAR_VERSION_BUILD=0 dnl "stable", "rcX", "betaX", "cvs" GWENHYWFAR_VERSION_TAG="stable" ###------------------------------------------------------------------------- # # SO version for Gwenhywfar # GWENHYWFAR_SO_CURRENT="91" GWENHYWFAR_SO_AGE="12" GWENHYWFAR_SO_REVISION="1" GWENHYWFAR_SO_EFFECTIVE="`echo \$(($GWENHYWFAR_SO_CURRENT-$GWENHYWFAR_SO_AGE))`" ###------------------------------------------------------------------------- # # Generate version strings and BUILD # #GWENHYWFAR_VERSION_BUILD="0" # Let svn write the revision number directly into here on # each svn update. Note: The trailing space is necessary for # cvs versions. #GWENHYWFAR_VERSION_BUILD=`echo "$Rev$ " | cut -d' ' -f2` #if test "x$GWENHYWFAR_VERSION_BUILD" = "x" ; then # GWENHYWFAR_VERSION_BUILD="0" #fi GWENHYWFAR_VERSION_FULL_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.${GWENHYWFAR_VERSION_PATCHLEVEL}${GWENHYWFAR_VERSION_TAG}-${GWENHYWFAR_VERSION_BUILD}" GWENHYWFAR_VERSION_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL" # The version number for the plugin/ct/ohbci/ohbci.la OHBCI_VERSION_STRING="0.1.0" ###------------------------------------------------------------------------- # # Create release strings # case "$GWENHYWFAR_VERSION_TAG" in cvs|svn|git) GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL.${GWENHYWFAR_VERSION_BUILD}" ;; stable) GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL" ;; *) GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL" # add TAG GWENHYWFAR_VERSION_RELEASE_STRING="${GWENHYWFAR_VERSION_RELEASE_STRING}${GWENHYWFAR_VERSION_TAG}" ;; esac AC_SUBST(GWENHYWFAR_VERSION_MAJOR) AC_SUBST(GWENHYWFAR_VERSION_MINOR) AC_SUBST(GWENHYWFAR_VERSION_PATCHLEVEL) AC_SUBST(GWENHYWFAR_VERSION_BUILD) AC_SUBST(GWENHYWFAR_VERSION_TAG) AC_SUBST(GWENHYWFAR_VERSION_FULL_STRING) AC_SUBST(GWENHYWFAR_VERSION_STRING) AC_SUBST(GWENHYWFAR_VERSION_RELEASE_STRING) AC_SUBST(OHBCI_VERSION_STRING) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_MAJOR,$GWENHYWFAR_VERSION_MAJOR, [major version]) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_MINOR,$GWENHYWFAR_VERSION_MINOR, [minor version]) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_PATCHLEVEL,$GWENHYWFAR_VERSION_PATCHLEVEL, [patchlevel]) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_BUILD,$GWENHYWFAR_VERSION_BUILD, [build]) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_STRING,"$GWENHYWFAR_VERSION_STRING", [version string]) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_FULL_STRING,"$GWENHYWFAR_VERSION_FULL_STRING", [full version string]) AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_TAG,$GWENHYWFAR_VERSION_TAG, [tag]) AC_SUBST(GWENHYWFAR_SO_CURRENT) AC_SUBST(GWENHYWFAR_SO_REVISION) AC_SUBST(GWENHYWFAR_SO_AGE) AC_SUBST(GWENHYWFAR_SO_EFFECTIVE) AM_INIT_AUTOMAKE(gwenhywfar, $GWENHYWFAR_VERSION_RELEASE_STRING) ###------------------------------------------------------------------------- # # SO version for GwenUI # GWENUI_SO_CURRENT="1" GWENUI_SO_REVISION="1" GWENUI_SO_AGE="0" GWENUI_SO_EFFECTIVE="`echo \$(($GWENUI_SO_CURRENT-$GWENUI_SO_AGE))`" AC_SUBST(GWENUI_SO_CURRENT) AC_SUBST(GWENUI_SO_REVISION) AC_SUBST(GWENUI_SO_AGE) AC_SUBST(GWENUI_SO_EFFECTIVE) ###------------------------------------------------------------------------- # # SO version for GwenPP # GWENPP_SO_CURRENT="16" GWENPP_SO_REVISION="0" GWENPP_SO_AGE="0" GWENPP_SO_EFFECTIVE="`echo \$(($GWENPP_SO_CURRENT-$GWENPP_SO_AGE))`" AC_SUBST(GWENPP_SO_CURRENT) AC_SUBST(GWENPP_SO_REVISION) AC_SUBST(GWENPP_SO_AGE) AC_SUBST(GWENPP_SO_EFFECTIVE) ###------------------------------------------------------------------------- # check for OS AQ_CHECK_OS if test "$OSYSTEM" = "osx"; then COCOA_FRAMEWORK="-framework Cocoa" FOUNDATION_FRAMEWORK="-framework CoreFoundation" SYSCONF_FRAMEWORK="-framework SystemConfiguration" APPKIT_FRAMEWORK="-framework AppKit" COREDATA_FRAMEWORK="-framework CoreData" WEBKIT_FRAMEWORK="-framework WebKit" fi AC_SUBST(COCOA_FRAMEWORK) AC_SUBST(FOUNDATION_FRAMEWORK) AC_SUBST(SYSCONF_FRAMEWORK) AC_SUBST(APPKIT_FRAMEWORK) AC_SUBST(COREDATA_FRAMEWORK) AC_SUBST(WEBKIT_FRAMEWORK) ###------------------------------------------------------------------------- # prefix handling AC_PREFIX_DEFAULT(/usr/local) if test "x$prefix" = "xNONE"; then prefix=$ac_default_prefix ac_configure_args="$ac_configure_args --prefix $prefix" fi AC_SUBST(prefix) ###------------------------------------------------------------------------- # # static/shared handling # AC_ENABLE_STATIC(no) AC_ENABLE_SHARED(yes) ###------------------------------------------------------------------------- # # Checks for programs. # AC_PROG_CC AC_PROG_CXX AC_PROG_CPP AC_PROG_OBJC #AC_PROG_OBJCXX #AC_PROG_OBJCXXCPP AC_PROG_INSTALL AC_PROG_LIBTOOL AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_RC # Newer libtool doesn't have AC_LIBTOOL_RC anymore. Need to check for # $(RC) by ourselves. AC_CHECK_TOOL([RC], [windres], [no]) AC_PROG_AWK AC_CHECK_PROG(USE_DOT,dot,YES,NO) AC_CHECK_PROG(SED,sed,sed) # Check for the tool "astyle", but if not found, replace its program call by the no-op "echo" instead AC_CHECK_PROG(ASTYLE, astyle, astyle, echo) AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes) ###------------------------------------------------------------------------- # # Checks for libraries. # AC_CHECK_LIB(dl, dlopen) # note: this AC_CHECK_LIB will also add -ldl to LIBS. AX_PTHREAD #AC_CHECK_LIB(rt, sem_init, # [ # rt_libs="-lrt -pthread" # AC_DEFINE(HAVE_LIBRT, "1", [whether librt is available]) # ], [], [-pthread]) #AC_SUBST(rt_libs) # Some systems have iconv in libc, some have it in libiconv (OSF/1 and # those with the standalone portable GNU libiconv installed). Check # which one is available. The define ICONV_CONST will be "" or "const" # accordingly. AM_ICONV ###------------------------------------------------------------------------- # # Checks for header files. # AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h]) AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/socket.h sys/time.h]) AC_CHECK_HEADERS([syslog.h unistd.h]) AC_CHECK_HEADERS([unistd.h]) AC_CHECK_HEADERS([dlfcn.h]) AC_CHECK_HEADERS([signal.h termios.h langinfo.h localcharset.h iconv.h]) AC_CHECK_HEADERS([time.h locale.h]) AC_CHECK_HEADERS([syslog.h]) AC_CHECK_HEADERS([sys/stat.h]) AC_CHECK_HEADERS([sys/types.h]) AC_CHECK_HEADERS([sys/wait.h]) AC_CHECK_HEADERS([regex.h]) AC_CHECK_HEADERS([endian.h]) AC_CHECK_HEADERS([sys/select.h]) ###------------------------------------------------------------------------- # # Checks for declarations # AC_CHECK_DECLS([sigprocmask], [], [], [ #ifdef HAVE_SIGNAL_H # include #endif ]) ###------------------------------------------------------------------------- # # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST AC_HEADER_TIME AC_STRUCT_TM ###------------------------------------------------------------------------- # # Checks for library functions. # AC_FUNC_CLOSEDIR_VOID AC_FUNC_MKTIME AC_FUNC_SELECT_ARGTYPES AC_CHECK_FUNCS([gethostbyaddr gethostbyname inet_ntoa isascii getpid]) AC_CHECK_FUNCS([memmove memset]) AC_CHECK_FUNCS([select socket]) AC_CHECK_FUNCS([strcasecmp strchr strdup strerror]) AC_CHECK_FUNCS([snprintf]) AC_CHECK_FUNCS([symlink setlocale]) AC_CHECK_FUNCS([srandom random]) # Init binreloc AM_BINRELOC ###------------------------------------------------------------------------- # # check whether gwen is a subproject to another one # AC_MSG_CHECKING(if gwen is a subproject) AC_ARG_ENABLE(gwen-subproject, [ --enable-gwen-subproject make gwen only a subproject (default=no)], enable_gwen_subproject="$enableval", enable_gwen_subproject="no") AC_MSG_RESULT($enable_gwen_subproject) if test "$enable_gwen_subproject" != "no"; then AC_DEFINE(GWENHYWFAR_IS_SUBPROJECT, 1, [whether gwen is a subproject]) fi ###------------------------------------------------------------------------- # # check whether accompanying certificates should be used # AC_MSG_CHECKING(whether system-wide trusted certificates should be set) AC_ARG_ENABLE(system-certs, [ --enable-system-certs use system-wide certificates (default=yes)], enable_system_certs="$enableval", enable_system_certs="yes") AC_MSG_RESULT($enable_system_certs) if test "$enable_system_certs" != "no"; then AC_DEFINE(GWEN_TLS_USE_SYSTEM_CERTIFICATES, 1, [whether system-wide trusted certificates should be set]) fi AM_CONDITIONAL(INSTALL_CERTS, [test "$enable_system_certs" = "no"]) ###------------------------------------------------------------------------- # # check whether 'make check' should run checks that depend on network connectivity # AC_MSG_CHECKING(network connectivity can be assumed available during 'make check') AC_ARG_ENABLE(network-checks, [ --disable-network-checks disables checks that assume available network during build (default=enabled)], enable_gwen_network_checks="$enableval", enable_gwen_network_checks="yes") AC_MSG_RESULT($enable_gwen_network_checks) if test "$enable_gwen_network_checks" = "no"; then AC_DEFINE(GWENHYWFAR_SKIP_NETWORK_CHECKS, 1, [whether to run network-dependent checks during build]) fi ###------------------------------------------------------------------------- # # check whether test code should be enabled # AC_MSG_CHECKING(whether to enable test code) AC_ARG_ENABLE(testcode, [ --enable-testcode allow compiling of test code (default=no)], enable_testcode="$enableval", enable_testcode="no") AC_MSG_RESULT($enable_testcode) if test "$enable_testcode" != "no"; then AC_DEFINE(GWENHYWFAR_ENABLE_TESTCODE, 1, [whether to enable test code]) fi ###------------------------------------------------------------------------- # # check whether local installation mode is enabled # AC_MSG_CHECKING(whether local installation mode is wanted) AC_ARG_ENABLE(local-install, [ --enable-local-install allow local installation mode (default=no)], enable_local_install="$enableval", enable_local_install="no") AC_MSG_RESULT($enable_local_install) if test "$enable_local_install" != "no"; then AC_DEFINE(ENABLE_LOCAL_INSTALL, 1, [whether local install is wanted]) fi ###------------------------------------------------------------------------- # # OS dependant settings # # Common settings for all OSs gwenhywfar_bindir="\${bindir}" gwenhywfar_libs="-lgwenhywfar" gwenhywfar_ldflags="-L\${libdir}" gwenhywfar_internal_libname="libgwenhywfar.la" gwenhywfar_headerdir_am="\$(includedir)/gwenhywfar5" gwenhywfar_headerdir="\${includedir}/gwenhywfar5" gwenhywfar_plugindir="\${libdir}/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}" gwenhywfar_symlinkdir="\$(top_builddir)/gwenhywfar5" gwenhywfar_datadir="\${datadir}/gwenhywfar" gwenhywfar_sysdatadir="\${datadir}" # Now the specific settings case "$OS_TYPE" in posix) gwenhywfar_sys_is_windows=0 gwenhywfar_os_lib="os/posix/libos.la" GWEN_OS="posix" # add special libraries for solaris if test "$OSYSTEM" = "solaris"; then all_libraries="${all_libraries} -lresolv -lsocket" PROG_LIBRARIES="${PROG_LIBRARIES} -lresolv -lsocket" fi # add special libraries for darwin if test "$OSYSTEM" = "osx"; then # hmm, this should be detected by the GETTEXT macro... #PROG_LIBRARIES="${PROG_LIBRARIES} -lintl" # for local install mode on Mac OS X link with the CoreFoundation framework if test "$enable_local_install" != "no"; then all_libraries="${all_libraries} -framework CoreFoundation" fi fi gwenbuild_tool="gwenbuild" ;; windows) gwenhywfar_sys_is_windows=1 dnl ACX_WINDOWS_PATHS gwenhywfar_os_lib="os/windows/libos.la" GWEN_OS="windows" all_libraries="${all_libraries} -lwsock32" gwenbuild_tool="" ;; *) AC_MSG_ERROR(**** Unknown operating system type) ;; esac AM_CONDITIONAL(IS_WINDOWS, [test "$OS_TYPE" = "windows"]) AC_SUBST(gwenhywfar_sys_is_windows) AC_SUBST(gwenbuild_tool) dnl # Check for x86_64 architecture; potentially set lib-directory suffix dnl if test "$target_cpu" = "x86_64"; then dnl libdirsuffix="64" dnl else dnl libdirsuffix="" dnl fi dnl AC_DEFINE_UNQUOTED(LIBDIRSUFFIX, ["$libdirsuffix"], [Defined to the suffix string of the library directory]) dnl --- no longer needed since $libdir is used directly ###------------------------------------------------------------------------- # # check plugin search path # AC_MSG_CHECKING(plugin search dir) AC_ARG_WITH(plugin-searchdir, [ --with-plugin-searchdir=DIR where to search for plugins], [gwenhywfar_plugin_searchdir="$withval"], [gwenhywfar_plugin_searchdir=""]) if test -z "${gwenhywfar_plugin_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_plugin_searchdir="lib/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}" else if test "$enable_local_install" != "no"; then gwenhywfar_plugin_searchdir="lib/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}" else gwenhywfar_plugin_searchdir="$gwenhywfar_plugindir" fi fi fi AC_SUBST(gwenhywfar_plugin_searchdir) AC_MSG_RESULT($gwenhywfar_plugin_searchdir) ###------------------------------------------------------------------------- # # check data search dir # AC_MSG_CHECKING(data search dir) AC_ARG_WITH(data-searchdir, [ --with-data-searchdir=DIR where to search for data files], [gwenhywfar_data_searchdir="$withval"], [gwenhywfar_data_searchdir=""]) if test -z "${gwenhywfar_data_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_data_searchdir="share/gwenhywfar" else if test "$enable_local_install" != "no"; then gwenhywfar_data_searchdir="share/gwenhywfar" else gwenhywfar_data_searchdir="$gwenhywfar_datadir" fi fi fi AC_SUBST(gwenhywfar_data_searchdir) AC_MSG_RESULT($gwenhywfar_data_searchdir) ###------------------------------------------------------------------------- # # check system data search dir # AC_MSG_CHECKING(system data search dir) AC_ARG_WITH(sysdata-searchdir, [ --with-sysdata-searchdir=DIR where to search for data files], [gwenhywfar_sysdata_searchdir="$withval"], [gwenhywfar_sysdata_searchdir=""]) if test -z "${gwenhywfar_sysdata_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_sysdata_searchdir="share" else if test "$enable_local_install" != "no"; then gwenhywfar_sysdata_searchdir="share" else gwenhywfar_sysdata_searchdir="$gwenhywfar_sysdatadir" fi fi fi AC_SUBST(gwenhywfar_sysdata_searchdir) AC_MSG_RESULT($gwenhywfar_sysdata_searchdir) ###------------------------------------------------------------------------- # # check locale search dir # AC_MSG_CHECKING(locale search dir) AC_ARG_WITH(locale-searchdir, [ --with-locale-searchdir=DIR where to search for locale files], [gwenhywfar_locale_searchdir="$withval"], [gwenhywfar_locale_searchdir=""]) if test -z "${gwenhywfar_locale_searchdir}"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_locale_searchdir="share/locale" else if test "$enable_local_install" != "no"; then gwenhywfar_locale_searchdir="share/locale" else gwenhywfar_locale_searchdir="\$(localedir)" fi fi fi AC_SUBST(gwenhywfar_locale_searchdir) AC_MSG_RESULT($gwenhywfar_locale_searchdir) ###------------------------------------------------------------------------- # # check cfg search dir # AC_MSG_CHECKING(cfg search dir) AC_ARG_WITH(cfg-searchdir, [ --with-cfg-searchdir=DIR where to search for cfg files], [gwenhywfar_cfg_searchdir="$withval"], [gwenhywfar_cfg_searchdir=""]) if test -z "$gwenhywfar_cfg_searchdir"; then if test "$OSYSTEM" = "windows"; then gwenhywfar_cfg_searchdir="etc" else if test "$enable_local_install" != "no"; then gwenhywfar_cfg_searchdir="etc" else gwenhywfar_cfg_searchdir="\$(sysconfdir)" fi fi fi AC_SUBST(gwenhywfar_cfg_searchdir) AC_MSG_RESULT($gwenhywfar_cfg_searchdir) ###------------------------------------------------------------------------- # # check whether variadic macros should be supported # AC_MSG_CHECKING(if compiling with variadic macros) AC_ARG_ENABLE(variadic-macros, [ --enable-variadic-macros enable variadic macros (default=yes)], enable_variadic_macros="$enableval", enable_variadic_macros="yes") AC_MSG_RESULT($enable_variadic_macros) if test "x$enable_variadic_macros" = "xno"; then AC_DEFINE(NO_VARIADIC_MACROS, 1, [Define if variadic macros should be disabled]) fi ###------------------------------------------------------------------------- # # check whether profiling is to be supported # AC_MSG_CHECKING(if profiling is to be supported) AC_ARG_ENABLE(profiling, [ --enable-profiling enable profiling (default=no)], enable_profiling="$enableval", enable_profiling="no") AC_MSG_RESULT($enable_profiling) if test "x$enable_profiling" = "xyes"; then PROFILING_CFLAGS="-pg" PROFILING_LDFLAGS="-pg" else PROFILING_CFLAGS="" PROFILING_LDFLAGS="" fi AC_SUBST(PROFILING_CFLAGS) AC_SUBST(PROFILING_LDFLAGS) ###------------------------------------------------------------------------- # # check for Debian multiarch paths # AC_PATH_TOOL([DPKG_ARCH], [dpkg-architecture]) AC_MSG_CHECKING([for multiarch paths]) multiarch_triplet="" DEBIAN_MULTIARCH_DIRS="" if test -n "$DPKG_ARCH"; then multiarch_triplet=$($DPKG_ARCH -qDEB_HOST_MULTIARCH 2> /dev/null) if test -z "$multiarch_triplet"; then multiarch_triplet=$($DPKG_ARCH -qDEB_HOST_GNU_TYPE) fi fi if test -n "$multiarch_triplet"; then DEBIAN_MULTIARCH_DIRS="/lib/$multiarch_triplet /usr/lib/$multiarch_triplet" AC_MSG_RESULT([$DEBIAN_MULTIARCH_DIRS]) else AC_MSG_RESULT([not found]) fi ###------------------------------------------------------------------------- # # check for libgcrypt # NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.2.0 AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION", [Required version of Libgcrypt]) case "$OS_TYPE" in windows) LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="-lgcrypt" AC_SUBST(LIBGCRYPT_CFLAGS) AC_SUBST(LIBGCRYPT_LIBS) ;; *) AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", [have_gcrypt="yes"], [have_gcrypt="no"]) if test "$have_gcrypt" != "yes"; then AC_MSG_ERROR([ **** Libgcrypt is required for Gwenhywfar. Please install it (including devel packages) **** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)]) fi ;; esac ###------------------------------------------------------------------------- # # check for library for common error values and messages in GnuPG components # PKG_CHECK_MODULES([GPG_ERROR], [gpg-error]) ###------------------------------------------------------------------------- # # check for libgnutls # PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.9.8]) ###------------------------------------------------------------------------- # # check for OpenSSL # PKG_CHECK_MODULES([OPENSSL], [openssl], [ssl_available=yes], [ssl_available=no]) if test "$ssl_available" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_OPENSSL, 1, [Defined if OpenSSL is available]) fi AM_CONDITIONAL(IF_HAVE_OPENSSL, [test "$ssl_available" = "yes"]) AC_SUBST(ssl_available) ###------------------------------------------------------------------------- # check for Distribution AQ_DISTRIBUTION ###------------------------------------------------------------------------- # # check for I18N # # check whether i18n files are to be created AC_CHECK_PROG(XGETTEXT,xgettext,xgettext, missing) MAKE_I18N_FILES="yes" if test "$XGETTEXT" = "missing"; then MAKE_I18N_FILES="no" AC_MSG_WARN([xgettext is missing. Locale suport is disabled.]) fi AC_PATH_PROG([MSGFMT], [msgfmt], [missing]) if test "$MSGFMT" = "missing"; then MAKE_I18N_FILES="no" AC_MSG_WARN([msgfmt is missing. Locale suport is disabled.]) fi AC_SUBST(MAKE_I18N_FILES) AM_CONDITIONAL(IF_MAKE_I18N_FILES, [test "$MAKE_I18N_FILES" = "yes"]) ## then check whether i18n support is to be compiled in #i18n_libs="" #HAVE_I18N="yes" #AC_CHECK_HEADERS([locale.h libintl.h], [], [HAVE_I18N="no"]) #if test "$OS_TYPE" != "windows"; then # oldlibs="$LIBS" # LIBS="" # AC_SEARCH_LIBS(libintl_bindtextdomain, intl, [], [HAVE_I18N="no"]) # i18n_libs="$LIBS" # LIBS="$oldlibs" #else # if test "$HAVE_I18N" != "no"; then # i18n_libs="-lintl" # all_libraries="${all_libraries} -lintl" # fi #fi # #if test "$HAVE_I18N" != "no"; then # AC_DEFINE_UNQUOTED(HAVE_I18N, 1, [whether I18N is available]) #fi # #AC_SUBST(HAVE_I18N) #AC_SUBST(i18n_libs) AM_GNU_GETTEXT([external]) i18n_libs="$LTLIBINTL" all_libraries="${all_libraries} $LTLIBINTL" HAVE_I18N="$USE_NLS" if test "$HAVE_I18N" != "no"; then AC_DEFINE_UNQUOTED(HAVE_I18N, 1, [whether I18N is available]) fi AC_SUBST(i18n_libs) AC_SUBST(HAVE_I18N) ###------------------------------------------------------------------------- # # check for iconv # AC_ARG_WITH(iconv, [ --with-iconv=PATH take iconv from PATH], [ICONV_DIR="$withval"], [ICONV_DIR="/usr"]) if test "$ICONV_DIR" = "no" ; then echo Disabling ICONV support else if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" # Export this since our headers include iconv.h ICONV_INCLUDES="-I$ICONV_DIR/include" ICONV_LIBS="-L$ICONV_DIR/lib" fi AC_CHECK_HEADER(iconv.h, AC_MSG_CHECKING(for iconv) AC_TRY_LINK([#include #include ],[ iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL);],[ AC_MSG_RESULT(yes) WITH_ICONV=1],[ AC_MSG_RESULT(no) AC_MSG_CHECKING(for iconv in -liconv) _ldflags="${LDFLAGS}" _libs="${LIBS}" LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" AC_TRY_LINK([#include #include ],[ iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL);],[ AC_MSG_RESULT(yes) WITH_ICONV=1 ICONV_LIBS="${ICONV_LIBS} -liconv" LIBS="${_libs}" LDFLAGS="${_ldflags}"],[ AC_MSG_RESULT(no) LIBS="${_libs}" LDFLAGS="${_ldflags}"])])) fi AC_DEFINE_UNQUOTED(HAVE_ICONV, $WITH_ICONV, [Defined if libiconv is available]) AC_SUBST(WITH_ICONV) AC_SUBST(ICONV_LIBS) ###------------------------------------------------------------------------- # # guis # AC_ARG_WITH(guis, [ --with-guis=list space separated list of GUI implementations (default:all)], [gwenhywfar_guis="$withval"], [gwenhywfar_guis="qt5 gtk3"] ) if test "$gwenhywfar_guis" = "none"; then gwenhywfar_guis="" fi if test "$gwenhywfar_guis" = "yes"; then gwenhywfar_guis="" fi AC_SUBST(gwenhywfar_guis) ###------------------------------------------------------------------------- # Check for fox toolkit # case "$gwenhywfar_guis" in *fox16*) AQ_CHECK_FOX if test "$have_fox" != "yes"; then AC_MSG_ERROR([ **** FOX Toolkit missing. **** If you want to use the FOX-GUI you will have to install the package **** libfox-1.6 and libfox-1.6-devel on Debian-like systems. **** On RPM systems like SuSE those packages might have different names. **** If you don't need the FOX-GUI you might want to use the option **** --with-guis]) fi AC_DEFINE(BUILD_GUI_FOX16, 1, [if gwen gui for fox16 is built]) with_gui_fox16="yes" ;; esac AC_SUBST(with_gui_fox16) AM_CONDITIONAL(WITH_GUI_FOX16, [test "$with_gui_fox16" = "yes"]) ###------------------------------------------------------------------------- # Check for GTK+ # case "$gwenhywfar_guis" in *gtk2*) # We need at least GTK 2.17.5 because we use functions like # gtk_widget_get_sensitive() and gtk_widget_has_focus() pkg_modules="gtk+-2.0 >= 2.17.5" dnl $4=true => don't die in case of failure. PKG_CHECK_MODULES(GTK2, [$pkg_modules], [], true) AC_DEFINE(BUILD_GUI_GTK2, 1, [if gwen gui for gtk2 is built]) with_gui_gtk2="yes" ;; esac AC_SUBST(with_gui_gtk2) AM_CONDITIONAL(WITH_GUI_GTK2, [test "$with_gui_gtk2" = "yes"]) ###------------------------------------------------------------------------- # Check for GTK+ # case "$gwenhywfar_guis" in *gtk3*) # Minimum required gtk3 version pkg_modules="gtk+-3.0 >= 3.10.8" PKG_CHECK_MODULES(GTK3, [$pkg_modules]) AC_DEFINE(BUILD_GUI_GTK3, 1, [if gwen gui for gtk3 is built]) with_gui_gtk3="yes" ;; esac AC_SUBST(with_gui_gtk3) AM_CONDITIONAL(WITH_GUI_GTK3, [test "$with_gui_gtk3" = "yes"]) ###------------------------------------------------------------------------- # # check whether libXML2 code is to be compiled # AC_MSG_CHECKING(libXML2-depending code) AC_ARG_WITH(libxml2-code, [ --with-libxml2-code=yes compile libXML2-depending code], [gwen_with_libxml2_code="$withval"], [gwen_with_libxml2_code="no"]) AC_MSG_RESULT($gwen_with_libxml2_code) AM_CONDITIONAL(WITH_LIBXML2_CODE, [test "$gwen_with_libxml2_code" = "yes"]) ###------------------------------------------------------------------------- # # Check for libxml # if test "$gwen_with_libxml2_code" = "yes"; then AC_DEFINE(GWEN_COMPILE_LIBXML2_CODE, 1, [if libxml2-code is wanted]) PKG_CHECK_MODULES(LIBXML, [libxml-2.0]) fi ###------------------------------------------------------------------------- # # QT4 # UIC4="NO" QT4_BINDIR="" case "$gwenhywfar_guis" in *qt4*) AQ_CHECK_QT4 if test "$have_qt4" = "yes"; then # Define this macro to disable the cast from QString to const char # which implicitly uses latin1()! AC_DEFINE(QT_NO_ASCII_CAST,[1],[Disable the cast from QString to const char.]) fi dnl windows/mingw doesnt have the yes program, so add this emulation AC_CHECK_PROG(YES, yes, yes, [[echo -e 'y\ny\ny\ny\n']]) dnl Store the bin dir for the windows dlls QT4_BINDIR="` echo ${qt4_moc} | ${SED} 's-/moc--' | ${SED} 's-/c/-c:\\\\-' | ${SED} 's-/-\\\\-g' `" UIC4="${qt4_uic}" AC_DEFINE(BUILD_GUI_QT4, 1, [if gwen gui for qt4 is built]) with_gui_qt4="yes" ;; *) ;; esac dnl Store the bin dir for the windows dlls AC_SUBST(QT4_BINDIR) AC_SUBST(with_gui_qt4) AM_CONDITIONAL(WITH_GUI_QT4, [test "$with_gui_qt4" = "yes"]) ###------------------------------------------------------------------------- # # QT5 # case "$gwenhywfar_guis" in *qt5*qt6* | *qt6*qt5*) AC_MSG_ERROR(**** Configuring for Qt5 and Qt6 at the same time is not supported) ;; *qt5* | *qt6*) AX_HAVE_QT ;; esac ###------------------------------------------------------------------------- # # check docpath # AC_MSG_CHECKING(docpath) AC_ARG_WITH(docpath, [ --with-docpath=DIR where to store the apidoc], [docpath="$withval"], [docpath="${HOME}/apidoc"]) AC_SUBST(docpath) AC_MSG_RESULT($docpath) ###------------------------------------------------------------------------- # # search for tag files # AC_MSG_CHECKING(doxygen tag files) DOXYGEN_TAGFILES="" DOXYGEN_TAGFILEPATHS="" if test -d "${docpath}"; then tagfiles="`cd ${docpath} && ls *.tag`" if test -n "${tagfiles}"; then # remove own package from list tagfiles="`echo ${tagfiles} | ${SED} -e s/${PACKAGE}.tag//`" # add every remaining tag file for ff in ${tagfiles}; do DOXYGEN_TAGFILES="${DOXYGEN_TAGFILES} ${docpath}/${ff}=${docpath}/`basename -s .tag ${ff}`" done fi fi if test -z "${DOXYGEN_TAGFILES}"; then AC_MSG_RESULT(none) else AC_MSG_RESULT(found) fi AC_SUBST(DOXYGEN_TAGFILES) ###------------------------------------------------------------------------- # # Search for dlopen # LIBS="" AC_SEARCH_LIBS(dlopen, c dl) if test "$LIBS" = "-lc"; then LIBS="" fi ld_library="$LIBS" LIBS="" all_libraries="$all_libraries $ld_library" ###------------------------------------------------------------------------- # # check for release # AC_MSG_CHECKING(whether this is an official release) AC_ARG_ENABLE(release, [ --enable-release make this an official release (default=no)], [ case "${enableval}" in yes) enable_release="yes";; no) enable_release="no";; *) AC_MSG_ERROR(bad value ${enableval} for --enable-release);; esac ], enable_release="no") if test "$enable_release" = "yes"; then STRIPALL="-s" else STRIPALL="" fi AC_SUBST(STRIPALL) AC_MSG_RESULT($enable_release) ###------------------------------------------------------------------------- # # Compiler check for symbol visibility # AC_CACHE_CHECK([whether compiler supports symbol visibility], ac_cv_hidden_visibility_attribute, [ echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > conftest.c ac_cv_hidden_visibility_attribute=no if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then if grep '\.hidden.*foo' conftest.s >/dev/null; then ac_cv_hidden_visibility_attribute=yes fi fi rm -f conftest.* ]) if test $ac_cv_hidden_visibility_attribute = yes; then AC_DEFINE(GCC_WITH_VISIBILITY_ATTRIBUTE, 1, [visibility]) visibility_cflags="-fvisibility=hidden" visibility_supported="yes" fi AC_SUBST(visibility_cflags) ###------------------------------------------------------------------------- # # check for werror # AC_MSG_CHECKING(if CFLAG -Werror is to be used) AC_ARG_ENABLE(error-on-warning, [ --enable-error-on-warning treat compiler warnings as errors (default=no)], enable_werror="$enableval", enable_werror="no") AC_MSG_RESULT($enable_werror) WERROR="" if test "$enable_werror" != "no"; then WERROR="-Werror" fi AC_SUBST(WERROR) # Debug arguments for compilation ACX_COMPILE_WARN() ###------------------------------------------------------------------------- # # check for MEMTRACE # AC_MSG_CHECKING(if MEMTRACE is wanted) AC_ARG_ENABLE(memtrace, [ --enable-memtrace enable memory trace (default=no)], enable_memtrace="$enableval", enable_memtrace="no") AC_MSG_RESULT($enable_memtrace) if test "$enable_memtrace" != "no"; then #AC_DEFINE(GWEN_MEMTRACE, 1, [if memory trace is wanted]) AC_DEFINE(GWEN_MEMORY_DEBUG, 1, [if memory debugging is wanted]) fi # Debug arguments for compilation ACX_COMPILE_WARN() ###------------------------------------------------------------------------- # # check buffer hard limit # AC_MSG_CHECKING(default buffer hard limit) AC_ARG_WITH(buffer-hardlimit, [ --with-buffer-hardlimit=VALUE new default buffer hard limit], [gwenhywfar_buffer_hardlimit="$withval"], [gwenhywfar_buffer_hardlimit=""]) if test -z "${gwenhywfar_buffer_hardlimit}"; then gwenhywfar_buffer_hardlimit="(16*1024*1024)" fi AC_SUBST(gwenhywfar_buffer_hardlimit) AC_MSG_RESULT($gwenhywfar_buffer_hardlimit) ###------------------------------------------------------------------------- # # compile program flags # PROG_LIBRARIES="${PROG_LIBRARIES} ${ncurses_libs}" # Clean up include variables AS_SCRUB_INCLUDE(gwenhywfar_includes) AS_SCRUB_INCLUDE(all_includes) ###------------------------------------------------------------------------- # # check for doc type # AC_MSG_CHECKING(if full docu should be created) AC_ARG_ENABLE(full-doc, [ --enable-full-doc enable creating full apidoc (default=no)], [ case "${enableval}" in yes) enable_fulldoc="yes";; no) enable_fulldoc="no";; *) AC_MSG_ERROR(bad value ${enableval} for --enable-full-doc);; esac ], enable_fulldoc="no") if test "$enable_fulldoc" = "yes"; then DOXYGEN_INPUT="listdoc.h src gui plugins tools" DOXYGEN_DEFINE="" DOXYGEN_GENERATE_QHP="NO" DOXYGEN_QHG_LOCATION="" DOXYGEN_QHP_NAMESPACE=de.aquamaniac.gwenhywfar-$GWENHYWFAR_VERSION_STRING if which qhelpgenerator >/dev/null ; then DOXYGEN_QHG_LOCATION=$(which qhelpgenerator) DOXYGEN_GENERATE_QHP="YES" USE_DOT=NO elif which qhelpgenerator-qt5 >/dev/null ; then DOXYGEN_QHG_LOCATION=$(which qhelpgenerator-qt5) DOXYGEN_GENERATE_QHP="YES" USE_DOT=NO fi else DOXYGEN_DEFINE="DOXYGEN_HIDE" DOXYGEN_INPUT="listdoc.h gwenhywfar5" fi AC_SUBST(DOXYGEN_GENERATE_QHP) AC_SUBST(DOXYGEN_QHG_LOCATION) AC_SUBST(DOXYGEN_QHP_NAMESPACE) AC_SUBST(DOXYGEN_INPUT) AC_SUBST(DOXYGEN_DEFINE) AC_SUBST(USE_DOT) AC_MSG_RESULT($enable_fulldoc) # Debug arguments for compilation ACX_COMPILE_WARN() ###------------------------------------------------------------------------- # # substitute vars # AC_SUBST(GWEN_OS) AC_SUBST(PROG_LIBRARIES) AC_SUBST(all_includes) AC_SUBST(all_libraries) AC_SUBST(gwenhywfar_crypt_lib) AC_SUBST(gwenhywfar_ldflags) AC_SUBST(gwenhywfar_bindir) AC_SUBST(gwenhywfar_libs) AC_SUBST(gwenhywfar_internal_libname) AC_SUBST(gwenhywfar_libspp) AC_SUBST(gwenhywfar_libsui) AC_SUBST(gwenhywfar_os_lib) AC_SUBST(gwenhywfar_pkgincludedir) AC_SUBST(gwenhywfar_plugindir) AC_SUBST(gwenhywfar_headerdir_am) AC_SUBST(gwenhywfar_headerdir) AC_SUBST(gwenhywfar_symlinkdir) AC_SUBST(gwenhywfar_datadir) ###------------------------------------------------------------------------- # AC_MSG_CHECKING(crypt token plugins) AC_ARG_WITH(plugins-ct, [ --with-plugins-ct=LIST list of CT plugins to build], [plugins="$withval"], [plugins="all"]) if test "$plugins" = "all"; then plugins="ohbci"; fi gwenhywfar_plugins_ct_dirs="" gwenhywfar_plugins_ct_libs="" for plugin in $plugins; do case "$plugin" in ohbci) gwenhywfar_plugins_ct_dirs="$gwenhywfar_plugins_ct_dirs ohbci" gwenhywfar_plugins_ct_libs="$gwenhywfar_plugins_ct_libs ohbci/libct_ohbci.la" AC_DEFINE(GWENHYWFAR_WITH_PLUGIN_CT_OHBCI, 1, [plugin availability]) ;; *) AC_MSG_ERROR("ERROR: Unknown plugin \"$plugin\"") ;; esac done AC_SUBST(gwenhywfar_plugins_ct_dirs) AC_SUBST(gwenhywfar_plugins_ct_libs) AC_MSG_RESULT($plugins) ###------------------------------------------------------------------------- # AC_MSG_CHECKING(DBIO plugins) AC_ARG_WITH(plugins-dbio, [ --with-plugins-dbio=LIST list of DBIO plugins to build], [plugins="$withval"], [plugins="all"]) if test "$plugins" = "all"; then plugins="csv olddb xmldb"; fi gwenhywfar_plugins_dbio_dirs="" gwenhywfar_plugins_dbio_libs="" for plugin in $plugins; do case "$plugin" in csv) gwenhywfar_plugins_dbio_dirs="$gwenhywfar_plugins_dbio_dirs csv" gwenhywfar_plugins_dbio_libs="$gwenhywfar_plugins_dbio_libs csv/libdbio_csv.la" AC_DEFINE(GWENHYWFAR_WITH_PLUGIN_DBIO_CSV, 1, [plugin availability]) ;; olddb) gwenhywfar_plugins_dbio_dirs="$gwenhywfar_plugins_dbio_dirs olddb" gwenhywfar_plugins_dbio_libs="$gwenhywfar_plugins_dbio_libs olddb/libdbio_olddb.la" AC_DEFINE(GWENHYWFAR_WITH_PLUGIN_DBIO_OLDDB, 1, [plugin availability]) ;; xmldb) gwenhywfar_plugins_dbio_dirs="$gwenhywfar_plugins_dbio_dirs xmldb" gwenhywfar_plugins_dbio_libs="$gwenhywfar_plugins_dbio_libs xmldb/libdbio_xmldb.la" AC_DEFINE(GWENHYWFAR_WITH_PLUGIN_DBIO_XMLDB, 1, [plugin availability]) ;; *) AC_MSG_ERROR("ERROR: Unknown plugin \"$plugin\"") ;; esac done AC_SUBST(gwenhywfar_plugins_dbio_dirs) AC_SUBST(gwenhywfar_plugins_dbio_libs) AC_MSG_RESULT($plugins) ###------------------------------------------------------------------------- # AC_MSG_CHECKING(ConfigManager plugins) AC_ARG_WITH(plugins-cfgmgr, [ --with-plugins-cfgmgr=LIST list of ConfigManager plugins to build], [plugins="$withval"], [plugins="all"]) if test "$plugins" = "all"; then plugins="dir"; fi gwenhywfar_plugins_cfgmgr_dirs="" gwenhywfar_plugins_cfgmgr_libs="" for plugin in $plugins; do case "$plugin" in dir) gwenhywfar_plugins_cfgmgr_dirs="$gwenhywfar_plugins_cfgmgr_dirs dir" gwenhywfar_plugins_cfgmgr_libs="$gwenhywfar_plugins_cfgmgr_libs dir/libcfgmgr_dir.la" AC_DEFINE(GWENHYWFAR_WITH_PLUGIN_CFGMGR_DIR, 1, [plugin availability]) ;; *) AC_MSG_ERROR("ERROR: Unknown plugin \"$plugin\"") ;; esac done AC_SUBST(gwenhywfar_plugins_cfgmgr_dirs) AC_SUBST(gwenhywfar_plugins_cfgmgr_libs) AC_MSG_RESULT($plugins) ###------------------------------------------------------------------------- # # list of files to create # AC_CONFIG_FILES([Doxyfile Makefile admin/Makefile m4/Makefile po/Makefile gwenhywfar-config.in gwenhywfar.pc gwenhywfar-config.cmake gwenhywfar-config-version.cmake gwenhywfar.spec gwenhywfar.iss checks/Makefile data/Makefile doc/Makefile doc/dialog/Makefile doc/dialog/images/Makefile doc/inherit/Makefile doc/plugindescr.xsd src/Makefile src/types.h src/ressource.rc src/version.h src/base/Makefile src/crypt3/Makefile src/cryptmsg/Makefile src/crypttoken/Makefile src/gui/Makefile src/sio/Makefile src/html/Makefile src/os/Makefile src/os/posix/Makefile src/os/posix/system.h src/os/windows/Makefile src/os/windows/system.h src/parser/Makefile src/sar/Makefile src/test_framework/Makefile src/xmlcmd/Makefile src/msgio/Makefile plugins/Makefile plugins/dbio/Makefile plugins/dbio/csv/Makefile plugins/dbio/csv/csv.xml plugins/dbio/csv/ressource.rc plugins/dbio/olddb/Makefile plugins/dbio/olddb/olddb.xml plugins/dbio/olddb/ressource.rc plugins/dbio/xmldb/Makefile plugins/dbio/xmldb/xmldb.xml plugins/dbio/xmldb/ressource.rc plugins/ct/Makefile plugins/ct/ohbci/Makefile plugins/ct/ohbci/ohbci.xml plugins/ct/ohbci/ressource.rc plugins/configmgr/Makefile plugins/configmgr/dir/Makefile plugins/configmgr/dir/dir.xml tools/Makefile tools/xmlmerge/Makefile tools/typemaker/Makefile tools/typemaker2/Makefile tools/typemaker2/c/Makefile tools/typemaker2/types/Makefile tools/typemaker2/types/c/Makefile tools/gcttool/Makefile tools/gsa/Makefile tools/gwenbuild/Makefile tools/gwenbuild/parser/Makefile tools/gwenbuild/tools/Makefile tools/gwenbuild/buildctx/Makefile tools/gwenbuild/builders/Makefile tools/gwenbuild/builders/posix/Makefile tools/gwenbuild/builders/windows/Makefile tools/gwenbuild/types/Makefile tools/gwenbuild/templates/Makefile test/Makefile gui/Makefile gui/cpp/Makefile gui/cpp/gwengui-cpp-config.cmake gui/cpp/gwengui-cpp-config-version.cmake gui/qt4/Makefile gui/qt4/gwengui-qt4.pc gui/qt4/gwengui-qt4-config.cmake gui/qt4/gwengui-qt4-config-version.cmake gui/qt5/Makefile gui/qt5/gwengui-qt5.pc gui/qt5/gwengui-qt5-config.cmake gui/qt5/gwengui-qt5-config-version.cmake gui/qt5/gwengui-qt6.pc gui/qt5/gwengui-qt6-config.cmake gui/qt5/gwengui-qt6-config-version.cmake gui/fox16/Makefile gui/fox16/gwengui-fox16.pc gui/gtk2/Makefile gui/gtk2/gwengui-gtk2.pc gui/gtk3/Makefile gui/gtk3/gwengui-gtk3.pc gui/cocoa/Makefile gui/testdialogs/Makefile ]) AC_OUTPUT ###------------------------------------------------------------------------- # # create header directory, make symlinks # HEADER_DIRS="src src/base src/crypt3 src/cryptmsg src/crypttoken src/sio src/os src/os/${GWEN_OS} src/gui src/html" HEADER_DIRS="${HEADER_DIRS} src/parser src/sar src/xmlcmd src/msgio src/test_framework" lprefix="${srcdir}" lprefix=`( cd ${lprefix} ; pwd )` rm -Rf gwenhywfar5 2>/dev/null mkdir -p gwenhywfar5/gwenhywfar for d in ${HEADER_DIRS}; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwenhywfar/${f}" ;; esac done done #ln -s "${lprefix}/src/os/$OS_TYPE/system.h" "gwenhywfar5/gwenhywfar/system.h" 2>/dev/null # cpp # rm -Rf gwenhywfar5/gwen-gui-cpp 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-cpp for d in gui/cpp; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-cpp/${f}" ;; esac done done # qt4 # rm -Rf gwenhywfar5/gwen-gui-qt4 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-qt4 for d in gui/qt4; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp | qt4_gui_*.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-qt4/${f}" ;; esac done done # qt5 # rm -Rf gwenhywfar5/gwen-gui-qt5 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-qt5 for d in gui/qt5; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp | qt5_gui_*.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-qt5/${f}" ;; esac done done # fox16 # rm -Rf gwenhywfar5/gwen-gui-fox16 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-fox16 for d in gui/fox16; do hfiles=`( cd "${srcdir}/${d}" && ls *.hpp *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.hpp | *_p.hpp | fox16_gui_*.hpp) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-fox16/${f}" ;; esac done done # gtk2 # rm -Rf gwenhywfar5/gwen-gui-gtk2 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-gtk2 for d in gui/gtk2; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h | gtk2_gui_*.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-gtk2/${f}" ;; esac done done # gtk3 # rm -Rf gwenhywfar5/gwen-gui-gtk3 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-gtk3 for d in gui/gtk3; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h | gtk3_gui_*.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-gtk3/${f}" ;; esac done done # cocoa # rm -Rf gwenhywfar5/gwen-gui-cocoa 2>/dev/null mkdir -p gwenhywfar5/gwen-gui-cocoa for d in gui/cocoa; do hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )` for f in ${hfiles}; do case ${f} in *_l.h | *_p.h | gtk2_gui_*.h) ;; *) ln -s "${lprefix}/${d}/${f}" "gwenhywfar5/gwen-gui-cocoa/${f}" ;; esac done done ###------------------------------------------------------------------------- # # summary # echo echo "Summary" echo "=============================================" echo "Version : $GWENHYWFAR_VERSION_FULL_STRING" echo "System : $OSYSTEM" echo "Installation Folder : $prefix" echo "Local Installation Mode : $enable_local_install" echo "Plugin Installation Folder : $gwenhywfar_plugindir" echo "Plugin Search Folder : $gwenhywfar_plugin_searchdir" echo "Data Search Folder : $gwenhywfar_data_searchdir" echo "Locale Search Folder : $gwenhywfar_locale_searchdir" echo "Config Search Folder : $gwenhywfar_cfg_searchdir" echo "Buffer Default Hard Limit : $gwenhywfar_buffer_hardlimit" echo "Symbol Visibility : $visibility_supported" echo "OpenSSL Support for gct-tool : $ssl_available" echo "GUI Support : $gwenhywfar_guis" echo "Use system-wide certificates : $enable_system_certs" echo "Compiling test code enabled : $enable_testcode" echo "Compile LibXML2 code : $gwen_with_libxml2_code" echo echo "Plugins" echo "=============================================" echo " Crypt token plugins :$gwenhywfar_plugins_ct_dirs" echo " DBIO plugins :$gwenhywfar_plugins_dbio_dirs" echo " ConfigManager plugins :$gwenhywfar_plugins_cfgmgr_dirs" echo echo "You can now use the command 'make' (or on *BSD 'gmake') to " echo "build Gwenhywfar." echo gwenhywfar-5.12.1/tools/0000755000175000017500000000000015032533715012126 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/0000755000175000017500000000000015032533715014106 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/types/0000755000175000017500000000000015032533715015252 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/types/file.h0000664000175000017500000000707214144206313016264 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_FILE_H #define GWBUILD_FILE_H #include #include #include typedef struct GWB_FILE GWB_FILE; GWEN_LIST2_FUNCTION_DEFS(GWB_FILE, GWB_File) #define GWB_FILE_FLAGS_DIST 0x0001 #define GWB_FILE_FLAGS_INSTALL 0x0002 #define GWB_FILE_FLAGS_GENERATED 0x0004 #include "gwenbuild/types/context.h" #include "gwenbuild/buildctx/buildcmd.h" #include GWB_FILE *GWB_File_new(const char *folder, const char *fName, uint32_t id); GWB_FILE *GWB_File_dup(const GWB_FILE *oldFile); void GWB_File_free(GWB_FILE *f); uint32_t GWB_File_GetId(const GWB_FILE *f); void GWB_File_SetId(GWB_FILE *f, uint32_t i); uint32_t GWB_File_GetFlags(const GWB_FILE *f); void GWB_File_SetFlags(GWB_FILE *f, uint32_t i); void GWB_File_AddFlags(GWB_FILE *f, uint32_t i); void GWB_File_DelFlags(GWB_FILE *f, uint32_t i); const char *GWB_File_GetFolder(const GWB_FILE *f); void GWB_File_SetFolder(GWB_FILE *f, const char *s); const char *GWB_File_GetName(const GWB_FILE *f); void GWB_File_SetName(GWB_FILE *f, const char *s); const char *GWB_File_GetInstallName(const GWB_FILE *f); void GWB_File_SetInstallName(GWB_FILE *f, const char *s); const char *GWB_File_GetExt(const GWB_FILE *f); const char *GWB_File_GetBuilder(const GWB_FILE *f); void GWB_File_SetBuilder(GWB_FILE *f, const char *s); const char *GWB_File_GetInstallPath(const GWB_FILE *f); void GWB_File_SetInstallPath(GWB_FILE *f, const char *s); const char *GWB_File_GetFileType(const GWB_FILE *f); void GWB_File_SetFileType(GWB_FILE *f, const char *s); void GWB_File_toXml(const GWB_FILE *file, GWEN_XMLNODE *xmlNode); GWB_FILE *GWB_File_fromXml(GWEN_XMLNODE *xmlNode); GWB_BUILD_CMD_LIST2 *GWB_File_GetWaitingBuildCmdList2(const GWB_FILE *f); void GWB_File_AddWaitingBuildCmd(GWB_FILE *f, GWB_BUILD_CMD *bcmd); void GWB_File_ClearWaitingBuildCmds(GWB_FILE *file); GWB_BUILD_CMD *GWB_File_GetBuildCmd(const GWB_FILE *f); void GWB_File_SetBuildCmd(GWB_FILE *f, GWB_BUILD_CMD *bcmd); void GWB_File_List2_FreeAll(GWB_FILE_LIST2 *fileList2); GWB_FILE *GWB_File_List2_GetFileByPathAndName(const GWB_FILE_LIST2 *fileList, const char *folder, const char *fname); GWB_FILE *GWB_File_List2_GetFileById(const GWB_FILE_LIST2 *fileList, uint32_t id); GWB_FILE *GWB_File_List2_GetOrCreateFile(GWB_FILE_LIST2 *fileList, const char *folder, const char *fname); GWB_FILE *GWB_File_List2_GetAt(const GWB_FILE_LIST2 *fileList, int index); void GWB_File_List2_WriteXml(const GWB_FILE_LIST2 *fileList, GWEN_XMLNODE *xmlNode, const char *groupName); void GWB_File_List2_ReadXml(GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *destFileList); void GWB_File_ReplaceExtension(GWB_FILE *file, const char *newExt); GWB_FILE *GWB_File_CopyObjectAndChangeExtension(const GWB_FILE *file, const char *newExt); void GWB_File_AddFileList2ToFileList2(GWB_FILE_LIST2 *sourceList, GWB_FILE_LIST2 *destList, const char *ext); void GWB_File_WriteFileNameToTopBuildDirString(const GWB_FILE *file, const char *initialSourceDir, GWEN_BUFFER *fbuf); GWEN_STRINGLIST *GWB_File_FileListToTopBuildDirStringList(const GWB_FILE_LIST2 *fileList, const char *initialSourceDir); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/builder.c0000664000175000017500000002170314460564441016775 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/builder_p.h" #include #include #include GWEN_LIST2_FUNCTIONS(GWB_BUILDER, GWB_Builder) GWEN_INHERIT_FUNCTIONS(GWB_BUILDER) GWB_BUILDER *GWB_Builder_new(GWENBUILD *gwenbuild, GWB_CONTEXT *context, const char *typeName) { GWB_BUILDER *builder; GWEN_NEW_OBJECT(GWB_BUILDER, builder); GWEN_INHERIT_INIT(GWB_BUILDER, builder); builder->gwenbuild=gwenbuild; builder->context=context; if (typeName) builder->typeName=strdup(typeName); return builder; } void GWB_Builder_free(GWB_BUILDER *builder) { if (builder) { GWEN_INHERIT_FINI(GWB_BUILDER, builder); free(builder->targetLinkSpec); free(builder->typeName); GWB_File_List2_free(builder->inputFileList2); GWB_File_List2_free(builder->outputFileList2); } } GWENBUILD *GWB_Builder_GetGwenbuild(const GWB_BUILDER *builder) { return builder->gwenbuild; } uint32_t GWB_Builder_GetId(const GWB_BUILDER *builder) { return builder->id; } const char *GWB_Builder_GetTypeName(const GWB_BUILDER *builder) { return builder->typeName; } const char *GWB_Builder_GetTargetLinkSpec(const GWB_BUILDER *builder) { return builder->targetLinkSpec; } void GWB_Builder_SetTargetLinkSpec(GWB_BUILDER *builder, const char *s) { free(builder->targetLinkSpec); builder->targetLinkSpec=s?strdup(s):NULL; } GWB_CONTEXT *GWB_Builder_GetContext(const GWB_BUILDER *builder) { return builder->context; } GWB_FILE_LIST2 *GWB_Builder_GetInputFileList2(const GWB_BUILDER *builder) { return builder->inputFileList2; } void GWB_Builder_AddInputFile(GWB_BUILDER *builder, GWB_FILE *f) { if (builder->inputFileList2==NULL) builder->inputFileList2=GWB_File_List2_new(); GWB_File_List2_PushBack(builder->inputFileList2, f); } GWB_FILE_LIST2 *GWB_Builder_GetOutputFileList2(const GWB_BUILDER *builder) { return builder->outputFileList2; } void GWB_Builder_AddOutputFile(GWB_BUILDER *builder, GWB_FILE *f) { if (builder->outputFileList2==NULL) builder->outputFileList2=GWB_File_List2_new(); GWB_File_List2_PushBack(builder->outputFileList2, f); } int GWB_Builder_GetNumBlockingInputFiles(const GWB_BUILDER *builder) { return builder->numBlockingInputFiles; } int GWB_Builder_IncNumBlockingInputFiles(GWB_BUILDER *builder) { builder->numBlockingInputFiles++; return builder->numBlockingInputFiles; } int GWB_Builder_DecNumBlockingInputFiles(GWB_BUILDER *builder) { if (builder->numBlockingInputFiles>0) builder->numBlockingInputFiles--; return builder->numBlockingInputFiles; } int GWB_Builder_IsAcceptableInput(GWB_BUILDER *builder, const GWB_FILE *file) { if (builder->isAcceptableInputFn) return builder->isAcceptableInputFn(builder, file); else return GWEN_ERROR_NOT_IMPLEMENTED; } int GWB_Builder_AddBuildCmd(GWB_BUILDER *builder, GWB_BUILD_CONTEXT *bctx) { if (builder->addBuildCmdFn) return builder->addBuildCmdFn(builder, bctx); else return GWEN_ERROR_NOT_IMPLEMENTED; } void GWB_Builder_AddSourceFile(GWB_BUILDER *builder, GWB_FILE *f) { if (builder->addSourceFileFn) return builder->addSourceFileFn(builder, f); } GWEN_BUILDER_ISACCEPTABLEINPUT_FN GWB_Builder_SetIsAcceptableInputFn(GWB_BUILDER *builder, GWEN_BUILDER_ISACCEPTABLEINPUT_FN fn) { GWEN_BUILDER_ISACCEPTABLEINPUT_FN oldFn; oldFn=builder->isAcceptableInputFn; builder->isAcceptableInputFn=fn; return oldFn; } GWEN_BUILDER_ADDBUILDCMD_FN GWB_Builder_SetAddBuildCmdFn(GWB_BUILDER *builder, GWEN_BUILDER_ADDBUILDCMD_FN fn) { GWEN_BUILDER_ADDBUILDCMD_FN oldFn; oldFn=builder->addBuildCmdFn; builder->addBuildCmdFn=fn; return oldFn; } GWB_BUILDER_ADDSOURCEFILE_FN GWB_Builder_SetAddSourceFileFn(GWB_BUILDER *builder, GWB_BUILDER_ADDSOURCEFILE_FN fn) { GWB_BUILDER_ADDSOURCEFILE_FN oldFn; oldFn=builder->addSourceFileFn; builder->addSourceFileFn=fn; return oldFn; } void GWB_Builder_AddFileNamesToBuffer(const GWB_CONTEXT *context, const GWB_FILE_LIST2 *inFileList, GWEN_BUFFER *argBuffer) { GWB_FILE_LIST2_ITERATOR *it; int entriesAdded=0; it=GWB_File_List2_First(inFileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { if (entriesAdded) GWEN_Buffer_AppendString(argBuffer, " "); GWB_Builder_AddFileNameToBuffer(context, file, argBuffer); entriesAdded++; file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void GWB_Builder_AddFileNameToBuffer(const GWB_CONTEXT *context, const GWB_FILE *file, GWEN_BUFFER *argBuffer) { const char *folder; const char *buildDir; const char *initialSourceDir; GWEN_BUFFER *realFileFolderBuffer; GWEN_BUFFER *relBuffer; buildDir=GWB_Context_GetCurrentBuildDir(context); initialSourceDir=GWB_Context_GetInitialSourceDir(context); folder=GWB_File_GetFolder(file); realFileFolderBuffer=GWEN_Buffer_new(0, 256, 0, 1); if (!(GWB_File_GetFlags(file) & GWB_FILE_FLAGS_GENERATED)) { GWEN_Buffer_AppendString(realFileFolderBuffer, initialSourceDir); GWEN_Buffer_AppendString(realFileFolderBuffer, GWEN_DIR_SEPARATOR_S); } if (folder && *folder) GWEN_Buffer_AppendString(realFileFolderBuffer, folder); relBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Path_GetPathBetween(buildDir, GWEN_Buffer_GetStart(realFileFolderBuffer), relBuffer); if (GWEN_Buffer_GetUsedBytes(relBuffer)) GWEN_Buffer_AppendString(relBuffer, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(relBuffer, GWB_File_GetName(file)); GWEN_Buffer_AppendString(argBuffer, GWEN_Buffer_GetStart(relBuffer)); GWEN_Buffer_free(relBuffer); GWEN_Buffer_free(realFileFolderBuffer); } void GWB_Builder_AddRelativeFolderToBuffer(const GWB_CONTEXT *context, const char *folder, int useBuildDir, GWEN_BUFFER *argBuffer) { const char *buildDir; const char *initialSourceDir; GWEN_BUFFER *realFileFolderBuffer; GWEN_BUFFER *relBuffer; buildDir=GWB_Context_GetCurrentBuildDir(context); initialSourceDir=GWB_Context_GetInitialSourceDir(context); realFileFolderBuffer=GWEN_Buffer_new(0, 256, 0, 1); if (!useBuildDir) { GWEN_Buffer_AppendString(realFileFolderBuffer, initialSourceDir); GWEN_Buffer_AppendString(realFileFolderBuffer, GWEN_DIR_SEPARATOR_S); } if (folder) GWEN_Buffer_AppendString(realFileFolderBuffer, folder); relBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Path_GetPathBetween(buildDir, GWEN_Buffer_GetStart(realFileFolderBuffer), relBuffer); #if 0 DBG_ERROR(NULL, "Paths: [%s]->[%s]: [%s]", buildDir, GWEN_Buffer_GetStart(realFileFolderBuffer), GWEN_Buffer_GetStart(relBuffer)); #endif if (GWEN_Buffer_GetUsedBytes(relBuffer)>0) GWEN_Buffer_AppendString(argBuffer, GWEN_Buffer_GetStart(relBuffer)); else GWEN_Buffer_AppendString(argBuffer, "."); GWEN_Buffer_free(relBuffer); GWEN_Buffer_free(realFileFolderBuffer); } void GWB_Builder_AddAbsFileNameToBuffer(const GWB_CONTEXT *context, const GWB_FILE *file, GWEN_BUFFER *argBuffer) { const char *folder; const char *initialSourceDir; GWEN_BUFFER *realFileFolderBuffer; GWEN_BUFFER *absBuffer; initialSourceDir=GWB_Context_GetInitialSourceDir(context); folder=GWB_File_GetFolder(file); realFileFolderBuffer=GWEN_Buffer_new(0, 256, 0, 1); if (!(GWB_File_GetFlags(file) & GWB_FILE_FLAGS_GENERATED)) { GWEN_Buffer_AppendString(realFileFolderBuffer, initialSourceDir); GWEN_Buffer_AppendString(realFileFolderBuffer, GWEN_DIR_SEPARATOR_S); } if (folder && *folder) GWEN_Buffer_AppendString(realFileFolderBuffer, folder); absBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Directory_GetAbsoluteFolderPath(GWEN_Buffer_GetStart(realFileFolderBuffer), absBuffer); if (GWEN_Buffer_GetUsedBytes(absBuffer)) GWEN_Buffer_AppendString(absBuffer, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(absBuffer, GWB_File_GetName(file)); GWEN_Buffer_AppendString(argBuffer, GWEN_Buffer_GetStart(absBuffer)); GWEN_Buffer_free(absBuffer); GWEN_Buffer_free(realFileFolderBuffer); } void GWB_Builder_Dump(const GWB_BUILDER *builder, int indent, int fullDump) { int i; for(i=0; itypeName, indent+2); GWBUILD_Debug_PrintFileList2("inputFileList2.", builder->inputFileList2, indent+2); GWBUILD_Debug_PrintFileList2("outputFileList2", builder->outputFileList2, indent+2); if (fullDump) GWB_Context_Dump(builder->context, indent+2); } gwenhywfar-5.12.1/tools/gwenbuild/types/target_p.h0000664000175000017500000000201414144206313017141 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_TARGET_P_H #define GWBUILD_TARGET_P_H #include "gwenbuild/types/target.h" struct GWB_TARGET { char *id; char *name; char *installName; GWBUILD_TARGETTYPE targetType; int soVersionCurrent; int soVersionAge; int soVersionRevision; GWB_CONTEXT *context; GWB_FILE_LIST2 *sourceFileList; GWEN_STRINGLIST *usedTargetNameList; GWEN_STRINGLIST *usedLibraryList; /* LDFLAGS */ GWEN_STRINGLIST *usedTargetLinkSpecList; GWB_BUILDER *builder; GWB_FILE *outputFile; GWB_PROJECT *project; char *installPath; GWB_BUILD_CMD_LIST *explicitBuildList; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/gwenbuild.h0000664000175000017500000001004714460564441017333 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_GWENBUILD_H #define GWBUILD_GWENBUILD_H /** main object of gwenbuild */ typedef struct GWENBUILD GWENBUILD; typedef enum { GWBUILD_TargetType_Invalid=-1, GWBUILD_TargetType_None=0, GWBUILD_TargetType_InstallLibrary, GWBUILD_TargetType_ConvenienceLibrary, GWBUILD_TargetType_Program, GWBUILD_TargetType_CxxProgram, GWBUILD_TargetType_Objects, GWBUILD_TargetType_Module, GWBUILD_TargetType_I18nCatalog, GWBUILD_TargetType_AvrHexFile, } GWBUILD_TARGETTYPE; #define GWENBUILD_FLAGS_STATIC 0x0001 #include "gwenbuild/types/keyvaluepair.h" #include "gwenbuild/types/file.h" #include "gwenbuild/types/target.h" #include "gwenbuild/types/project.h" #include "gwenbuild/buildctx/buildctx.h" #include "gwenbuild/types/option.h" #include "gwenbuild/builders/gbuilderdescr.h" #include #include #include #include #include GWENBUILD *GWBUILD_new(void); void GWBUILD_free(GWENBUILD *gwenbuild); uint32_t GWBUILD_GetFlags(const GWENBUILD *gwenbuild); void GWBUILD_SetFlags(GWENBUILD *gwenbuild, uint32_t f); void GWBUILD_AddFlags(GWENBUILD *gwenbuild, uint32_t f); void GWBUILD_DelFlags(GWENBUILD *gwenbuild, uint32_t f); const char *GWBUILD_GetTargetSystem(const GWENBUILD *gwenbuild); void GWBUILD_SetTargetSystem(GWENBUILD *gwenbuild, const char *s); int GWBUILD_GetTargetIsWindows(const GWENBUILD *gwenbuild); void GWBUILD_SetTargetIsWindows(GWENBUILD *gwenbuild, int i); int GWBUILD_MakeBuildersForTargets(GWB_PROJECT *project); GWB_BUILD_CONTEXT *GWBUILD_MakeBuildCommands(GWB_PROJECT *project); GWEN_STRINGLIST *GWBUILD_GetBuildFilenameList(const GWENBUILD *gwenbuild); void GWBUILD_AddBuildFilename(GWENBUILD *gwenbuild, const char *s); const char *GWBUILD_GetHostArch(void); const char *GWBUILD_GetHostSystem(void); const char *GWBUILD_GetArchFromTriplet(const char *sTriplet); const char *GWBUILD_GetSystemFromTriplet(const char *sTriplet); GWEN_STRINGLIST *GWBUILD_GetPathFromEnvironment(void); void GWBUILD_AddFilesFromStringList(GWB_FILE_LIST2 *mainFileList, const char *sFolder, const GWEN_STRINGLIST *fileNameList, GWB_FILE_LIST2 *outFileList, uint32_t flagsToAdd, int copyFileForOutList); GWBUILD_TARGETTYPE GWBUILD_TargetType_fromString(const char *s); const char *GWBUILD_TargetType_toString(GWBUILD_TARGETTYPE tt); time_t GWBUILD_GetModificationTimeOfFile(const char *filename); void GWBUILD_Debug_PrintValue(const char *sName, const char *sValue, int indent); void GWBUILD_Debug_PrintIntValue(const char *sName, int value, int indent); void GWBUILD_Debug_PrintKvpList(const char *sName, const GWB_KEYVALUEPAIR_LIST *kvpList, int indent); void GWBUILD_Debug_PrintDb(const char *sName, GWEN_DB_NODE *db, int indent); void GWBUILD_Debug_PrintFileList2(const char *sName, const GWB_FILE_LIST2 *fileList2, int indent); void GWBUILD_Debug_PrintTargetList2(const char *sName, const GWB_TARGET_LIST2 *targetList2, int indent, int fullDump); void GWBUILD_Debug_PrintBuilderList2(const char *sName, const GWB_BUILDER_LIST2 *builderList2, int indent, int fullDump); void GWBUILD_Debug_PrintBuildCmdList2(const char *sName, const GWB_BUILD_CMD_LIST2 *buildCmdList2, int indent); void GWBUILD_Debug_PrintStringList(const char *sName, const GWEN_STRINGLIST *sl, int indent); void GWBUILD_Debug_PrintFile(const char *sName, const GWB_FILE *file, int indent); void GWBUILD_Debug_PrintOptionList(const char *sName, const GWB_OPTION_LIST *optionList, int indent); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/gwenbuild_p.h0000664000175000017500000000131014116666046017645 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_GWENBUILD_P_H #define GWBUILD_GWENBUILD_P_H #include "gwenbuild/types/gwenbuild.h" struct GWENBUILD { GWEN_STRINGLIST *buildFilenameList; char *targetSystem; int targetIsWindows; GWB_GBUILDER_DESCR_LIST *builderDescrList; uint32_t flags; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/file_p.h0000664000175000017500000000137014144206313016576 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_FILE_P_H #define GWBUILD_FILE_P_H #include "gwenbuild/types/file.h" struct GWB_FILE { char *folder; char *name; char *fileType; char *installPath; char *installName; char *builder; uint32_t id; uint32_t flags; GWB_BUILD_CMD_LIST2 *waitingBuildCmdList2; GWB_BUILD_CMD *buildCmd; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/keyvaluepair.c0000664000175000017500000001326014116666046020051 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/keyvaluepair_p.h" #include #include #include GWEN_LIST_FUNCTIONS(GWB_KEYVALUEPAIR, GWB_KeyValuePair) static GWB_KEYVALUEPAIR *_getByKey(GWB_KEYVALUEPAIR *kvp, const char *key); GWB_KEYVALUEPAIR *GWB_KeyValuePair_new(const char *key, const char *value) { GWB_KEYVALUEPAIR *kvp; GWEN_NEW_OBJECT(GWB_KEYVALUEPAIR, kvp); GWEN_LIST_INIT(GWB_KEYVALUEPAIR, kvp); if (key) GWB_KeyValuePair_SetKey(kvp, key); if (value) GWB_KeyValuePair_SetValue(kvp, value); return kvp; } GWB_KEYVALUEPAIR *GWB_KeyValuePair_dup(const GWB_KEYVALUEPAIR *originalKvp) { GWB_KEYVALUEPAIR *kvp; GWEN_NEW_OBJECT(GWB_KEYVALUEPAIR, kvp); GWEN_LIST_INIT(GWB_KEYVALUEPAIR, kvp); if (originalKvp->key) GWB_KeyValuePair_SetKey(kvp, originalKvp->key); if (originalKvp->value) GWB_KeyValuePair_SetValue(kvp, originalKvp->value); return kvp; } void GWB_KeyValuePair_free(GWB_KEYVALUEPAIR *kvp) { if (kvp) { free(kvp->value); free(kvp->key); GWEN_FREE_OBJECT(kvp); } } const char *GWB_KeyValuePair_GetKey(const GWB_KEYVALUEPAIR *kvp) { return kvp->key; } void GWB_KeyValuePair_SetKey(GWB_KEYVALUEPAIR *kvp, const char *s) { free(kvp->key); if (s) kvp->key=strdup(s); else kvp->key=NULL; } const char *GWB_KeyValuePair_GetValue(const GWB_KEYVALUEPAIR *kvp) { return kvp->value; } void GWB_KeyValuePair_SetValue(GWB_KEYVALUEPAIR *kvp, const char *s) { free(kvp->value); if (s) kvp->value=strdup(s); else kvp->value=NULL; } GWB_KEYVALUEPAIR_LIST *GWB_KeyValuePair_List_dup(const GWB_KEYVALUEPAIR_LIST *oldKvpList) { GWB_KEYVALUEPAIR_LIST *kvpList; GWB_KEYVALUEPAIR *kvp; kvpList=GWB_KeyValuePair_List_new(); kvp=GWB_KeyValuePair_List_First(oldKvpList); while(kvp) { GWB_KeyValuePair_List_Add(GWB_KeyValuePair_dup(kvp), kvpList); kvp=GWB_KeyValuePair_List_Next(kvp); } return kvpList; } const char *GWB_KeyValuePair_List_GetValue(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key) { GWB_KEYVALUEPAIR *kvp; kvp=GWB_KeyValuePair_List_GetFirstByKey(kvpList, key); if (kvp==NULL) return NULL; return kvp->value; } GWB_KEYVALUEPAIR *GWB_KeyValuePair_List_GetFirstByKey(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key) { return _getByKey(GWB_KeyValuePair_List_First(kvpList), key); } GWB_KEYVALUEPAIR *GWB_KeyValuePair_List_GetNextByKey(const GWB_KEYVALUEPAIR *kvp, const char *key) { if (kvp) return _getByKey(GWB_KeyValuePair_List_Next(kvp), key); return NULL; } GWB_KEYVALUEPAIR *_getByKey(GWB_KEYVALUEPAIR *kvp, const char *key) { while(kvp) { if (kvp->key && strcmp(kvp->key, key)==0) return kvp; kvp=GWB_KeyValuePair_List_Next(kvp); } return NULL; } int GWB_KeyValuePair_List_SampleValuesByKey(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key, const char *prefix, const char *delim, GWEN_BUFFER *destBuf) { const GWB_KEYVALUEPAIR *kvp; int entriesAdded=0; kvp=GWB_KeyValuePair_List_GetFirstByKey(kvpList, key); while(kvp) { if (kvp->value && *(kvp->value)) { if (entriesAdded && delim) GWEN_Buffer_AppendString(destBuf, delim); if (prefix) GWEN_Buffer_AppendString(destBuf, prefix); GWEN_Buffer_AppendString(destBuf, kvp->value); entriesAdded++; } kvp=GWB_KeyValuePair_List_GetNextByKey(kvp, key); } return entriesAdded; } int GWB_KeyValuePair_List_WriteAllPairsToBuffer(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *prefix, const char *assignmentString, const char *delim, GWEN_BUFFER *destBuf) { const GWB_KEYVALUEPAIR *kvp; int entriesAdded=0; kvp=GWB_KeyValuePair_List_First(kvpList); while(kvp) { if (kvp->key && *(kvp->key)) { if (entriesAdded && delim) GWEN_Buffer_AppendString(destBuf, delim); if (prefix) GWEN_Buffer_AppendString(destBuf, prefix); GWEN_Buffer_AppendString(destBuf, kvp->key); if (kvp->value && *(kvp->value)) { if (assignmentString) GWEN_Buffer_AppendString(destBuf, assignmentString); GWEN_Buffer_AppendString(destBuf, kvp->value); } entriesAdded++; } kvp=GWB_KeyValuePair_List_Next(kvp); } return entriesAdded; } void GWB_KeyValuePair_toXml(const GWB_KEYVALUEPAIR *kvp, GWEN_XMLNODE *xmlNode) { if (kvp->key) GWEN_XMLNode_SetCharValue(xmlNode, "key", kvp->key); if (kvp->value) GWEN_XMLNode_SetCharValue(xmlNode, "value", kvp->value); } void GWB_KeyValuePair_List_WriteXml(const GWB_KEYVALUEPAIR_LIST *kvpList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_KEYVALUEPAIR *kvp; kvp=GWB_KeyValuePair_List_First(kvpList); while(kvp) { GWEN_XMLNODE *entryNode; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWB_KeyValuePair_toXml(kvp, entryNode); GWEN_XMLNode_AddChild(xmlNode, entryNode); kvp=GWB_KeyValuePair_List_Next(kvp); } } gwenhywfar-5.12.1/tools/gwenbuild/types/context.h0000664000175000017500000000732714116666046017050 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_CONTEXT_H #define GWBUILD_CONTEXT_H #include typedef struct GWB_CONTEXT GWB_CONTEXT; GWEN_TREE2_FUNCTION_DEFS(GWB_CONTEXT, GWB_Context) #include "gwenbuild/types/keyvaluepair.h" #include "gwenbuild/types/file.h" #include "gwenbuild/types/target.h" #include "gwenbuild/types/gwenbuild.h" #include #include #include GWB_CONTEXT *GWB_Context_new(GWENBUILD *gwenbuild); GWB_CONTEXT *GWB_Context_dup(const GWB_CONTEXT *originalCtx); void GWB_Context_free(GWB_CONTEXT *ctx); void GWB_Context_toXml(const GWB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, int withDb); GWENBUILD *GWB_Context_GetGwenbuild(const GWB_CONTEXT *ctx); const char *GWB_Context_GetCurrentRelativeDir(const GWB_CONTEXT *ctx); void GWB_Context_SetCurrentRelativeDir(GWB_CONTEXT *ctx, const char *s); void GWB_Context_AddCurrentRelativeDir(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetInitialSourceDir(const GWB_CONTEXT *ctx); void GWB_Context_SetInitialSourceDir(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetTopBuildDir(const GWB_CONTEXT *ctx); void GWB_Context_SetTopBuildDir(GWB_CONTEXT *ctx, const char *s); void GWB_Context_InsertTopBuildDir(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetTopSourceDir(const GWB_CONTEXT *ctx); void GWB_Context_SetTopSourceDir(GWB_CONTEXT *ctx, const char *s); void GWB_Context_InsertTopSourceDir(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetCurrentBuildDir(const GWB_CONTEXT *ctx); void GWB_Context_SetCurrentBuildDir(GWB_CONTEXT *ctx, const char *s); void GWB_Context_AddCurrentBuildDir(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetCurrentSourceDir(const GWB_CONTEXT *ctx); void GWB_Context_SetCurrentSourceDir(GWB_CONTEXT *ctx, const char *s); void GWB_Context_AddCurrentSourceDir(GWB_CONTEXT *ctx, const char *s); void GWB_Context_InsertCurrentSourceDir(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetCompilerFlags(const GWB_CONTEXT *ctx); void GWB_Context_SetCompilerFlags(GWB_CONTEXT *ctx, const char *s); void GWB_Context_AddCompilerFlags(GWB_CONTEXT *ctx, const char *s); const char *GWB_Context_GetLinkerFlags(const GWB_CONTEXT *ctx); void GWB_Context_SetLinkerFlags(GWB_CONTEXT *ctx, const char *s); void GWB_Context_AddLinkerFlags(GWB_CONTEXT *ctx, const char *s); GWB_KEYVALUEPAIR_LIST *GWB_Context_GetIncludeList(const GWB_CONTEXT *ctx); void GWB_Context_AddInclude(GWB_CONTEXT *ctx, const char *genType, const char *incl); void GWB_Context_ClearIncludeList(GWB_CONTEXT *ctx); GWB_KEYVALUEPAIR_LIST *GWB_Context_GetDefineList(const GWB_CONTEXT *ctx); void GWB_Context_SetDefine(GWB_CONTEXT *ctx, const char *name, const char *value); void GWB_Context_ClearDefineList(GWB_CONTEXT *ctx); GWEN_DB_NODE *GWB_Context_GetVars(const GWB_CONTEXT *ctx); GWB_TARGET *GWB_Context_GetCurrentTarget(const GWB_CONTEXT *ctx); /** doesn't take over target */ void GWB_Context_SetCurrentTarget(GWB_CONTEXT *ctx, GWB_TARGET *target); GWB_FILE_LIST2 *GWB_Context_GetSourceFileList2(const GWB_CONTEXT *ctx); void GWB_Context_AddSourceFile(GWB_CONTEXT *ctx, GWB_FILE *f); void GWB_Context_ClearSourceFileList2(GWB_CONTEXT *ctx); void GWB_Context_Dump(const GWB_CONTEXT *ctx, int indent); void GWB_Context_Tree2_Dump(const GWB_CONTEXT *ctx, int indent); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/option_p.h0000664000175000017500000000133114116666046017200 00000000000000/*************************************************************************** begin : Fri Apr 02 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_OPTION_P_H #define GWBUILD_OPTION_P_H #include "gwenbuild/types/option.h" struct GWB_OPTION { GWEN_LIST_ELEMENT(GWB_OPTION) char *id; int optionType; char *defaultValue; char *definePrefix; GWB_KEYVALUEPAIR_LIST *aliasList; GWEN_STRINGLIST *choiceList; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/project.h0000664000175000017500000000776314125675316017036 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PROJECT_H #define GWBUILD_PROJECT_H typedef struct GWB_PROJECT GWB_PROJECT; #include "gwenbuild/types/gwenbuild.h" #include "gwenbuild/types/context.h" #include "gwenbuild/types/file.h" #include "gwenbuild/types/builder.h" #include "gwenbuild/types/target.h" #include "gwenbuild/types/option.h" #include "gwenbuild/buildctx/buildcmd.h" #define GWB_PROJECT_FLAGS_SHARED 0x0001 #define GWB_PROJECT_FLAGS_CONFIG_H 0x0002 GWB_PROJECT *GWB_Project_new(GWENBUILD *gwbuild, GWB_CONTEXT *ctx); void GWB_Project_free(GWB_PROJECT *project); GWENBUILD *GWB_Project_GetGwbuild(const GWB_PROJECT *project); GWB_CONTEXT *GWB_Project_GetRootContext(const GWB_PROJECT *project); const char *GWB_Project_GetProjectName(const GWB_PROJECT *project); void GWB_Project_SetProjectName(GWB_PROJECT *project, const char *s); void GWB_Project_SetVersion(GWB_PROJECT *project, int vMajor, int vMinor, int vPatchlevel, int vBuild, const char *vTag); int GWB_Project_GetVersionMajor(const GWB_PROJECT *project); int GWB_Project_GetVersionMinor(const GWB_PROJECT *project); int GWB_Project_GetVersionPatchlevel(const GWB_PROJECT *project); int GWB_Project_GetVersionBuild(const GWB_PROJECT *project); const char *GWB_Project_GetVersionTag(const GWB_PROJECT *project); void GWB_Project_SetSoVersion(GWB_PROJECT *project, int vCurrent, int vAge, int vRevision); int GWB_Project_GetSoVersionCurrent(const GWB_PROJECT *project); int GWB_Project_GetSoVersionAge(const GWB_PROJECT *project); int GWB_Project_GetSoVersionRevision(const GWB_PROJECT *project); GWB_KEYVALUEPAIR_LIST *GWB_Project_GetDefineList(const GWB_PROJECT *project); void GWB_Project_SetDefine(GWB_PROJECT *project, const char *name, const char *value); void GWB_Project_SetDefineQuoted(GWB_PROJECT *project, const char *name, const char *value); void GWB_Project_ClearDefineList(GWB_PROJECT *project); GWB_KEYVALUEPAIR_LIST *GWB_Project_GetGivenOptionList(const GWB_PROJECT *project); void GWB_Project_SetGivenOptionList(GWB_PROJECT *project, GWB_KEYVALUEPAIR_LIST *kvpList); void GWB_Project_SetGivenOption(GWB_PROJECT *project, const char *name, const char *value); const char *GWB_Project_GetGivenOption(const GWB_PROJECT *project, const char *name); GWB_FILE_LIST2 *GWB_Project_GetFileList(const GWB_PROJECT *project); GWB_FILE *GWB_Project_GetFileByPathAndName(const GWB_PROJECT *project, const char *folder, const char *fname); void GWB_Project_AddFile(GWB_PROJECT *project, GWB_FILE *file); GWB_TARGET_LIST2 *GWB_Project_GetTargetList(const GWB_PROJECT *project); void GWB_Project_AddTarget(GWB_PROJECT *project, GWB_TARGET *target); GWB_TARGET *GWB_Project_GetTargetById(const GWB_PROJECT *project, const char *name); GWB_BUILDER_LIST2 *GWB_Project_GetBuilderList(const GWB_PROJECT *project); void GWB_Project_AddBuilder(GWB_PROJECT *project, GWB_BUILDER *builder); GWB_OPTION_LIST *GWB_Project_GetOptionList(const GWB_PROJECT *project); void GWB_Project_AddOption(GWB_PROJECT *project, GWB_OPTION *option); GWB_OPTION *GWB_Project_GetOptionById(const GWB_PROJECT *project, const char *optionId); uint32_t GWB_Project_GetFlags(const GWB_PROJECT *project); void GWB_Project_SetFlags(GWB_PROJECT *project, uint32_t fl); void GWB_Project_AddFlags(GWB_PROJECT *project, uint32_t fl); void GWB_Project_DelFlags(GWB_PROJECT *project, uint32_t fl); GWB_BUILD_CMD_LIST *GWB_Project_GetExplicitBuildList(const GWB_PROJECT *project); void GWB_Project_AddExplicitBuild(GWB_PROJECT *project, GWB_BUILD_CMD *bcmd); void GWB_Project_toXml(const GWB_PROJECT *project, GWEN_XMLNODE *xmlNode); void GWB_Project_Dump(const GWB_PROJECT *project, int indent, int fullDump); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/target.c0000664000175000017500000001711114144206313016621 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/target_p.h" #include #include GWEN_LIST2_FUNCTIONS(GWB_TARGET, GWB_Target) GWB_TARGET *GWB_Target_new(GWB_PROJECT *project) { GWB_TARGET *target; GWEN_NEW_OBJECT(GWB_TARGET, target); target->sourceFileList=GWB_File_List2_new(); target->usedTargetNameList=GWEN_StringList_new(); target->usedLibraryList=GWEN_StringList_new(); target->usedTargetLinkSpecList=GWEN_StringList_new(); target->project=project; target->explicitBuildList=GWB_BuildCmd_List_new(); return target; } void GWB_Target_free(GWB_TARGET *target) { if (target) { free(target->installPath); free(target->installName); free(target->name); free(target->id); GWB_File_List2_free(target->sourceFileList); GWEN_StringList_free(target->usedTargetNameList); GWEN_StringList_free(target->usedTargetLinkSpecList); GWEN_StringList_free(target->usedLibraryList); GWB_BuildCmd_List_free(target->explicitBuildList); GWEN_FREE_OBJECT(target); } } GWB_PROJECT *GWB_Target_GetProject(const GWB_TARGET *target) { return target->project; } const char *GWB_Target_GetName(const GWB_TARGET *target) { return target->name; } void GWB_Target_SetName(GWB_TARGET *target, const char *s) { if (target->name) free(target->name); if (s) target->name=strdup(s); else target->name=NULL; } const char *GWB_Target_GetInstallName(const GWB_TARGET *target) { return target->installName; } void GWB_Target_SetInstallName(GWB_TARGET *target, const char *s) { if (target->installName) free(target->installName); if (s) target->installName=strdup(s); else target->installName=NULL; } const char *GWB_Target_GetId(const GWB_TARGET *target) { return target->id; } void GWB_Target_SetId(GWB_TARGET *target, const char *s) { if (target->id) free(target->id); if (s) target->id=strdup(s); else target->id=NULL; } GWBUILD_TARGETTYPE GWB_Target_GetTargetType(const GWB_TARGET *target) { return target->targetType; } void GWB_Target_SetTargetType(GWB_TARGET *target, GWBUILD_TARGETTYPE t) { target->targetType=t; } const char *GWB_Target_GetInstallPath(const GWB_TARGET *target) { return target->installPath; } void GWB_Target_SetInstallPath(GWB_TARGET *target, const char *s) { free(target->installPath); target->installPath=s?strdup(s):NULL; } void GWB_Target_SetSoVersion(GWB_TARGET *target, int vCurrent, int vAge, int vRevision) { target->soVersionCurrent=vCurrent; target->soVersionAge=vAge; target->soVersionRevision=vRevision; } int GWB_Target_GetSoVersionCurrent(const GWB_TARGET *target) { return target->soVersionCurrent; } int GWB_Target_GetSoVersionAge(const GWB_TARGET *target) { return target->soVersionAge; } int GWB_Target_GetSoVersionRevision(const GWB_TARGET *target) { return target->soVersionRevision; } GWB_CONTEXT *GWB_Target_GetContext(const GWB_TARGET *target) { return target->context; } void GWB_Target_SetContext(GWB_TARGET *target, GWB_CONTEXT *ctx) { target->context=ctx; } GWB_FILE_LIST2 *GWB_Target_GetSourceFileList(const GWB_TARGET *target) { return target->sourceFileList; } void GWB_Target_AddSourceFile(GWB_TARGET *target, GWB_FILE *file) { GWB_File_List2_PushBack(target->sourceFileList, file); } GWEN_STRINGLIST *GWB_Target_GetUsedTargetNameList(const GWB_TARGET *target) { return target->usedTargetNameList; } void GWB_Target_AddUsedTargetName(GWB_TARGET *target, const char *s) { if (target->usedTargetNameList==NULL) target->usedTargetNameList=GWEN_StringList_new(); GWEN_StringList_AppendString(target->usedTargetNameList, s, 0, 1); } GWEN_STRINGLIST *GWB_Target_GetUsedLibraryNameList(const GWB_TARGET *target) { return target->usedLibraryList; } void GWB_Target_AddUsedLibraryName(GWB_TARGET *target, const char *s) { if (target->usedLibraryList==NULL) target->usedLibraryList=GWEN_StringList_new(); GWEN_StringList_AppendString(target->usedLibraryList, s, 0, 1); } GWEN_STRINGLIST *GWB_Target_GetUsedTargetLinkSpecList(const GWB_TARGET *target) { return target->usedTargetLinkSpecList; } void GWB_Target_AddUsedTargetLinkSpec(GWB_TARGET *target, const char *s) { if (target->usedTargetLinkSpecList==NULL) target->usedTargetLinkSpecList=GWEN_StringList_new(); GWEN_StringList_AppendString(target->usedTargetLinkSpecList, s, 0, 1); } GWB_BUILDER *GWB_Target_GetBuilder(const GWB_TARGET *target) { return target->builder; } void GWB_Target_SetBuilder(GWB_TARGET *target, GWB_BUILDER *builder) { target->builder=builder; } GWB_FILE *GWB_Target_GetOutputFile(const GWB_TARGET *target) { return target->outputFile; } void GWB_Target_SetOutputFile(GWB_TARGET *target, GWB_FILE *f) { target->outputFile=f; } GWB_BUILD_CMD_LIST *GWB_Target_GetExplicitBuildList(const GWB_TARGET *target) { return target->explicitBuildList; } void GWB_Target_AddExplicitBuild(GWB_TARGET *target, GWB_BUILD_CMD *bcmd) { GWB_BuildCmd_List_Add(bcmd, target->explicitBuildList); } void GWB_Target_toXml(const GWB_TARGET *target, GWEN_XMLNODE *xmlNode) { if (target->id) GWEN_XMLNode_SetCharValue(xmlNode, "id", target->id); if (target->name) GWEN_XMLNode_SetCharValue(xmlNode, "name", target->name); if (target->installName) GWEN_XMLNode_SetCharValue(xmlNode, "installName", target->installName); GWEN_XMLNode_SetIntValue(xmlNode, "soVersionCurrent", target->soVersionCurrent); GWEN_XMLNode_SetIntValue(xmlNode, "soVersionAge", target->soVersionAge); GWEN_XMLNode_SetIntValue(xmlNode, "soVersionRevision", target->soVersionRevision); if (target->sourceFileList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "SourceFileList"); GWB_File_List2_WriteXml(target->sourceFileList, n, "File"); GWEN_XMLNode_AddChild(xmlNode, n); } } void GWB_Target_Dump(const GWB_TARGET *target, int indent, int fullDump) { int i; for(i=0; iid, indent+2); GWBUILD_Debug_PrintValue( "name..................", target->name, indent+2); GWBUILD_Debug_PrintValue( "installName...........", target->installName, indent+2); GWBUILD_Debug_PrintValue( "type..................", GWBUILD_TargetType_toString(target->targetType), indent+2); GWBUILD_Debug_PrintIntValue( "soVersionCurrent......", target->soVersionCurrent, indent+2); GWBUILD_Debug_PrintIntValue( "soVersionAge..........", target->soVersionAge, indent+2); GWBUILD_Debug_PrintIntValue( "soVersionRevision.....", target->soVersionRevision, indent+2); GWBUILD_Debug_PrintFileList2( "sourceFileList........", target->sourceFileList, indent+2); GWBUILD_Debug_PrintStringList("usedTargetNameList....", target->usedTargetNameList, indent+2); GWBUILD_Debug_PrintStringList("usedTargetLinkSpecList", target->usedTargetLinkSpecList, indent+2); GWBUILD_Debug_PrintStringList("usedLibraryList.......", target->usedLibraryList, indent+2); GWBUILD_Debug_PrintFile( "outputFile............", target->outputFile, indent+2); if (fullDump) GWB_Context_Dump(target->context, indent+2); } gwenhywfar-5.12.1/tools/gwenbuild/types/option.h0000664000175000017500000000367614116666046016677 00000000000000/*************************************************************************** begin : Fri Apr 02 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_OPTION_H #define GWBUILD_OPTION_H #include #include typedef struct GWB_OPTION GWB_OPTION; GWEN_LIST_FUNCTION_DEFS(GWB_OPTION, GWB_Option) enum { GWB_OptionType_Unknown=-1, GWB_OptionType_None=0, GWB_OptionType_String, GWB_OptionType_StringList }; #include "gwenbuild/types/keyvaluepair.h" GWB_OPTION *GWB_Option_new(const char *id); void GWB_Option_free(GWB_OPTION *option); const char *GWB_Option_GetId(const GWB_OPTION *option); int GWB_Option_GetOptionType(const GWB_OPTION *option); void GWB_Option_SetOptionType(GWB_OPTION *option, int i); const char *GWB_Option_GetDefaultValue(const GWB_OPTION *option); void GWB_Option_SetDefaultValue(GWB_OPTION *option, const char *s); GWB_KEYVALUEPAIR_LIST *GWB_Option_GetAliasList(const GWB_OPTION *option); void GWB_Option_AddAlias(GWB_OPTION *option, const char *name, const char *value); const char *GWB_Option_GetAlias(const GWB_OPTION *option, const char *name); GWEN_STRINGLIST *GWB_Option_GetChoiceList(const GWB_OPTION *option); int GWB_Option_HasChoices(const GWB_OPTION *option); int GWB_Option_IsValidChoice(const GWB_OPTION *option, const char *s); void GWB_Option_AddChoice(GWB_OPTION *option, const char *s); const char *GWB_Option_GetDefinePrefix(const GWB_OPTION *option); void GWB_Option_SetDefinePrefix(GWB_OPTION *option, const char *s); void GWB_Option_Dump(const GWB_OPTION *option, int indent); const char *GWB_OptionType_toString(int t); int GWB_OptionType_fromString(const char *s); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/project_p.h0000664000175000017500000000206614125401126017326 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PROJECT_P_H #define GWBUILD_PROJECT_P_H #include "gwenbuild/types/project.h" struct GWB_PROJECT { GWENBUILD *gwbuild; GWB_CONTEXT *contextTree; GWB_FILE_LIST2 *fileList; GWB_TARGET_LIST2 *targetList; GWB_BUILDER_LIST2 *builderList; GWB_KEYVALUEPAIR_LIST *defineList; GWB_KEYVALUEPAIR_LIST *givenOptionList; GWB_OPTION_LIST *optionList; char *projectName; int versionMajor; int versionMinor; int versionPatchlevel; int versionBuild; char *versionTag; int soVersionCurrent; int soVersionAge; int soVersionRevision; uint32_t flags; GWB_BUILD_CMD_LIST *explicitBuildList; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/keyvaluepair.h0000664000175000017500000000604014116666046020054 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_KEYVALUEPAIR_H #define GWBUILD_KEYVALUEPAIR_H #include #include #include typedef struct GWB_KEYVALUEPAIR GWB_KEYVALUEPAIR; GWEN_LIST_FUNCTION_DEFS(GWB_KEYVALUEPAIR, GWB_KeyValuePair) GWB_KEYVALUEPAIR *GWB_KeyValuePair_new(const char *key, const char *value); GWB_KEYVALUEPAIR *GWB_KeyValuePair_dup(const GWB_KEYVALUEPAIR *originalKvp); void GWB_KeyValuePair_free(GWB_KEYVALUEPAIR *kvp); const char *GWB_KeyValuePair_GetKey(const GWB_KEYVALUEPAIR *kvp); void GWB_KeyValuePair_SetKey(GWB_KEYVALUEPAIR *kvp, const char *s); const char *GWB_KeyValuePair_GetValue(const GWB_KEYVALUEPAIR *kvp); void GWB_KeyValuePair_SetValue(GWB_KEYVALUEPAIR *kvp, const char *s); GWB_KEYVALUEPAIR_LIST *GWB_KeyValuePair_List_dup(const GWB_KEYVALUEPAIR_LIST *kvpList); const char *GWB_KeyValuePair_List_GetValue(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key); GWB_KEYVALUEPAIR *GWB_KeyValuePair_List_GetFirstByKey(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key); GWB_KEYVALUEPAIR *GWB_KeyValuePair_List_GetNextByKey(const GWB_KEYVALUEPAIR *kvp, const char *key); int GWB_KeyValuePair_List_SampleValuesByKey(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key, const char *prefix, const char *delim, GWEN_BUFFER *destBuf); /** * Adds all key-value-pairs to the given buffer. * * If you want to use the given key-value-pairs as DEFINEs for a compiler input you can set the following values * to the arguments: prefix="-D" assignmentString="=" delim=" " (space), resulting in "-DKEY1=VALUE1 -DKEY2=VALUE2". * * @return number of entries added to the buffer * @param kvpList list of key-value-pairs to add * @param prefix string to prepend before adding each key-value-pair * @param assignmentString assignment chars (e.g. "=", ":=" etc) * @param delim delimiter between each pair * @param destBuf buffer to write to */ int GWB_KeyValuePair_List_WriteAllPairsToBuffer(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *prefix, const char *assignmentString, const char *delim, GWEN_BUFFER *destBuf); void GWB_KeyValuePair_toXml(const GWB_KEYVALUEPAIR *kvp, GWEN_XMLNODE *xmlNode); void GWB_KeyValuePair_List_WriteXml(const GWB_KEYVALUEPAIR_LIST *kvpList, GWEN_XMLNODE *xmlNode, const char *groupName); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/gwenbuild.c0000664000175000017500000007542214460564441017336 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/gwenbuild_p.h" #include "gwenbuild/builders/genericbuilder.h" #include "gwenbuild/types/builder_be.h" #include #include #include #include /* for stat */ #include #include #include /* for strerror */ #include #include /* Changes these two functions for new target types or new source types */ static GWB_BUILDER *_genBuilderForSourceFile(GWENBUILD *gwenbuild, GWB_CONTEXT *context, GWB_FILE *file); static GWB_BUILDER *_genBuilderForTarget(GWB_PROJECT *project, GWB_TARGET *target); static GWB_BUILDER *_getBuilderByName(GWENBUILD *gwenbuild, GWB_CONTEXT *context, const char *builderName); static int _addOrBuildTargetSources(GWB_PROJECT *project, GWB_TARGET *target); static int _addSourcesOrMkBuildersAndGetTheirOutputs(GWB_PROJECT *project, GWB_TARGET *target, GWB_FILE_LIST2 *sourceFileList, GWB_FILE_LIST2 *newOutputList); static int _addSubTargets(GWB_PROJECT *project); static int _addSubTargetsForTarget(GWB_PROJECT *project, GWB_TARGET *target, GWEN_STRINGLIST *usedTargetList); static int _addOneSubTargetForTarget(GWB_TARGET *target, GWB_TARGET *subTarget); static int _addBuildCommandsFromBuilder(GWB_PROJECT *project, GWB_BUILD_CONTEXT *buildCtx); static void _addExplicitBuildCommandsFromTargets(GWB_PROJECT *project, GWB_BUILD_CONTEXT *buildCtx); static void _addBuildCommands(GWB_BUILD_CONTEXT *buildCtx, const GWB_BUILD_CMD_LIST *buildCmdList); static void _addFilesToBuildCtx(GWB_BUILD_CONTEXT *buildCtx, GWB_FILE_LIST2 *fileList); GWENBUILD *GWBUILD_new(void) { GWENBUILD *gwenbuild; GWEN_NEW_OBJECT(GWENBUILD, gwenbuild); gwenbuild->buildFilenameList=GWEN_StringList_new(); return gwenbuild; } void GWBUILD_free(GWENBUILD *gwenbuild) { if (gwenbuild) { GWEN_StringList_free(gwenbuild->buildFilenameList); GWB_GBuilderDescr_List_free(gwenbuild->builderDescrList); GWEN_FREE_OBJECT(gwenbuild); } } uint32_t GWBUILD_GetFlags(const GWENBUILD *gwenbuild) { return gwenbuild->flags; } void GWBUILD_SetFlags(GWENBUILD *gwenbuild, uint32_t f) { gwenbuild->flags=f; } void GWBUILD_AddFlags(GWENBUILD *gwenbuild, uint32_t f) { gwenbuild->flags|=f; } void GWBUILD_DelFlags(GWENBUILD *gwenbuild, uint32_t f) { gwenbuild->flags&=~f; } const char *GWBUILD_GetTargetSystem(const GWENBUILD *gwenbuild) { return gwenbuild->targetSystem; } void GWBUILD_SetTargetSystem(GWENBUILD *gwenbuild, const char *s) { free(gwenbuild->targetSystem); gwenbuild->targetSystem=s?strdup(s):NULL; } int GWBUILD_GetTargetIsWindows(const GWENBUILD *gwenbuild) { return gwenbuild->targetIsWindows; } void GWBUILD_SetTargetIsWindows(GWENBUILD *gwenbuild, int i) { gwenbuild->targetIsWindows=i; } GWEN_STRINGLIST *GWBUILD_GetBuildFilenameList(const GWENBUILD *gwenbuild) { return gwenbuild->buildFilenameList; } void GWBUILD_AddBuildFilename(GWENBUILD *gwenbuild, const char *s) { GWEN_StringList_AppendString(gwenbuild->buildFilenameList, s, 0, 1); } GWEN_STRINGLIST *GWBUILD_GetPathFromEnvironment() { const char *s; s=getenv("PATH"); if (s && *s) return GWEN_StringList_fromString2(s, ":;", 1, GWEN_TEXT_FLAGS_DEL_QUOTES | GWEN_TEXT_FLAGS_CHECK_BACKSLASH | GWEN_TEXT_FLAGS_DEL_LEADING_BLANKS | GWEN_TEXT_FLAGS_DEL_TRAILING_BLANKS); return NULL; } GWBUILD_TARGETTYPE GWBUILD_TargetType_fromString(const char *s) { /* TODO: Create from builder files */ if (s && *s) { if (strcasecmp(s, "InstallLibrary")==0) return GWBUILD_TargetType_InstallLibrary; else if (strcasecmp(s, "ConvenienceLibrary")==0 || strcasecmp(s, "TempLibrary")==0) return GWBUILD_TargetType_ConvenienceLibrary; else if (strcasecmp(s, "Program")==0) return GWBUILD_TargetType_Program; else if (strcasecmp(s, "CxxProgram")==0) return GWBUILD_TargetType_CxxProgram; else if (strcasecmp(s, "Objects")==0) return GWBUILD_TargetType_Objects; else if (strcasecmp(s, "Module")==0) return GWBUILD_TargetType_Module; else if (strcasecmp(s, "I18nCatalog")==0) return GWBUILD_TargetType_I18nCatalog; else if (strcasecmp(s, "AvrHexFile")==0) return GWBUILD_TargetType_AvrHexFile; else { DBG_ERROR(NULL, "Invalid target type \"%s\"", s); } } else { DBG_ERROR(NULL, "Empty target type"); } return GWBUILD_TargetType_Invalid; } const char *GWBUILD_TargetType_toString(GWBUILD_TARGETTYPE tt) { switch(tt) { case GWBUILD_TargetType_Invalid: return "invalid"; case GWBUILD_TargetType_None: return "none"; case GWBUILD_TargetType_InstallLibrary: return "InstallLibrary"; case GWBUILD_TargetType_ConvenienceLibrary: return "ConvenienceLibrary"; case GWBUILD_TargetType_Program: return "program"; case GWBUILD_TargetType_CxxProgram: return "CxxProgram"; case GWBUILD_TargetType_Objects: return "objects"; case GWBUILD_TargetType_Module: return "module"; case GWBUILD_TargetType_I18nCatalog: return "I18nCatalog"; case GWBUILD_TargetType_AvrHexFile: return "AvrHexFile"; } return "invalid"; } void GWBUILD_Debug_PrintValue(const char *sName, const char *sValue, int indent) { int i; for(i=0; i"); } void GWBUILD_Debug_PrintIntValue(const char *sName, int value, int indent) { int i; for(i=0; i"); fprintf(stderr, " (%s)", sFileType?sFileType:"no type"); if (flags & GWB_FILE_FLAGS_DIST) fprintf(stderr, " DIST"); if (flags & GWB_FILE_FLAGS_INSTALL) fprintf(stderr, " INSTALL"); if (flags & GWB_FILE_FLAGS_GENERATED) fprintf(stderr, " GENERATED"); fprintf(stderr, " %s", sInstallPath?sInstallPath:""); if (GWB_File_GetBuildCmd(file)) fprintf(stderr, " BUILDCMD"); fprintf(stderr, "\n"); } else fprintf(stderr, "\n"); } void GWBUILD_Debug_PrintFileList2(const char *sName, const GWB_FILE_LIST2 *fileList2, int indent) { int i; for(i=0; i"); se=GWEN_StringListEntry_Next(se); } } } int GWBUILD_MakeBuildersForTargets(GWB_PROJECT *project) { GWB_TARGET_LIST2 *targetList; targetList=GWB_Project_GetTargetList(project); if (targetList) { GWB_TARGET_LIST2_ITERATOR *it; int rv; it=GWB_Target_List2_First(targetList); if (it) { GWB_TARGET *target; target=GWB_Target_List2Iterator_Data(it); while(target) { GWB_BUILDER *builder; builder=_genBuilderForTarget(project, target); if (builder==NULL) { DBG_INFO(NULL, "here)"); GWB_Target_List2Iterator_free(it); return GWEN_ERROR_GENERIC; } GWB_Target_SetBuilder(target, builder); GWB_Project_AddBuilder(project, builder); rv=_addOrBuildTargetSources(project, target); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } target=GWB_Target_List2Iterator_Next(it); } GWB_Target_List2Iterator_free(it); } rv=_addSubTargets(project); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } return 0; } int _addOrBuildTargetSources(GWB_PROJECT *project, GWB_TARGET *target) { GWB_FILE_LIST2 *fileList1; GWB_CONTEXT *context; context=GWB_Target_GetContext(target); fileList1=GWB_Context_GetSourceFileList2(context); if (!(fileList1 && GWB_File_List2_GetSize(fileList1)>0)) { DBG_ERROR(NULL, "Empty source file list in context of target \"%s\"", GWB_Target_GetId(target)); GWB_Target_Dump(target, 2, 1); return GWEN_ERROR_GENERIC; } fileList1=GWB_File_List2_dup(fileList1); while(GWB_File_List2_GetSize(fileList1)>0) { GWB_FILE_LIST2 *fileList2; int rv; fileList2=GWB_File_List2_new(); rv=_addSourcesOrMkBuildersAndGetTheirOutputs(project, target, fileList1, fileList2); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_File_List2_free(fileList1); GWB_File_List2_free(fileList1); return rv; } GWB_File_List2_free(fileList1); fileList1=fileList2; } GWB_File_List2_free(fileList1); return 0; } int _addSourcesOrMkBuildersAndGetTheirOutputs(GWB_PROJECT *project, GWB_TARGET *target, GWB_FILE_LIST2 *sourceFileList, GWB_FILE_LIST2 *newOutputList) { GWENBUILD *gwenbuild; GWB_BUILDER *targetBuilder; GWB_FILE_LIST2_ITERATOR *it; GWB_CONTEXT *context; gwenbuild=GWB_Project_GetGwbuild(project); context=GWB_Target_GetContext(target); targetBuilder=GWB_Target_GetBuilder(target); it=GWB_File_List2_First(sourceFileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { DBG_DEBUG(NULL, "Checking target \"%s\": file \"%s\"", GWB_Target_GetId(target), GWB_File_GetName(file)); if (GWB_Builder_IsAcceptableInput(targetBuilder, file)) { DBG_DEBUG(NULL, "- adding file \"%s\" as input for target \"%s\"", GWB_File_GetName(file), GWB_Target_GetId(target)); GWB_Builder_AddSourceFile(targetBuilder, file); } else { GWB_BUILDER *sourceBuilder; sourceBuilder=_genBuilderForSourceFile(gwenbuild, context, file); if (sourceBuilder) { GWB_FILE_LIST2 *buildersOutputFileList; buildersOutputFileList=GWB_Builder_GetOutputFileList2(sourceBuilder); GWB_Project_AddBuilder(project, sourceBuilder); GWB_File_AddFileList2ToFileList2(buildersOutputFileList, newOutputList, ".c"); GWB_File_AddFileList2ToFileList2(buildersOutputFileList, newOutputList, ".cpp"); GWB_File_AddFileList2ToFileList2(buildersOutputFileList, newOutputList, ".o"); } } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } return 0; } int _addSubTargets(GWB_PROJECT *project) { GWB_TARGET_LIST2 *targetList; targetList=GWB_Project_GetTargetList(project); if (targetList) { GWB_TARGET_LIST2_ITERATOR *it; it=GWB_Target_List2_First(targetList); if (it) { GWB_TARGET *target; target=GWB_Target_List2Iterator_Data(it); while(target) { GWEN_STRINGLIST *usedTargetList; usedTargetList=GWB_Target_GetUsedTargetNameList(target); if (usedTargetList && GWEN_StringList_Count(usedTargetList)>0) { int rv; rv=_addSubTargetsForTarget(project, target, usedTargetList); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_Target_List2Iterator_free(it); return rv; } } target=GWB_Target_List2Iterator_Next(it); } GWB_Target_List2Iterator_free(it); } } return 0; } int _addSubTargetsForTarget(GWB_PROJECT *project, GWB_TARGET *target, GWEN_STRINGLIST *usedTargetList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(usedTargetList); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { GWB_TARGET *subTarget; subTarget=GWB_Project_GetTargetById(project, s); if (subTarget) { int rv; rv=_addOneSubTargetForTarget(target, subTarget); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } } se=GWEN_StringListEntry_Next(se); } return 0; } int _addOneSubTargetForTarget(GWB_TARGET *target, GWB_TARGET *subTarget) { GWB_CONTEXT *context; GWB_BUILDER *targetBuilder; GWB_BUILDER *subTargetBuilder; GWB_FILE_LIST2 *subTargetOutputFileList; GWB_FILE *subTargetFile; const char *s; context=GWB_Target_GetContext(target); targetBuilder=GWB_Target_GetBuilder(target); if (targetBuilder==NULL) { DBG_ERROR(NULL, "No builder for target \"%s\"", GWB_Target_GetId(target)); return GWEN_ERROR_GENERIC; } subTargetBuilder=GWB_Target_GetBuilder(subTarget); if (subTargetBuilder==NULL) { DBG_ERROR(NULL, "No builder for sub-target \"%s\"", GWB_Target_GetId(subTarget)); return GWEN_ERROR_GENERIC; } subTargetOutputFileList=GWB_Builder_GetOutputFileList2(subTargetBuilder); if (subTargetOutputFileList==NULL) { DBG_ERROR(NULL, "No output file list in target \"%s\"", GWB_Target_GetId(subTarget)); return GWEN_ERROR_GENERIC; } subTargetFile=GWB_File_List2_GetFront(subTargetOutputFileList); if (subTargetFile==NULL) { DBG_ERROR(NULL, "No output file in target \"%s\"", GWB_Target_GetId(subTarget)); return GWEN_ERROR_GENERIC; } GWB_Builder_AddInputFile(targetBuilder, subTargetFile); s=GWB_Builder_GetTargetLinkSpec(subTargetBuilder); if (s && *s) { const char *folder; GWEN_BUFFER *linkSpecBuffer; /* determine path */ folder=GWB_File_GetFolder(subTargetFile); linkSpecBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(linkSpecBuffer, "-L"); GWB_Builder_AddRelativeFolderToBuffer(context, folder, 1, linkSpecBuffer); /* useBuildDir=1 */ GWEN_Buffer_AppendString(linkSpecBuffer, " "); GWEN_Buffer_AppendString(linkSpecBuffer, s); GWB_Target_AddUsedTargetLinkSpec(target, GWEN_Buffer_GetStart(linkSpecBuffer)); GWEN_Buffer_free(linkSpecBuffer); } return 0; } GWB_BUILD_CONTEXT *GWBUILD_MakeBuildCommands(GWB_PROJECT *project) { int rv; GWB_BUILD_CONTEXT *buildCtx; GWB_CONTEXT *rootContext; rootContext=GWB_Project_GetRootContext(project); buildCtx=GWB_BuildCtx_new(); GWB_BuildCtx_SetInitialSourceDir(buildCtx, GWB_Context_GetInitialSourceDir(rootContext)); rv=_addBuildCommandsFromBuilder(project, buildCtx); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_BuildCtx_free(buildCtx); return NULL; } _addExplicitBuildCommandsFromTargets(project, buildCtx); return buildCtx; } int _addBuildCommandsFromBuilder(GWB_PROJECT *project, GWB_BUILD_CONTEXT *buildCtx) { GWB_BUILDER_LIST2 *builderList; builderList=GWB_Project_GetBuilderList(project); if (builderList) { GWB_BUILDER_LIST2_ITERATOR *it; it=GWB_Builder_List2_First(builderList); if (it) { GWB_BUILDER *builder; builder=GWB_Builder_List2Iterator_Data(it); while(builder) { int rv; rv=GWB_Builder_AddBuildCmd(builder, buildCtx); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_Builder_List2Iterator_free(it); return rv; } builder=GWB_Builder_List2Iterator_Next(it); } GWB_Builder_List2Iterator_free(it); return 0; } } DBG_ERROR(NULL, "No targets in 0BUILD files"); return GWEN_ERROR_NO_DATA; } void _addExplicitBuildCommandsFromTargets(GWB_PROJECT *project, GWB_BUILD_CONTEXT *buildCtx) { GWB_TARGET_LIST2 *targetList; GWB_BUILD_CMD_LIST *explicitBuildCmdList; /* add explicit build commands from project */ explicitBuildCmdList=GWB_Project_GetExplicitBuildList(project); if (explicitBuildCmdList) _addBuildCommands(buildCtx, explicitBuildCmdList); /* add explicit build commands from targets */ targetList=GWB_Project_GetTargetList(project); if (targetList) { GWB_TARGET_LIST2_ITERATOR *it; it=GWB_Target_List2_First(targetList); if (it) { GWB_TARGET *target; target=GWB_Target_List2Iterator_Data(it); while(target) { explicitBuildCmdList=GWB_Target_GetExplicitBuildList(target); if (explicitBuildCmdList) _addBuildCommands(buildCtx, explicitBuildCmdList); target=GWB_Target_List2Iterator_Next(it); } GWB_Target_List2Iterator_free(it); } } } void _addBuildCommands(GWB_BUILD_CONTEXT *buildCtx, const GWB_BUILD_CMD_LIST *buildCmdList) { if (buildCmdList) { GWB_BUILD_CMD *cmd; cmd=GWB_BuildCmd_List_First(buildCmdList); while(cmd) { _addFilesToBuildCtx(buildCtx, GWB_BuildCmd_GetInFileList2(cmd)); /* assigns ids etc */ _addFilesToBuildCtx(buildCtx, GWB_BuildCmd_GetOutFileList2(cmd)); GWB_BuildCtx_AddCommand(buildCtx, GWB_BuildCmd_dup(cmd)); cmd=GWB_BuildCmd_List_Next(cmd); } } } void _addFilesToBuildCtx(GWB_BUILD_CONTEXT *buildCtx, GWB_FILE_LIST2 *fileList) { if (fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_FILE *copyOfFile; copyOfFile=GWB_File_dup(file); GWB_BuildCtx_AddFile(buildCtx, copyOfFile); GWB_File_SetId(file, GWB_File_GetId(copyOfFile)); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } } time_t GWBUILD_GetModificationTimeOfFile(const char *filename) { struct stat st; int rv; #if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED rv=lstat(filename, &st); #else rv=stat(filename, &st); #endif if (rv == -1) { DBG_INFO(NULL, "Error on stat(%s): %s", filename, strerror(errno)); return (time_t) 0; } return st.st_mtime; } /* code from https://stackoverflow.com/questions/152016/detecting-cpu-architecture-compile-time */ const char *GWBUILD_GetHostArch() { //Get current architecture, detectx nearly every architecture. Coded by Freak #if defined(__x86_64__) || defined(_M_X64) return "x86_64"; #elif defined(i386) || defined(__i386__) || defined(__i386) || defined(_M_IX86) return "x86_32"; #elif defined(__ARM_ARCH_2__) return "ARM2"; #elif defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_3M__) return "ARM3"; #elif defined(__ARM_ARCH_4T__) || defined(__TARGET_ARM_4T) return "ARM4T"; #elif defined(__ARM_ARCH_5_) || defined(__ARM_ARCH_5E_) return "ARM5" #elif defined(__ARM_ARCH_6T2_) || defined(__ARM_ARCH_6T2_) return "ARM6T2"; #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) return "ARM6"; #elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) return "ARM7"; #elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) return "ARM7A"; #elif defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) return "ARM7R"; #elif defined(__ARM_ARCH_7M__) return "ARM7M"; #elif defined(__ARM_ARCH_7S__) return "ARM7S"; #elif defined(__aarch64__) || defined(_M_ARM64) return "ARM64"; #elif defined(mips) || defined(__mips__) || defined(__mips) return "MIPS"; #elif defined(__sh__) return "SUPERH"; #elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) || defined(__POWERPC__) || defined(__ppc__) || defined(__PPC__) || defined(_ARCH_PPC) return "POWERPC"; #elif defined(__PPC64__) || defined(__ppc64__) || defined(_ARCH_PPC64) return "POWERPC64"; #elif defined(__sparc__) || defined(__sparc) return "SPARC"; #elif defined(__m68k__) return "M68K"; #else return "UNKNOWN"; #endif } const char *GWBUILD_GetHostSystem() { #if defined(__linux__) return "linux"; #elif defined(__sun) return "solaris"; #elif defined(__FreeBSD__) return "freebsd"; #elif defined(__NetBSD__) return "netbsd"; #elif defined(__OpenBSD__) return "openbsd"; #elif defined(__APPLE__) return "osx"; #elif defined(__hpux) return "hpux"; #elif defined(__osf__) return "tru64"; #elif defined(__sgi) return "irix"; #elif defined(_AIX) return "aix"; #elif defined(_WIN32) return "windows"; #else return "unknown"; #endif } const char *GWBUILD_GetArchFromTriplet(const char *sTriplet) { if (-1!=GWEN_Text_ComparePattern(sTriplet, "*x86_64*", 0)) return "x86_64"; else if (-1!=GWEN_Text_ComparePattern(sTriplet, "*i?86*", 0)) return "x86_32"; else return "unknown"; } const char *GWBUILD_GetSystemFromTriplet(const char *sTriplet) { if (-1!=GWEN_Text_ComparePattern(sTriplet, "*mingw*", 0)) return "windows"; else if (-1!=GWEN_Text_ComparePattern(sTriplet, "*linux*", 0)) return "linux"; else return "unknown"; } void GWBUILD_AddFilesFromStringList(GWB_FILE_LIST2 *mainFileList, const char *sFolder, const GWEN_STRINGLIST *fileNameList, GWB_FILE_LIST2 *outFileList, uint32_t flagsToAdd, int copyFileForOutList) { if (fileNameList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(fileNameList); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { GWB_FILE *file; file=GWB_File_List2_GetOrCreateFile(mainFileList, sFolder, s); GWB_File_AddFlags(file, flagsToAdd); if (outFileList) { if (copyFileForOutList) GWB_File_List2_PushBack(outFileList, GWB_File_dup(file)); else GWB_File_List2_PushBack(outFileList, file); } } se=GWEN_StringListEntry_Next(se); } } } void _readBuilderDescrList(GWENBUILD *gwenbuild) { GWEN_BUFFER *nameBuf; nameBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuf, BUILDERDATADIR GWEN_DIR_SEPARATOR_S); if (GWBUILD_GetTargetIsWindows(gwenbuild)) GWEN_Buffer_AppendString(nameBuf, "windows"); else GWEN_Buffer_AppendString(nameBuf, "posix"); gwenbuild->builderDescrList=GWB_GBuilderDescr_ReadAll(GWEN_Buffer_GetStart(nameBuf)); GWEN_Buffer_free(nameBuf); } GWB_BUILDER *_getBuilderByName(GWENBUILD *gwenbuild, GWB_CONTEXT *context, const char *builderName) { GWB_GBUILDER_DESCR *descr; GWEN_XMLNODE *xmlDescr; GWB_BUILDER *builder; if (gwenbuild->builderDescrList==NULL) _readBuilderDescrList(gwenbuild); descr=GWB_GBuilderDescr_List_GetByName(gwenbuild->builderDescrList, builderName); if (descr==NULL) { DBG_ERROR(NULL, "Builder \"%s\" not found", builderName); return NULL; } xmlDescr=GWEN_XMLNode_dup(GWB_GBuilderDescr_GetXmlDescr(descr)); builder=GWB_GenericBuilder_new(gwenbuild, context, xmlDescr); if (builder==NULL) { DBG_ERROR(NULL, "Error instantiating builder \"%s\"", builderName); return NULL; } return builder; } /* * -------------------------------------------------------------------------------------------- * Add new targets or known source types below. * -------------------------------------------------------------------------------------------- */ GWB_BUILDER *_genBuilderForSourceFile(GWENBUILD *gwenbuild, GWB_CONTEXT *context, GWB_FILE *file) { const char *builderName; const char *name; const char *ext; GWB_BUILDER *builder; name=GWB_File_GetName(file); if (!(name && *name)) { DBG_ERROR(NULL, "No file name."); return NULL; } ext=GWB_File_GetExt(file); if (ext==NULL) { DBG_DEBUG(NULL, "Unable to determine builder for source file \"%s\"", name); return NULL; } builderName=GWB_File_GetBuilder(file); if (!(builderName && *builderName)) { DBG_INFO(NULL, "Determining builder type for file \%s\"", name); if (strcasecmp(ext, ".c")==0) builderName="cbuilder"; else if (strcasecmp(ext, ".cpp")==0) builderName="cxxbuilder"; else if (strcasecmp(ext, ".t2d")==0 || strcasecmp(ext, ".xml")==0) builderName="tm2builder"; /* add more here */ else { DBG_DEBUG(NULL, "Unable to determine builder for source file \"%s\" (unhandled ext)", name); return NULL; } GWB_File_SetBuilder(file, builderName); } DBG_INFO(NULL, "Selected builder type is for file \%s\" is \"%s\"", name, builderName); builder=_getBuilderByName(gwenbuild, context, builderName); if (builder==NULL) { DBG_ERROR(NULL, "Could not create builder for type \"%s\"", ext); return NULL; } GWB_Builder_AddSourceFile(builder, file); return builder; } GWB_BUILDER *_genBuilderForTarget(GWB_PROJECT *project, GWB_TARGET *target) { GWB_BUILDER *builder=NULL; GWENBUILD *gwenbuild; gwenbuild=GWB_Project_GetGwbuild(project); switch(GWB_Target_GetTargetType(target)) { case GWBUILD_TargetType_Invalid: case GWBUILD_TargetType_None: break; case GWBUILD_TargetType_InstallLibrary: if (GWBUILD_GetFlags(gwenbuild) & GWENBUILD_FLAGS_STATIC) builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "staticlib"); else builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "sharedlib"); break; case GWBUILD_TargetType_ConvenienceLibrary: //builder=GWEN_TmpLibBuilder_new(gwenbuild, GWB_Target_GetContext(target)); builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "tmplib"); break; case GWBUILD_TargetType_Program: builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "app"); break; case GWBUILD_TargetType_CxxProgram: builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "cxxapp"); break; case GWBUILD_TargetType_Objects: break; case GWBUILD_TargetType_Module: builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "module"); break; case GWBUILD_TargetType_I18nCatalog: builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "msgfmt"); break; case GWBUILD_TargetType_AvrHexFile: builder=_getBuilderByName(gwenbuild, GWB_Target_GetContext(target), "avrhexfile"); break; } if (builder==NULL) { DBG_ERROR(NULL, "Could not create builder for type \"%s\"", GWBUILD_TargetType_toString(GWB_Target_GetTargetType(target))); return NULL; } return builder; } gwenhywfar-5.12.1/tools/gwenbuild/types/builder_be.h0000664000175000017500000000375714116666046017463 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDER_BE_H #define GWBUILD_BUILDER_BE_H #include "gwenbuild/types/builder.h" typedef int (*GWEN_BUILDER_ISACCEPTABLEINPUT_FN)(GWB_BUILDER *builder, const GWB_FILE *file); typedef int (*GWEN_BUILDER_ADDBUILDCMD_FN)(GWB_BUILDER *builder, GWB_BUILD_CONTEXT *bctx); typedef void (*GWB_BUILDER_ADDSOURCEFILE_FN)(GWB_BUILDER *builder, GWB_FILE *f); GWB_BUILDER *GWB_Builder_new(GWENBUILD *gwenbuild, GWB_CONTEXT *context, const char *typeName); void GWB_Builder_AddInputFile(GWB_BUILDER *builder, GWB_FILE *f); /** * Files like *.so and *,a should be added first, because the first entry is used * when linking with sub-targets internally. */ void GWB_Builder_AddOutputFile(GWB_BUILDER *builder, GWB_FILE *f); GWEN_BUILDER_ISACCEPTABLEINPUT_FN GWB_Builder_SetIsAcceptableInputFn(GWB_BUILDER *builder, GWEN_BUILDER_ISACCEPTABLEINPUT_FN fn); GWEN_BUILDER_ADDBUILDCMD_FN GWB_Builder_SetAddBuildCmdFn(GWB_BUILDER *builder, GWEN_BUILDER_ADDBUILDCMD_FN fn); GWB_BUILDER_ADDSOURCEFILE_FN GWB_Builder_SetAddSourceFileFn(GWB_BUILDER *builder, GWB_BUILDER_ADDSOURCEFILE_FN fn); void GWB_Builder_AddFileNamesToBuffer(const GWB_CONTEXT *context, const GWB_FILE_LIST2 *inFileList, GWEN_BUFFER *argBuffer); void GWB_Builder_AddFileNameToBuffer(const GWB_CONTEXT *context, const GWB_FILE *file, GWEN_BUFFER *argBuffer); void GWB_Builder_AddAbsFileNameToBuffer(const GWB_CONTEXT *context, const GWB_FILE *file, GWEN_BUFFER *argBuffer); void GWB_Builder_AddRelativeFolderToBuffer(const GWB_CONTEXT *context, const char *folder, int useBuildDir, GWEN_BUFFER *argBuffer); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/Makefile.in0000644000175000017500000006314315032533615017245 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/types ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgwb_types_la_LIBADD = am_libgwb_types_la_OBJECTS = builder.lo context.lo file.lo \ gwenbuild.lo keyvaluepair.lo target.lo project.lo option.lo libgwb_types_la_OBJECTS = $(am_libgwb_types_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/builder.Plo ./$(DEPDIR)/context.Plo \ ./$(DEPDIR)/file.Plo ./$(DEPDIR)/gwenbuild.Plo \ ./$(DEPDIR)/keyvaluepair.Plo ./$(DEPDIR)/option.Plo \ ./$(DEPDIR)/project.Plo ./$(DEPDIR)/target.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwb_types_la_SOURCES) DIST_SOURCES = $(libgwb_types_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DBUILDERDATADIR=\"$(datadir)/gwenhywfar/gwenbuild/builders\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES = libgwb_types.la libgwb_types_la_SOURCES = \ builder.c \ context.c \ file.c \ gwenbuild.c \ keyvaluepair.c \ target.c \ project.c \ option.c noinst_HEADERS = \ builder.h \ builder_be.h \ builder_p.h \ context.h \ context_p.h \ file.h \ file_p.h \ gwenbuild.h \ gwenbuild_p.h \ keyvaluepair.h \ keyvaluepair_p.h \ target.h \ target_p.h \ project.h \ project_p.h \ option.h \ option_p.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/types/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/types/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwb_types.la: $(libgwb_types_la_OBJECTS) $(libgwb_types_la_DEPENDENCIES) $(EXTRA_libgwb_types_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgwb_types_la_OBJECTS) $(libgwb_types_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builder.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gwenbuild.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyvaluepair.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/option.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/project.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/target.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/builder.Plo -rm -f ./$(DEPDIR)/context.Plo -rm -f ./$(DEPDIR)/file.Plo -rm -f ./$(DEPDIR)/gwenbuild.Plo -rm -f ./$(DEPDIR)/keyvaluepair.Plo -rm -f ./$(DEPDIR)/option.Plo -rm -f ./$(DEPDIR)/project.Plo -rm -f ./$(DEPDIR)/target.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/builder.Plo -rm -f ./$(DEPDIR)/context.Plo -rm -f ./$(DEPDIR)/file.Plo -rm -f ./$(DEPDIR)/gwenbuild.Plo -rm -f ./$(DEPDIR)/keyvaluepair.Plo -rm -f ./$(DEPDIR)/option.Plo -rm -f ./$(DEPDIR)/project.Plo -rm -f ./$(DEPDIR)/target.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/types/file.c0000664000175000017500000003471614460564441016276 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/file_p.h" #include #include #include #include GWEN_LIST2_FUNCTIONS(GWB_FILE, GWB_File) static void _writeFileFlagsToXml(uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName); static uint32_t _readFlagsFromChar(const char *flagsAsText); GWB_FILE *GWB_File_new(const char *folder, const char *fName, uint32_t id) { GWB_FILE *f; GWEN_NEW_OBJECT(GWB_FILE, f); if (folder && *folder) GWB_File_SetFolder(f, folder); if (fName && *fName) GWB_File_SetName(f, fName); f->id=id; return f; } GWB_FILE *GWB_File_dup(const GWB_FILE *oldFile) { if (oldFile) { GWB_FILE *fileOut; fileOut=GWB_File_new(oldFile->folder, oldFile->name, 0); GWB_File_SetFileType(fileOut, oldFile->fileType); GWB_File_SetInstallPath(fileOut, oldFile->installPath); GWB_File_SetBuilder(fileOut, oldFile->builder); GWB_File_SetFlags(fileOut, oldFile->flags); GWB_File_SetInstallName(fileOut, oldFile->installName); fileOut->buildCmd=oldFile->buildCmd; return fileOut; } return NULL; } void GWB_File_free(GWB_FILE *f) { if (f) { GWB_BuildCmd_List2_free(f->waitingBuildCmdList2); free(f->installName); free(f->builder); free(f->folder); free(f->name); GWEN_FREE_OBJECT(f); } } uint32_t GWB_File_GetId(const GWB_FILE *f) { return f->id; } void GWB_File_SetId(GWB_FILE *f, uint32_t i) { f->id=i; } uint32_t GWB_File_GetFlags(const GWB_FILE *f) { return f->flags; } void GWB_File_SetFlags(GWB_FILE *f, uint32_t i) { f->flags=i; } void GWB_File_AddFlags(GWB_FILE *f, uint32_t i) { f->flags|=i; } void GWB_File_DelFlags(GWB_FILE *f, uint32_t i) { f->flags&=~i; } const char *GWB_File_GetFolder(const GWB_FILE *f) { return f->folder; } void GWB_File_SetFolder(GWB_FILE *f, const char *s) { if (f->folder) free(f->folder); if (s && *s) f->folder=strdup(s); else f->folder=NULL; } const char *GWB_File_GetName(const GWB_FILE *f) { return f->name; } void GWB_File_SetName(GWB_FILE *f, const char *s) { if (f->name) free(f->name); if (s && *s) f->name=strdup(s); else f->name=NULL; } const char *GWB_File_GetInstallName(const GWB_FILE *f) { return f->installName; } void GWB_File_SetInstallName(GWB_FILE *f, const char *s) { if (f->installName) free(f->installName); if (s && *s) f->installName=strdup(s); else f->installName=NULL; } const char *GWB_File_GetExt(const GWB_FILE *f) { if (f->name) return (const char*) strrchr(f->name, '.'); return NULL; } const char *GWB_File_GetBuilder(const GWB_FILE *f) { return f->builder; } void GWB_File_SetBuilder(GWB_FILE *f, const char *s) { free(f->builder); f->builder=s?strdup(s):NULL; } const char *GWB_File_GetInstallPath(const GWB_FILE *f) { return f->installPath; } void GWB_File_SetInstallPath(GWB_FILE *f, const char *s) { if (f->installPath) free(f->installPath); if (s && *s) f->installPath=strdup(s); else f->installPath=NULL; } const char *GWB_File_GetFileType(const GWB_FILE *f) { return f->fileType; } void GWB_File_SetFileType(GWB_FILE *f, const char *s) { if (f->fileType) free(f->fileType); if (s && *s) f->fileType=strdup(s); else f->fileType=NULL; } GWB_BUILD_CMD_LIST2 *GWB_File_GetWaitingBuildCmdList2(const GWB_FILE *f) { return f->waitingBuildCmdList2; } void GWB_File_AddWaitingBuildCmd(GWB_FILE *f, GWB_BUILD_CMD *bcmd) { if (f->waitingBuildCmdList2==NULL) f->waitingBuildCmdList2=GWB_BuildCmd_List2_new(); GWB_BuildCmd_List2_PushBack(f->waitingBuildCmdList2, bcmd); } void GWB_File_ClearWaitingBuildCmds(GWB_FILE *f) { if (f->waitingBuildCmdList2) GWB_BuildCmd_List2_Clear(f->waitingBuildCmdList2); } GWB_BUILD_CMD *GWB_File_GetBuildCmd(const GWB_FILE *f) { return f->buildCmd; } void GWB_File_SetBuildCmd(GWB_FILE *f, GWB_BUILD_CMD *bcmd) { f->buildCmd=bcmd; } void GWB_File_List2_FreeAll(GWB_FILE_LIST2 *fileList2) { if (fileList2) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList2); if (it) { GWB_FILE *f; f=GWB_File_List2Iterator_Data(it); while(f) { GWB_File_free(f); f=GWB_File_List2Iterator_Next(it); } } GWB_File_List2_free(fileList2); } } void GWB_File_ReplaceExtension(GWB_FILE *file, const char *newExt) { const char *s; s=file->name; if (s && *s) { const char *ext; GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 64, 0, 1); ext=strrchr(s, '.'); if (ext) { int len; len=(ext-s); /* exclude "." */ if (len) { GWEN_Buffer_AppendBytes(buf, s, len); } } GWEN_Buffer_AppendString(buf, newExt); GWB_File_SetName(file, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } } GWB_FILE *GWB_File_CopyObjectAndChangeExtension(const GWB_FILE *file, const char *newExt) { GWB_FILE *fileOut; const char *s1; const char *s2; fileOut=GWB_File_dup(file); GWB_File_ReplaceExtension(fileOut, newExt); s1=GWB_File_GetName(file); s2=GWB_File_GetName(fileOut); if (strcasecmp(s1, s2)==0) { DBG_ERROR(NULL, "Output file has the same name as input file (%s)!", s1); GWB_File_free(fileOut); return NULL; } return fileOut; } GWB_FILE *GWB_File_List2_GetFileByPathAndName(const GWB_FILE_LIST2 *fileList, const char *folder, const char *fname) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { const char *currentName; currentName=GWB_File_GetName(file); if (currentName && *currentName && strcasecmp(currentName, fname)==0) { const char *currentFolder; currentFolder=GWB_File_GetFolder(file); if ((currentFolder==NULL && folder==NULL) || (currentFolder && *currentFolder && strcasecmp(currentFolder, folder)==0)) { GWB_File_List2Iterator_free(it); return file; } } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } return NULL; } GWB_FILE *GWB_File_List2_GetOrCreateFile(GWB_FILE_LIST2 *fileList, const char *folder, const char *fname) { GWEN_BUFFER *pathBuf; char *s; const char *realFolder; const char *realFilename; GWB_FILE *file; pathBuf=GWEN_Buffer_new(0, 256, 0, 1); if (folder && *folder) { GWEN_Buffer_AppendString(pathBuf, folder); GWEN_Buffer_AppendString(pathBuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(pathBuf, fname); s=strrchr(GWEN_Buffer_GetStart(pathBuf), GWEN_DIR_SEPARATOR); if (s) { *s=0; realFolder=GWEN_Buffer_GetStart(pathBuf); realFilename=s+1; } else { realFolder=NULL; realFilename=GWEN_Buffer_GetStart(pathBuf); } file=GWB_File_List2_GetFileByPathAndName(fileList, realFolder, realFilename); if (file==NULL) { file=GWB_File_new(realFolder, realFilename, 0); GWB_File_List2_PushBack(fileList, file); } GWEN_Buffer_free(pathBuf); return file; } GWB_FILE *GWB_File_List2_GetFileById(const GWB_FILE_LIST2 *fileList, uint32_t id) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { if (GWB_File_GetId(file)==id) { GWB_File_List2Iterator_free(it); return file; } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } return NULL; } void GWB_File_AddFileList2ToFileList2(GWB_FILE_LIST2 *sourceList, GWB_FILE_LIST2 *destList, const char *ext) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(sourceList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { if (ext && *ext) { const char *s; s=GWB_File_GetExt(file); if (s && strcasecmp(s, ext)==0) { GWB_File_List2_PushBack(destList, file); } } else GWB_File_List2_PushBack(destList, file); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void GWB_File_WriteFileNameToTopBuildDirString(const GWB_FILE *file, const char *initialSourceDir, GWEN_BUFFER *fbuf) { const char *s; if (!(GWB_File_GetFlags(file) & GWB_FILE_FLAGS_GENERATED)) { if (initialSourceDir && *initialSourceDir) { GWEN_Buffer_AppendString(fbuf, initialSourceDir); GWEN_Buffer_AppendString(fbuf, GWEN_DIR_SEPARATOR_S); } } s=GWB_File_GetFolder(file); if (s && *s) { GWEN_Buffer_AppendString(fbuf, s); GWEN_Buffer_AppendString(fbuf, GWEN_DIR_SEPARATOR_S); } s=GWB_File_GetName(file); GWEN_Buffer_AppendString(fbuf, s); } GWEN_STRINGLIST *GWB_File_FileListToTopBuildDirStringList(const GWB_FILE_LIST2 *fileList, const char *initialSourceDir) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWEN_STRINGLIST *sl; GWB_FILE *file; GWEN_BUFFER *fbuf; sl=GWEN_StringList_new(); fbuf=GWEN_Buffer_new(0, 256, 0, 1); file=GWB_File_List2Iterator_Data(it); while(file) { GWB_File_WriteFileNameToTopBuildDirString(file, initialSourceDir, fbuf); GWEN_StringList_AppendString(sl, GWEN_Buffer_GetStart(fbuf), 0, 1); GWEN_Buffer_Reset(fbuf); file=GWB_File_List2Iterator_Next(it); } /* while */ GWEN_Buffer_Reset(fbuf); GWB_File_List2Iterator_free(it); if (GWEN_StringList_Count(sl)==0) { GWEN_StringList_free(sl); return NULL; } return sl; } return NULL; } void GWB_File_toXml(const GWB_FILE *file, GWEN_XMLNODE *xmlNode) { GWEN_XMLNode_SetIntProperty(xmlNode, "id", (int) (file->id)); if (file->folder) GWEN_XMLNode_SetCharValue(xmlNode, "folder", file->folder); if (file->name) GWEN_XMLNode_SetCharValue(xmlNode, "name", file->name); if (file->installName) GWEN_XMLNode_SetCharValue(xmlNode, "installName", file->installName); if (file->fileType) GWEN_XMLNode_SetCharValue(xmlNode, "type", file->fileType); if (file->installPath) GWEN_XMLNode_SetCharValue(xmlNode, "installPath", file->installPath); if (file->builder) GWEN_XMLNode_SetCharValue(xmlNode, "builder", file->builder); _writeFileFlagsToXml(GWB_File_GetFlags(file), xmlNode, "flags"); } GWB_FILE *GWB_File_fromXml(GWEN_XMLNODE *xmlNode) { uint32_t id; GWB_FILE *file; const char *folder; const char *name; const char *s; id=(uint32_t) GWEN_XMLNode_GetIntProperty(xmlNode, "id", 0); folder=GWEN_XMLNode_GetCharValue(xmlNode, "folder", NULL); name=GWEN_XMLNode_GetCharValue(xmlNode, "name", NULL); file=GWB_File_new(folder, name, id); s=GWEN_XMLNode_GetCharValue(xmlNode, "flags", NULL); if (s) file->flags=_readFlagsFromChar(s); GWB_File_SetFileType(file, GWEN_XMLNode_GetCharValue(xmlNode, "type", NULL)); GWB_File_SetInstallPath(file, GWEN_XMLNode_GetCharValue(xmlNode, "installPath", NULL)); GWB_File_SetBuilder(file, GWEN_XMLNode_GetCharValue(xmlNode, "builder", NULL)); GWB_File_SetInstallName(file, GWEN_XMLNode_GetCharValue(xmlNode, "installName", NULL)); return file; } void _writeFileFlagsToXml(uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName) { if (flags) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); if (flags & GWB_FILE_FLAGS_DIST) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "DIST"); } if (flags & GWB_FILE_FLAGS_INSTALL) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "INSTALL"); } if (flags & GWB_FILE_FLAGS_GENERATED) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "GENERATED"); } if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_XMLNode_SetCharValue(xmlNode, varName, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } } uint32_t _readFlagsFromChar(const char *flagsAsText) { GWEN_STRINGLIST *sl; uint32_t flags=0; sl=GWEN_StringList_fromString(flagsAsText, " ", 1); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { if (strcasecmp(s, "DIST")==0) flags|=GWB_FILE_FLAGS_DIST; else if (strcasecmp(s, "INSTALL")==0) flags|=GWB_FILE_FLAGS_INSTALL; else if (strcasecmp(s, "GENERATED")==0) flags|=GWB_FILE_FLAGS_GENERATED; else { DBG_ERROR(NULL, "Unexpected FILE flag \"%s\"", s); } } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } return flags; } GWB_FILE *GWB_File_List2_GetAt(const GWB_FILE_LIST2 *fileList, int index) { GWB_FILE_LIST2_ITERATOR *it; int i=0; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { if (i==index) { GWB_File_List2Iterator_free(it); return file; } i++; file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } return NULL; } void GWB_File_List2_WriteXml(const GWB_FILE_LIST2 *fileList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWEN_XMLNODE *entryNode; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWB_File_toXml(file, entryNode); GWEN_XMLNode_AddChild(xmlNode, entryNode); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void GWB_File_List2_ReadXml(GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *destFileList) { GWEN_XMLNODE *xmlEntry; xmlEntry=GWEN_XMLNode_FindFirstTag(xmlNode, groupName, NULL, NULL); while(xmlEntry) { GWB_FILE *file; file=GWB_File_fromXml(xmlEntry); if (file) GWB_File_List2_PushBack(destFileList, file); xmlEntry=GWEN_XMLNode_FindNextTag(xmlEntry, groupName, NULL, NULL); } } gwenhywfar-5.12.1/tools/gwenbuild/types/builder.h0000664000175000017500000000365214116666046017007 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDER_H #define GWBUILD_BUILDER_H #include #include typedef struct GWB_BUILDER GWB_BUILDER; GWEN_LIST2_FUNCTION_DEFS(GWB_BUILDER, GWB_Builder) GWEN_INHERIT_FUNCTION_DEFS(GWB_BUILDER) #include "gwenbuild/types/gwenbuild.h" #include "gwenbuild/types/context.h" #include "gwenbuild/types/file.h" #include "gwenbuild/buildctx/buildctx.h" #include void GWB_Builder_free(GWB_BUILDER *builder); GWENBUILD *GWB_Builder_GetGwenbuild(const GWB_BUILDER *builder); const char *GWB_Builder_GetTypeName(const GWB_BUILDER *builder); uint32_t GWB_Builder_GetId(const GWB_BUILDER *builder); const char *GWB_Builder_GetTargetLinkSpec(const GWB_BUILDER *builder); void GWB_Builder_SetTargetLinkSpec(GWB_BUILDER *builder, const char *s); GWB_CONTEXT *GWB_Builder_GetContext(const GWB_BUILDER *builder); GWB_FILE_LIST2 *GWB_Builder_GetInputFileList2(const GWB_BUILDER *builder); GWB_FILE_LIST2 *GWB_Builder_GetOutputFileList2(const GWB_BUILDER *builder); int GWB_Builder_GetNumBlockingInputFiles(const GWB_BUILDER *builder); int GWB_Builder_IncNumBlockingInputFiles(GWB_BUILDER *builder); int GWB_Builder_DecNumBlockingInputFiles(GWB_BUILDER *builder); int GWB_Builder_IsAcceptableInput(GWB_BUILDER *builder, const GWB_FILE *file); void GWB_Builder_AddSourceFile(GWB_BUILDER *builder, GWB_FILE *f); int GWB_Builder_AddBuildCmd(GWB_BUILDER *builder, GWB_BUILD_CONTEXT *bctx); void GWB_Builder_Dump(const GWB_BUILDER *builder, int indent, int fullDump); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/keyvaluepair_p.h0000664000175000017500000000120414116666046020370 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_KEYVALUEPAIR_P_H #define GWBUILD_KEYVALUEPAIR_P_H #include "gwenbuild/types/keyvaluepair.h" struct GWB_KEYVALUEPAIR { GWEN_LIST_ELEMENT(GWB_KEYVALUEPAIR) char *key; char *value; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/target.h0000664000175000017500000000614414144206313016632 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_TARGET_H #define GWBUILD_TARGET_H #include typedef struct GWB_TARGET GWB_TARGET; GWEN_LIST2_FUNCTION_DEFS(GWB_TARGET, GWB_Target) #include "gwenbuild/types/context.h" #include "gwenbuild/types/file.h" #include "gwenbuild/types/builder.h" #include "gwenbuild/types/gwenbuild.h" #include "gwenbuild/types/project.h" #include "gwenbuild/buildctx/buildcmd.h" #include GWB_TARGET *GWB_Target_new(GWB_PROJECT *project); void GWB_Target_free(GWB_TARGET *target); const char *GWB_Target_GetId(const GWB_TARGET *target); void GWB_Target_SetId(GWB_TARGET *target, const char *s); const char *GWB_Target_GetName(const GWB_TARGET *target); void GWB_Target_SetName(GWB_TARGET *target, const char *s); const char *GWB_Target_GetInstallName(const GWB_TARGET *target); void GWB_Target_SetInstallName(GWB_TARGET *target, const char *s); GWBUILD_TARGETTYPE GWB_Target_GetTargetType(const GWB_TARGET *target); void GWB_Target_SetTargetType(GWB_TARGET *target, GWBUILD_TARGETTYPE t); const char *GWB_Target_GetInstallPath(const GWB_TARGET *target); void GWB_Target_SetInstallPath(GWB_TARGET *target, const char *s); GWB_PROJECT *GWB_Target_GetProject(const GWB_TARGET *target); void GWB_Target_SetSoVersion(GWB_TARGET *target, int vCurrent, int vAge, int vRevision); int GWB_Target_GetSoVersionCurrent(const GWB_TARGET *target); int GWB_Target_GetSoVersionAge(const GWB_TARGET *target); int GWB_Target_GetSoVersionRevision(const GWB_TARGET *target); GWB_CONTEXT *GWB_Target_GetContext(const GWB_TARGET *target); void GWB_Target_SetContext(GWB_TARGET *target, GWB_CONTEXT *ctx); GWB_FILE_LIST2 *GWB_Target_GetSourceFileList(const GWB_TARGET *target); void GWB_Target_AddSourceFile(GWB_TARGET *target, GWB_FILE *file); GWEN_STRINGLIST *GWB_Target_GetUsedTargetNameList(const GWB_TARGET *target); void GWB_Target_AddUsedTargetName(GWB_TARGET *target, const char *s); GWEN_STRINGLIST *GWB_Target_GetUsedLibraryNameList(const GWB_TARGET *target); void GWB_Target_AddUsedLibraryName(GWB_TARGET *target, const char *s); GWEN_STRINGLIST *GWB_Target_GetUsedTargetLinkSpecList(const GWB_TARGET *target); void GWB_Target_AddUsedTargetLinkSpec(GWB_TARGET *target, const char *s); GWB_BUILDER *GWB_Target_GetBuilder(const GWB_TARGET *target); void GWB_Target_SetBuilder(GWB_TARGET *target, GWB_BUILDER *builder); GWB_FILE *GWB_Target_GetOutputFile(const GWB_TARGET *target); void GWB_Target_SetOutputFile(GWB_TARGET *target, GWB_FILE *f); GWB_BUILD_CMD_LIST *GWB_Target_GetExplicitBuildList(const GWB_TARGET *target); void GWB_Target_AddExplicitBuild(GWB_TARGET *target, GWB_BUILD_CMD *bcmd); void GWB_Target_Dump(const GWB_TARGET *target, int indent, int fullDump); #endif gwenhywfar-5.12.1/tools/gwenbuild/types/option.c0000664000175000017500000001042014116666046016653 00000000000000/*************************************************************************** begin : Fri Apr 02 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/option_p.h" #include "gwenbuild/types/keyvaluepair.h" #include "gwenbuild/types/gwenbuild.h" #include GWEN_LIST_FUNCTIONS(GWB_OPTION, GWB_Option) GWB_OPTION *GWB_Option_new(const char *id) { GWB_OPTION *option; GWEN_NEW_OBJECT(GWB_OPTION, option); GWEN_LIST_INIT(GWB_OPTION, option); option->id=id?strdup(id):NULL; option->aliasList=GWB_KeyValuePair_List_new(); option->choiceList=GWEN_StringList_new(); return option; } void GWB_Option_free(GWB_OPTION *option) { if (option) { GWEN_LIST_FINI(GWB_OPTION, option); free(option->id); free(option->defaultValue); free(option->definePrefix); GWEN_StringList_free(option->choiceList); GWB_KeyValuePair_List_free(option->aliasList); GWEN_FREE_OBJECT(option); } } const char *GWB_Option_GetId(const GWB_OPTION *option) { return option->id; } int GWB_Option_GetOptionType(const GWB_OPTION *option) { return option->optionType; } void GWB_Option_SetOptionType(GWB_OPTION *option, int i) { option->optionType=i; } const char *GWB_Option_GetDefaultValue(const GWB_OPTION *option) { return option->defaultValue; } void GWB_Option_SetDefaultValue(GWB_OPTION *option, const char *s) { free(option->defaultValue); option->defaultValue=s?strdup(s):NULL; } GWB_KEYVALUEPAIR_LIST *GWB_Option_GetAliasList(const GWB_OPTION *option) { return option->aliasList; } void GWB_Option_AddAlias(GWB_OPTION *option, const char *name, const char *value) { GWB_KEYVALUEPAIR *kvp; kvp=GWB_KeyValuePair_new(name, value); GWB_KeyValuePair_List_Add(kvp, option->aliasList); } const char *GWB_Option_GetAlias(const GWB_OPTION *option, const char *name) { return GWB_KeyValuePair_List_GetValue(option->aliasList, name); } GWEN_STRINGLIST *GWB_Option_GetChoiceList(const GWB_OPTION *option) { return option->choiceList; } int GWB_Option_HasChoices(const GWB_OPTION *option) { return (GWEN_StringList_Count(option->choiceList)>0)?1:0; } int GWB_Option_IsValidChoice(const GWB_OPTION *option, const char *s) { if (GWEN_StringList_Count(option->choiceList)==0) return 1; if (GWEN_StringList_HasString(option->choiceList, s)) return 1; return 0; } void GWB_Option_AddChoice(GWB_OPTION *option, const char *s) { GWEN_StringList_AppendString(option->choiceList, s, 0, 1); } const char *GWB_Option_GetDefinePrefix(const GWB_OPTION *option) { return option->definePrefix; } void GWB_Option_SetDefinePrefix(GWB_OPTION *option, const char *s) { free(option->definePrefix); option->definePrefix=s?strdup(s):NULL; } void GWB_Option_Dump(const GWB_OPTION *option, int indent) { int i; for(i=0; iid, indent+2); GWBUILD_Debug_PrintValue( "defaultValue", option->defaultValue, indent+2); GWBUILD_Debug_PrintValue( "definePrefix", option->definePrefix, indent+2); GWBUILD_Debug_PrintKvpList( "aliasList...", option->aliasList, indent+2); GWBUILD_Debug_PrintStringList("choiceList..", option->choiceList, indent+2); } const char *GWB_OptionType_toString(int t) { switch(t) { case GWB_OptionType_Unknown: return "unknown"; case GWB_OptionType_None: return "none"; case GWB_OptionType_String: return "string"; case GWB_OptionType_StringList: return "stringlist"; } return "unknown"; } int GWB_OptionType_fromString(const char *s) { if (s) { if (strcasecmp(s, "unknown")==0) return GWB_OptionType_Unknown; else if (strcasecmp(s, "none")==0) return GWB_OptionType_None; else if (strcasecmp(s, "string")==0) return GWB_OptionType_String; else if (strcasecmp(s, "stringlist")==0) return GWB_OptionType_StringList; } return GWB_OptionType_Unknown; } gwenhywfar-5.12.1/tools/gwenbuild/types/builder_p.h0000664000175000017500000000167714116666046017333 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDER_P_H #define GWBUILD_BUILDER_P_H #include "gwenbuild/types/builder_be.h" struct GWB_BUILDER { GWEN_INHERIT_ELEMENT(GWB_BUILDER) uint32_t id; char *typeName; char *targetLinkSpec; GWENBUILD *gwenbuild; GWB_CONTEXT *context; GWB_FILE_LIST2 *inputFileList2; GWB_FILE_LIST2 *outputFileList2; int numBlockingInputFiles; GWEN_BUILDER_ISACCEPTABLEINPUT_FN isAcceptableInputFn; GWEN_BUILDER_ADDBUILDCMD_FN addBuildCmdFn; GWB_BUILDER_ADDSOURCEFILE_FN addSourceFileFn; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/context_p.h0000664000175000017500000000177414116666046017367 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_CONTEXT_P_H #define GWBUILD_CONTEXT_P_H #include "gwenbuild/types/context.h" struct GWB_CONTEXT { GWEN_TREE2_ELEMENT(GWB_CONTEXT) GWENBUILD *gwenbuild; char *initialSourceDir; char *currentRelativeDir; char *topBuildDir; char *topSourceDir; char *currentBuildDir; char *currentSourceDir; char *compilerFlags; char *linkerFlags; GWB_KEYVALUEPAIR_LIST *includeList; /* key=TYPE (e.g. tm2), value=includes */ GWB_KEYVALUEPAIR_LIST *defineList; GWEN_DB_NODE *vars; GWB_FILE_LIST2 *sourceFileList2; GWB_TARGET *currentTarget; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/types/context.c0000664000175000017500000003362714116666046017045 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/context_p.h" #include #include #include #include GWEN_TREE2_FUNCTIONS(GWB_CONTEXT, GWB_Context) static char *_combinedString(const char *string1, const char *string2, const char delim); static void _exportDbToXml(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode); GWB_CONTEXT *GWB_Context_new(GWENBUILD *gwenbuild) { GWB_CONTEXT *ctx; GWEN_NEW_OBJECT(GWB_CONTEXT, ctx); GWEN_TREE2_INIT(GWB_CONTEXT, ctx, GWB_Context); ctx->gwenbuild=gwenbuild; ctx->vars=GWEN_DB_Group_new("vars"); return ctx; } GWB_CONTEXT *GWB_Context_dup(const GWB_CONTEXT *originalCtx) { GWB_CONTEXT *ctx; GWEN_NEW_OBJECT(GWB_CONTEXT, ctx); GWEN_TREE2_INIT(GWB_CONTEXT, ctx, GWB_Context); ctx->gwenbuild=originalCtx->gwenbuild; ctx->currentTarget=originalCtx->currentTarget; if (originalCtx->initialSourceDir) ctx->initialSourceDir=strdup(originalCtx->initialSourceDir); if (originalCtx->currentRelativeDir) ctx->currentRelativeDir=strdup(originalCtx->currentRelativeDir); if (originalCtx->topBuildDir) ctx->topBuildDir=strdup(originalCtx->topBuildDir); if (originalCtx->topSourceDir) ctx->topSourceDir=strdup(originalCtx->topSourceDir); if (originalCtx->currentBuildDir) ctx->currentBuildDir=strdup(originalCtx->currentBuildDir); if (originalCtx->currentSourceDir) ctx->currentSourceDir=strdup(originalCtx->currentSourceDir); if (originalCtx->compilerFlags) ctx->compilerFlags=originalCtx->compilerFlags; if (originalCtx->linkerFlags) ctx->linkerFlags=originalCtx->linkerFlags; if (originalCtx->includeList) ctx->includeList=GWB_KeyValuePair_List_dup(originalCtx->includeList); if (originalCtx->defineList) ctx->defineList=GWB_KeyValuePair_List_dup(originalCtx->defineList); if (originalCtx->vars) ctx->vars=GWEN_DB_Group_dup(originalCtx->vars); return ctx; } void GWB_Context_free(GWB_CONTEXT *ctx) { if (ctx) { GWEN_TREE2_FINI(GWB_CONTEXT, ctx, GWB_Context); free(ctx->topBuildDir); free(ctx->topSourceDir); free(ctx->currentBuildDir); free(ctx->currentSourceDir); free(ctx->initialSourceDir); free(ctx->compilerFlags); free(ctx->linkerFlags); GWB_KeyValuePair_List_free(ctx->includeList); GWB_KeyValuePair_List_free(ctx->defineList); GWEN_DB_Group_free(ctx->vars); GWB_File_List2_free(ctx->sourceFileList2); GWEN_FREE_OBJECT(ctx); } } GWENBUILD *GWB_Context_GetGwenbuild(const GWB_CONTEXT *ctx) { return ctx->gwenbuild; } const char *GWB_Context_GetTopBuildDir(const GWB_CONTEXT *ctx) { return ctx->topBuildDir; } void GWB_Context_SetTopBuildDir(GWB_CONTEXT *ctx, const char *s) { if (ctx->topBuildDir) free(ctx->topBuildDir); if (s) ctx->topBuildDir=strdup(s); else ctx->topBuildDir=NULL; } void GWB_Context_InsertTopBuildDir(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(s, ctx->topBuildDir, '/'); free(ctx->topBuildDir); ctx->topBuildDir=newValue; } const char *GWB_Context_GetTopSourceDir(const GWB_CONTEXT *ctx) { return ctx->topSourceDir; } void GWB_Context_SetTopSourceDir(GWB_CONTEXT *ctx, const char *s) { if (ctx->topSourceDir) free(ctx->topSourceDir); if (s) ctx->topSourceDir=strdup(s); else ctx->topSourceDir=NULL; } void GWB_Context_InsertTopSourceDir(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(s, ctx->topSourceDir, '/'); free(ctx->topSourceDir); ctx->topSourceDir=newValue; } const char *GWB_Context_GetCurrentBuildDir(const GWB_CONTEXT *ctx) { return ctx->currentBuildDir; } void GWB_Context_SetCurrentBuildDir(GWB_CONTEXT *ctx, const char *s) { if (ctx->currentBuildDir) free(ctx->currentBuildDir); if (s) ctx->currentBuildDir=strdup(s); else ctx->currentBuildDir=NULL; } void GWB_Context_AddCurrentBuildDir(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(ctx->currentBuildDir, s, '/'); free(ctx->currentBuildDir); ctx->currentBuildDir=newValue; } const char *GWB_Context_GetCurrentSourceDir(const GWB_CONTEXT *ctx) { return ctx->currentSourceDir; } void GWB_Context_AddCurrentSourceDir(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(ctx->currentSourceDir, s, '/'); free(ctx->currentSourceDir); ctx->currentSourceDir=newValue; } void GWB_Context_InsertCurrentSourceDir(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(s, ctx->currentSourceDir, '/'); free(ctx->currentSourceDir); ctx->currentSourceDir=newValue; } void GWB_Context_SetCurrentSourceDir(GWB_CONTEXT *ctx, const char *s) { if (ctx->currentSourceDir) free(ctx->currentSourceDir); if (s) ctx->currentSourceDir=strdup(s); else ctx->currentSourceDir=NULL; } const char *GWB_Context_GetCurrentRelativeDir(const GWB_CONTEXT *ctx) { return ctx->currentRelativeDir; } void GWB_Context_AddCurrentRelativeDir(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(ctx->currentRelativeDir, s, '/'); free(ctx->currentRelativeDir); ctx->currentRelativeDir=newValue; } void GWB_Context_SetCurrentRelativeDir(GWB_CONTEXT *ctx, const char *s) { if (ctx->currentRelativeDir) free(ctx->currentRelativeDir); if (s) ctx->currentRelativeDir=strdup(s); else ctx->currentRelativeDir=NULL; } const char *GWB_Context_GetInitialSourceDir(const GWB_CONTEXT *ctx) { return ctx->initialSourceDir; } void GWB_Context_SetInitialSourceDir(GWB_CONTEXT *ctx, const char *s) { free(ctx->initialSourceDir); ctx->initialSourceDir=s?strdup(s):NULL; } const char *GWB_Context_GetCompilerFlags(const GWB_CONTEXT *ctx) { return ctx->compilerFlags; } void GWB_Context_SetCompilerFlags(GWB_CONTEXT *ctx, const char *s) { if (ctx->compilerFlags) free(ctx->compilerFlags); if (s) ctx->compilerFlags=strdup(s); else ctx->compilerFlags=NULL; } void GWB_Context_AddCompilerFlags(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(ctx->compilerFlags, s, ' '); free(ctx->compilerFlags); ctx->compilerFlags=newValue; } const char *GWB_Context_GetLinkerFlags(const GWB_CONTEXT *ctx) { return ctx->linkerFlags; } void GWB_Context_SetLinkerFlags(GWB_CONTEXT *ctx, const char *s) { if (ctx->linkerFlags) free(ctx->linkerFlags); if (s) ctx->linkerFlags=strdup(s); else ctx->linkerFlags=NULL; } void GWB_Context_AddLinkerFlags(GWB_CONTEXT *ctx, const char *s) { char *newValue; newValue=_combinedString(ctx->linkerFlags, s, ' '); free(ctx->linkerFlags); ctx->linkerFlags=newValue; } GWB_KEYVALUEPAIR_LIST *GWB_Context_GetIncludeList(const GWB_CONTEXT *ctx) { return ctx->includeList; } void GWB_Context_AddInclude(GWB_CONTEXT *ctx, const char *genType, const char *incl) { if (genType && *genType &&incl && *incl) { GWB_KEYVALUEPAIR *kvp; if (ctx->includeList==NULL) ctx->includeList=GWB_KeyValuePair_List_new(); kvp=GWB_KeyValuePair_new(genType, incl); GWB_KeyValuePair_List_Add(kvp, ctx->includeList); } } void GWB_Context_ClearIncludeList(GWB_CONTEXT *ctx) { if (ctx->includeList==NULL) ctx->includeList=GWB_KeyValuePair_List_new(); else GWB_KeyValuePair_List_Clear(ctx->includeList); } GWB_KEYVALUEPAIR_LIST *GWB_Context_GetDefineList(const GWB_CONTEXT *ctx) { return ctx->defineList; } void GWB_Context_SetDefine(GWB_CONTEXT *ctx, const char *name, const char *value) { if (name && *name) { GWB_KEYVALUEPAIR *kvp; if (ctx->defineList==NULL) ctx->defineList=GWB_KeyValuePair_List_new(); kvp=GWB_KeyValuePair_List_GetFirstByKey(ctx->defineList, name); if (kvp) GWB_KeyValuePair_SetValue(kvp, value); else GWB_KeyValuePair_List_Add(GWB_KeyValuePair_new(name, value), ctx->defineList); } } void GWB_Context_ClearDefineList(GWB_CONTEXT *ctx) { if (ctx->defineList==NULL) ctx->defineList=GWB_KeyValuePair_List_new(); else GWB_KeyValuePair_List_Clear(ctx->defineList); } GWEN_DB_NODE *GWB_Context_GetVars(const GWB_CONTEXT *ctx) { return ctx->vars; } GWB_FILE_LIST2 *GWB_Context_GetSourceFileList2(const GWB_CONTEXT *ctx) { return ctx->sourceFileList2; } void GWB_Context_AddSourceFile(GWB_CONTEXT *ctx, GWB_FILE *f) { if (ctx->sourceFileList2==NULL) ctx->sourceFileList2=GWB_File_List2_new(); GWB_File_List2_PushBack(ctx->sourceFileList2, f); } void GWB_Context_ClearSourceFileList2(GWB_CONTEXT *ctx) { if (ctx->sourceFileList2==NULL) ctx->sourceFileList2=GWB_File_List2_new(); else GWB_File_List2_Clear(ctx->sourceFileList2); } GWB_TARGET *GWB_Context_GetCurrentTarget(const GWB_CONTEXT *ctx) { return ctx->currentTarget; } void GWB_Context_SetCurrentTarget(GWB_CONTEXT *ctx, GWB_TARGET *target) { ctx->currentTarget=target; } /* mindmap for my stupid brain... abcde abc 5 3 = 8 + 1 (blank) +1 (0) abcde abc = 9 + '0' 0123456789 */ char *_combinedString(const char *string1, const char *string2, const char delim) { if (string2 && *string2) { if (string1==NULL) return strdup(string2); else { int len1; int len2; char *newS; len1=strlen(string1); len2=strlen(string2); newS=(char*) malloc(len1+len2+2); /* blank plus trailing 0 */ assert(newS); memmove(newS, string1, len1); newS[len1]=delim; memmove(newS+len1+1, string2, len2); newS[len1+len2+1]=0; return newS; } } else { if (string1) return strdup(string1); return NULL; } } void GWB_Context_toXml(const GWB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, int withDb) { const GWB_CONTEXT *ctxChild; if (ctx->initialSourceDir) GWEN_XMLNode_SetCharValue(xmlNode, "initialSourceDir", ctx->initialSourceDir); if (ctx->currentRelativeDir) GWEN_XMLNode_SetCharValue(xmlNode, "currentRelativeDir", ctx->currentRelativeDir); if (ctx->topBuildDir) GWEN_XMLNode_SetCharValue(xmlNode, "topBuildDir", ctx->topBuildDir); if (ctx->topSourceDir) GWEN_XMLNode_SetCharValue(xmlNode, "topSourceDir", ctx->topSourceDir); if (ctx->currentBuildDir) GWEN_XMLNode_SetCharValue(xmlNode, "currentBuildDir", ctx->currentBuildDir); if (ctx->currentSourceDir) GWEN_XMLNode_SetCharValue(xmlNode, "currentSourceDir", ctx->currentSourceDir); if (ctx->compilerFlags) GWEN_XMLNode_SetCharValue(xmlNode, "compilerFlags", ctx->compilerFlags); if (ctx->linkerFlags) GWEN_XMLNode_SetCharValue(xmlNode, "linkerFlags", ctx->linkerFlags); if (ctx->includeList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "includeList"); GWB_KeyValuePair_List_WriteXml(ctx->includeList, n, "Include"); GWEN_XMLNode_AddChild(xmlNode, n); } if (ctx->defineList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "defineList"); GWB_KeyValuePair_List_WriteXml(ctx->defineList, n, "Define"); GWEN_XMLNode_AddChild(xmlNode, n); } if (withDb && ctx->vars) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "Vars"); _exportDbToXml(ctx->vars, n); GWEN_XMLNode_AddChild(xmlNode, n); } ctxChild=GWB_Context_Tree2_GetFirstChild(ctx); if (ctxChild) { GWEN_XMLNODE *nTree; nTree=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "Children"); while(ctxChild) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "Child"); GWB_Context_toXml(ctxChild, n, 0); /* only write db for root context */ GWEN_XMLNode_AddChild(nTree, n); ctxChild=GWB_Context_Tree2_GetNext(ctxChild); } GWEN_XMLNode_AddChild(xmlNode, nTree); } } void _exportDbToXml(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode) { GWEN_BUFFER *dbuf; int rv; dbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_DB_WriteToBuffer(db, dbuf, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { DBG_ERROR(NULL, "here (%d)", rv); GWEN_Buffer_free(dbuf); } else { GWEN_XMLNODE *xmlData; xmlData=GWEN_XMLNode_new(GWEN_XMLNodeTypeData, GWEN_Buffer_GetStart(dbuf)); GWEN_XMLNode_AddChild(xmlNode, xmlData); GWEN_Buffer_free(dbuf); } } void GWB_Context_Dump(const GWB_CONTEXT *ctx, int indent) { if (ctx) { int i; for(i=0; icurrentTarget)?GWB_Target_GetName(ctx->currentTarget):NULL, indent+2); GWBUILD_Debug_PrintValue("currentRelativeDir", ctx->currentRelativeDir, indent+2); GWBUILD_Debug_PrintValue("topBuildDir.......", ctx->topBuildDir, indent+2); GWBUILD_Debug_PrintValue("topSourceDir......", ctx->topSourceDir, indent+2); GWBUILD_Debug_PrintValue("currentBuildDir...", ctx->currentBuildDir, indent+2); GWBUILD_Debug_PrintValue("currentSourceDir..", ctx->currentSourceDir, indent+2); GWBUILD_Debug_PrintValue("compilerFlags.....", ctx->compilerFlags, indent+2); GWBUILD_Debug_PrintValue("linkerFlags.......", ctx->linkerFlags, indent+2); GWBUILD_Debug_PrintKvpList("includeList", ctx->includeList, indent+2); GWBUILD_Debug_PrintKvpList("defineList", ctx->defineList, indent+2); GWBUILD_Debug_PrintDb("vars", ctx->vars, indent+2); GWBUILD_Debug_PrintFileList2("sourceFileList2", ctx->sourceFileList2, indent+2); } } void GWB_Context_Tree2_Dump(const GWB_CONTEXT *ctx, int indent) { if (ctx) { const GWB_CONTEXT *childCtx; GWB_Context_Dump(ctx, indent); childCtx=GWB_Context_Tree2_GetFirstChild(ctx); while(childCtx) { GWB_Context_Tree2_Dump(childCtx, indent+2); childCtx=GWB_Context_Tree2_GetNext(childCtx); } } } gwenhywfar-5.12.1/tools/gwenbuild/types/Makefile.am0000664000175000017500000000117014125675316017235 00000000000000INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) DEFS=-DBUILDERDATADIR=\"$(datadir)/gwenhywfar/gwenbuild/builders\" noinst_LTLIBRARIES=libgwb_types.la libgwb_types_la_SOURCES=\ builder.c \ context.c \ file.c \ gwenbuild.c \ keyvaluepair.c \ target.c \ project.c \ option.c noinst_HEADERS=\ builder.h \ builder_be.h \ builder_p.h \ context.h \ context_p.h \ file.h \ file_p.h \ gwenbuild.h \ gwenbuild_p.h \ keyvaluepair.h \ keyvaluepair_p.h \ target.h \ target_p.h \ project.h \ project_p.h \ option.h \ option_p.h gwenhywfar-5.12.1/tools/gwenbuild/types/project.c0000664000175000017500000003202714125675316017020 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/types/project_p.h" #include #include static void _writeFileFlagsToXml(uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName); /* static uint32_t _readFlagsFromChar(const char *flagsAsText); */ GWB_PROJECT *GWB_Project_new(GWENBUILD *gwbuild, GWB_CONTEXT *ctx) { GWB_PROJECT *project; GWEN_NEW_OBJECT(GWB_PROJECT, project); project->gwbuild=gwbuild; project->contextTree=ctx; project->fileList=GWB_File_List2_new(); project->targetList=GWB_Target_List2_new(); project->builderList=GWB_Builder_List2_new(); project->optionList=GWB_Option_List_new(); project->givenOptionList=GWB_KeyValuePair_List_new(); project->explicitBuildList=GWB_BuildCmd_List_new(); return project; } void GWB_Project_free(GWB_PROJECT *project) { if (project) { GWB_KeyValuePair_List_free(project->givenOptionList); GWB_Option_List_free(project->optionList); GWB_File_List2_free(project->fileList); GWB_Context_free(project->contextTree); GWB_Target_List2_free(project->targetList); GWB_Builder_List2_free(project->builderList); GWB_KeyValuePair_List_free(project->defineList); free(project->versionTag); GWB_BuildCmd_List_free(project->explicitBuildList); GWEN_FREE_OBJECT(project); } } GWENBUILD *GWB_Project_GetGwbuild(const GWB_PROJECT *project) { return project->gwbuild; } const char *GWB_Project_GetProjectName(const GWB_PROJECT *project) { return project->projectName; } void GWB_Project_SetProjectName(GWB_PROJECT *project, const char *s) { if (project->projectName) free(project->projectName); if (s) project->projectName=strdup(s); else project->projectName=NULL; } void GWB_Project_SetVersion(GWB_PROJECT *project, int vMajor, int vMinor, int vPatchlevel, int vBuild, const char *vTag) { project->versionMajor=vMajor; project->versionMinor=vMinor; project->versionPatchlevel=vPatchlevel; project->versionBuild=vBuild; free(project->versionTag); project->versionTag=vTag?strdup(vTag):NULL; } int GWB_Project_GetVersionMajor(const GWB_PROJECT *project) { return project->versionMajor; } int GWB_Project_GetVersionMinor(const GWB_PROJECT *project) { return project->versionMinor; } int GWB_Project_GetVersionPatchlevel(const GWB_PROJECT *project) { return project->versionPatchlevel; } int GWB_Project_GetVersionBuild(const GWB_PROJECT *project) { return project->versionBuild; } const char *GWB_Project_GetVersionTag(const GWB_PROJECT *project) { return project->versionTag; } void GWB_Project_SetSoVersion(GWB_PROJECT *project, int vCurrent, int vAge, int vRevision) { project->soVersionCurrent=vCurrent; project->soVersionAge=vAge; project->soVersionRevision=vRevision; } int GWB_Project_GetSoVersionCurrent(const GWB_PROJECT *project) { return project->soVersionCurrent; } int GWB_Project_GetSoVersionAge(const GWB_PROJECT *project) { return project->soVersionAge; } int GWB_Project_GetSoVersionRevision(const GWB_PROJECT *project) { return project->soVersionRevision; } uint32_t GWB_Project_GetFlags(const GWB_PROJECT *project) { return project->flags; } void GWB_Project_SetFlags(GWB_PROJECT *project, uint32_t fl) { project->flags=fl; } void GWB_Project_AddFlags(GWB_PROJECT *project, uint32_t fl) { project->flags|=fl; } void GWB_Project_DelFlags(GWB_PROJECT *project, uint32_t fl) { project->flags&=~fl; } GWB_FILE_LIST2 *GWB_Project_GetFileList(const GWB_PROJECT *project) { return project->fileList; } GWB_FILE *GWB_Project_GetFileByPathAndName(const GWB_PROJECT *project, const char *folder, const char *fname) { return GWB_File_List2_GetFileByPathAndName(project->fileList, folder, fname); } void GWB_Project_AddFile(GWB_PROJECT *project, GWB_FILE *file) { GWB_File_List2_PushBack(project->fileList, file); } GWB_CONTEXT *GWB_Project_GetRootContext(const GWB_PROJECT *project) { return project->contextTree; } GWB_TARGET_LIST2 *GWB_Project_GetTargetList(const GWB_PROJECT *project) { return project->targetList; } void GWB_Project_AddTarget(GWB_PROJECT *project, GWB_TARGET *target) { GWB_Target_List2_PushBack(project->targetList, target); } GWB_TARGET *GWB_Project_GetTargetById(const GWB_PROJECT *project, const char *id) { if (project->targetList) { GWB_TARGET_LIST2_ITERATOR *it; it=GWB_Target_List2_First(project->targetList); if (it) { GWB_TARGET *target; target=GWB_Target_List2Iterator_Data(it); while(target) { const char *s; s=GWB_Target_GetId(target); if (s && strcasecmp(s, id)==0) break; target=GWB_Target_List2Iterator_Next(it); } GWB_Target_List2Iterator_free(it); if (target) return target; } } return NULL; } GWB_BUILDER_LIST2 *GWB_Project_GetBuilderList(const GWB_PROJECT *project) { return project->builderList; } void GWB_Project_AddBuilder(GWB_PROJECT *project, GWB_BUILDER *builder) { GWB_Builder_List2_PushBack(project->builderList, builder); } GWB_KEYVALUEPAIR_LIST *GWB_Project_GetDefineList(const GWB_PROJECT *project) { return project->defineList; } void GWB_Project_SetDefine(GWB_PROJECT *project, const char *name, const char *value) { if (name && *name) { GWB_KEYVALUEPAIR *kvp; if (project->defineList==NULL) project->defineList=GWB_KeyValuePair_List_new(); kvp=GWB_KeyValuePair_List_GetFirstByKey(project->defineList, name); if (kvp) GWB_KeyValuePair_SetValue(kvp, value); else GWB_KeyValuePair_List_Add(GWB_KeyValuePair_new(name, value), project->defineList); } } void GWB_Project_SetDefineQuoted(GWB_PROJECT *project, const char *name, const char *value) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(dbuf, "\""); if (value && *value) GWEN_Buffer_AppendString(dbuf, value); GWEN_Buffer_AppendString(dbuf, "\""); GWB_Project_SetDefine(project, name, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } void GWB_Project_ClearDefineList(GWB_PROJECT *project) { if (project->defineList==NULL) project->defineList=GWB_KeyValuePair_List_new(); else GWB_KeyValuePair_List_Clear(project->defineList); } GWB_OPTION_LIST *GWB_Project_GetOptionList(const GWB_PROJECT *project) { return project->optionList; } void GWB_Project_AddOption(GWB_PROJECT *project, GWB_OPTION *option) { GWB_Option_List_Add(option, project->optionList); } GWB_OPTION *GWB_Project_GetOptionById(const GWB_PROJECT *project, const char *optionId) { GWB_OPTION *option; option=GWB_Option_List_First(project->optionList); while(option) { const char *sName; sName=GWB_Option_GetId(option); if (sName && strcasecmp(sName, optionId)==0) return option; option=GWB_Option_List_Next(option); } return NULL; } GWB_KEYVALUEPAIR_LIST *GWB_Project_GetGivenOptionList(const GWB_PROJECT *project) { return project->givenOptionList; } void GWB_Project_SetGivenOptionList(GWB_PROJECT *project, GWB_KEYVALUEPAIR_LIST *kvpList) { GWB_KeyValuePair_List_free(project->givenOptionList); project->givenOptionList=kvpList; } void GWB_Project_SetGivenOption(GWB_PROJECT *project, const char *name, const char *value) { GWB_KEYVALUEPAIR *kvp; kvp=GWB_KeyValuePair_new(name, value); GWB_KeyValuePair_List_Add(kvp, project->givenOptionList); } const char *GWB_Project_GetGivenOption(const GWB_PROJECT *project, const char *name) { return GWB_KeyValuePair_List_GetValue(project->givenOptionList, name); } GWB_BUILD_CMD_LIST *GWB_Project_GetExplicitBuildList(const GWB_PROJECT *project) { return project->explicitBuildList; } void GWB_Project_AddExplicitBuild(GWB_PROJECT *project, GWB_BUILD_CMD *bcmd) { GWB_BuildCmd_List_Add(bcmd, project->explicitBuildList); } void GWB_Project_toXml(const GWB_PROJECT *project, GWEN_XMLNODE *xmlNode) { if (project->projectName) GWEN_XMLNode_SetCharValue(xmlNode, "projectName", project->projectName); GWEN_XMLNode_SetIntValue(xmlNode, "versionMajor", project->versionMajor); GWEN_XMLNode_SetIntValue(xmlNode, "versionMinor", project->versionMinor); GWEN_XMLNode_SetIntValue(xmlNode, "versionPatchlevel", project->versionPatchlevel); GWEN_XMLNode_SetIntValue(xmlNode, "versionBuild", project->versionBuild); if (project->versionTag) GWEN_XMLNode_SetCharValue(xmlNode, "versionTag", project->versionTag); GWEN_XMLNode_SetIntValue(xmlNode, "soVersionCurrent", project->soVersionCurrent); GWEN_XMLNode_SetIntValue(xmlNode, "soVersionAge", project->soVersionAge); GWEN_XMLNode_SetIntValue(xmlNode, "soVersionRevision", project->soVersionRevision); _writeFileFlagsToXml(GWB_Project_GetFlags(project), xmlNode, "flags"); if (project->defineList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "DefineList"); GWB_KeyValuePair_List_WriteXml(project->defineList, n, "Define"); GWEN_XMLNode_AddChild(xmlNode, n); } if (project->givenOptionList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "GivenOptionList"); GWB_KeyValuePair_List_WriteXml(project->givenOptionList, n, "GivenOption"); GWEN_XMLNode_AddChild(xmlNode, n); } if (project->explicitBuildList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "ExplicitBuildCmdList"); GWB_BuildCmd_List_WriteXml(project->explicitBuildList, n, "BuildCmd"); GWEN_XMLNode_AddChild(xmlNode, n); } if (project->fileList) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "FileList"); GWB_File_List2_WriteXml(project->fileList, n, "File"); GWEN_XMLNode_AddChild(xmlNode, n); } } void _writeFileFlagsToXml(uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName) { if (flags) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); if (flags & GWB_PROJECT_FLAGS_SHARED) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "SHARED"); } if (flags & GWB_PROJECT_FLAGS_CONFIG_H) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "CONFIG_H"); } if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_XMLNode_SetCharValue(xmlNode, varName, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } } #if 0 uint32_t _readFlagsFromChar(const char *flagsAsText) { GWEN_STRINGLIST *sl; uint32_t flags=0; sl=GWEN_StringList_fromString(flagsAsText, " ", 1); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { if (strcasecmp(s, "SHARED")==0) flags|=GWB_PROJECT_FLAGS_SHARED; else if (strcasecmp(s, "CONFIG_H")==0) flags|=GWB_PROJECT_FLAGS_CONFIG_H; else { DBG_ERROR(NULL, "Unexpected PROJECT flag \"%s\"", s); } } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } return flags; } #endif void GWB_Project_Dump(const GWB_PROJECT *project, int indent, int fullDump) { int i; for(i=0; iprojectName, indent+2); GWBUILD_Debug_PrintIntValue("versionMajor.....", project->versionMajor, indent+2); GWBUILD_Debug_PrintIntValue("versionMinor.....", project->versionMinor, indent+2); GWBUILD_Debug_PrintIntValue("versionPatchlevel", project->versionPatchlevel, indent+2); GWBUILD_Debug_PrintIntValue("versionBuild.....", project->versionBuild, indent+2); GWBUILD_Debug_PrintValue( "versionTag.......", project->versionTag, indent+2); GWBUILD_Debug_PrintIntValue("soVersionCurrent.", project->soVersionCurrent, indent+2); GWBUILD_Debug_PrintIntValue("soVersionAge.....", project->soVersionAge, indent+2); GWBUILD_Debug_PrintIntValue("soVersionRevision", project->soVersionRevision, indent+2); for(i=0; iflags & GWB_PROJECT_FLAGS_SHARED) fprintf(stderr, " SHARED"); fprintf(stderr, "\n"); GWB_Context_Tree2_Dump(project->contextTree, indent+2); GWBUILD_Debug_PrintFileList2("fileList", project->fileList, indent+2); GWBUILD_Debug_PrintTargetList2("targetList", project->targetList, indent+2, fullDump); GWBUILD_Debug_PrintKvpList("defineList", project->defineList, indent+2); GWBUILD_Debug_PrintKvpList("givenOptionList", project->givenOptionList, indent+2); GWBUILD_Debug_PrintBuilderList2("builderList", project->builderList, indent+2, fullDump); GWBUILD_Debug_PrintOptionList("optionList", project->optionList, indent+2); } gwenhywfar-5.12.1/tools/gwenbuild/c_prepare.c0000664000175000017500000000256614144206312016136 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "c_prepare.h" #include "c_setup.h" #include "utils.h" #include "gwenbuild/buildctx/buildctx_xml.h" #include "gwenbuild/buildctx/buildctx_run.h" #include "gwenbuild/filenames.h" #include int GWB_Prepare(GWEN_UNUSED GWEN_DB_NODE *dbArgs) { GWB_BUILD_CONTEXT *buildCtx; int rv; if (GWB_Utils_BuildFilesChanged(GWBUILD_FILE_BUILDFILES)) { fprintf(stdout, "Build files changed, repeating last setup command.\n"); rv=GWB_RepeatLastSetup(GWBUILD_FILE_ARGS); if (rv<0) { DBG_INFO(NULL, "here"); return rv; } } buildCtx=GWB_BuildCtx_ReadFromXmlFile(GWBUILD_FILE_CTX); if (buildCtx==NULL) { fprintf(stderr, "ERROR: Error reading build context from file.\n"); return 1; } /* prepare */ rv=GWB_BuildCtx_Run(buildCtx, 10, 1, NULL); if (rv<0) { fprintf(stderr, "ERROR: Error preparing builds.\n"); return 2; } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/main.c0000664000175000017500000003135314460564441015131 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/parser.h" #include "gwenbuild/filenames.h" #include "utils.h" #include "c_setup.h" #include "c_prepare.h" #include "c_build.h" #include "c_install.h" #include "c_clean.h" #include "c_dist.h" #include #include #include #include #include #include #include #include #ifdef HAVE_SIGNAL_H # include #endif #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) #define I18S(msg) msg #define ARGS_COMMAND_SETUP 0x0001 #define ARGS_COMMAND_PREPARE 0x0002 #define ARGS_COMMAND_BUILD 0x0004 #define ARGS_COMMAND_REPEAT_SETUP 0x0008 #define ARGS_COMMAND_INSTALL 0x0010 #define ARGS_COMMAND_CLEAN 0x0020 #define ARGS_COMMAND_DIST 0x0040 static int _readArgsIntoDb(int argc, char **argv, GWEN_DB_NODE *db); static int _handleStringArgument(int argc, char **argv, int *pIndex, const char *sArg, const char *sArgId, const char *sVarName, GWEN_DB_NODE *db); static void _printHelpScreen(); #ifdef HAVE_SIGNAL_H # ifdef _POSIX_C_SOURCE struct sigaction sigActionChild; # endif void _signalHandler(int s) { switch(s) { #ifdef _POSIX_C_SOURCE case SIGCHLD: //fprintf(stderr, "Child exited %d\n", s); break; #endif default: fprintf(stderr, "Received unhandled signal %d\n", s); break; } signal(s, _signalHandler); } #if _POSIX_C_SOURCE int _setSingleSignalHandler(struct sigaction *sa, int sig) { sa->sa_handler=_signalHandler; sigemptyset(&sa->sa_mask); sa->sa_flags=0; if (sigaction(sig, sa, 0)) { DBG_ERROR(NULL, "Could not setup signal handler for signal %d", sig); return GWEN_ERROR_GENERIC; } return 0; } #endif int _setSignalHandlers() { #ifdef _POSIX_C_SOURCE int rv; rv=_setSingleSignalHandler(&sigActionChild, SIGCHLD); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } #endif return 0; } #endif int main(int argc, char **argv) { GWEN_DB_NODE *dbArgs; int rv; int err; uint32_t commands=0; const char *s; GWEN_GUI *gui; #if defined(HAVE_SIGNAL_H) && defined(_POSIX_C_SOURCE) signal(SIGCHLD, _signalHandler); //_setSignalHandlers(); #endif err=GWEN_Init(); if (err) { fprintf(stderr, "Could not initialize Gwenhywfar.\n"); return 2; } gui=GWEN_Gui_CGui_new(); GWEN_Gui_SetGui(gui); GWEN_Logger_Open(NULL, "gwenbuild", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User); GWEN_Logger_SetLevel(NULL, GWEN_LoggerLevel_Warning); dbArgs=GWEN_DB_Group_new("args"); rv=_readArgsIntoDb(argc, argv, dbArgs); if (rv<0 || rv==1) { return 1; } s=GWEN_DB_GetCharValue(dbArgs, "loglevel", 0, NULL); if (s && *s) { GWEN_LOGGER_LEVEL level; level=GWEN_Logger_Name2Level(s); if (level==GWEN_LoggerLevel_Unknown) { } else GWEN_Logger_SetLevel(NULL, level); } commands|=GWEN_DB_GetIntValue(dbArgs, "setup", 0, 0)?ARGS_COMMAND_SETUP:0; /* -s */ commands|=GWEN_DB_GetIntValue(dbArgs, "repeatSetup", 0, 0)?ARGS_COMMAND_REPEAT_SETUP:0; /* -r */ commands|=GWEN_DB_GetIntValue(dbArgs, "prepare", 0, 0)?ARGS_COMMAND_PREPARE:0; /* -p */ commands|=GWEN_DB_GetIntValue(dbArgs, "build", 0, 0)?ARGS_COMMAND_BUILD:0; /* -b or no opts */ commands|=GWEN_DB_GetIntValue(dbArgs, "install", 0, 0)?ARGS_COMMAND_INSTALL:0; /* -i */ commands|=GWEN_DB_GetIntValue(dbArgs, "clean", 0, 0)?ARGS_COMMAND_CLEAN:0; /* -c */ commands|=GWEN_DB_GetIntValue(dbArgs, "dist", 0, 0)?ARGS_COMMAND_DIST:0; /* -d */ if (commands & ARGS_COMMAND_SETUP) { rv=GWB_Setup(dbArgs); if (rv!=0) { fprintf(stderr, "ERROR: Error on setup build environment.\n"); return rv; } } if (commands & ARGS_COMMAND_REPEAT_SETUP) { rv=GWB_RepeatLastSetup(GWBUILD_FILE_ARGS); if (rv<0) { fprintf(stderr, "ERROR: Error on repeating setup.\n"); return rv; } } if (commands & ARGS_COMMAND_PREPARE) { rv=GWB_Prepare(dbArgs); if (rv!=0) { fprintf(stderr, "ERROR: Error on preparing build environment.\n"); return rv; } } if ((commands & ARGS_COMMAND_BUILD) || (commands==0)) { rv=GWB_Build(dbArgs); if (rv!=0) { fprintf(stderr, "ERROR: Error on building.\n"); return rv; } } if (commands & ARGS_COMMAND_INSTALL) { rv=GWB_InstallFiles(GWBUILD_FILE_INSTALLFILES, getenv("DESTDIR")); if (rv!=0) { fprintf(stderr, "ERROR: Error on installing.\n"); return rv; } } if (commands & ARGS_COMMAND_DIST) { rv=GWB_MkDist(); if (rv!=0) { fprintf(stderr, "ERROR: Error on creating dist file.\n"); return rv; } } if (commands & ARGS_COMMAND_CLEAN) { rv=GWB_Clean(GWBUILD_FILE_FILES); if (rv!=0) { fprintf(stderr, "ERROR: Error on cleaning generated files.\n"); return rv; } } err=GWEN_Fini(); if (err) { fprintf(stderr, "WARNING: Could not deinitialize Gwenhywfar.\n"); } return 0; } int _handleStringArgument(int argc, char **argv, int *pIndex, const char *sArg, const char *sArgId, const char *sVarName, GWEN_DB_NODE *db) { int i; i=*pIndex; if (*sArg==0) { i++; if (i>=argc) { DBG_ERROR(NULL, "Missing argument for \"%s\"", sArgId); return GWEN_ERROR_INVALID; } sArg=argv[i]; } if (sArg && *sArg) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_DEFAULT, sVarName, sArg); *pIndex=i; return 0; } int _readArgsIntoDb(int argc, char **argv, GWEN_DB_NODE *db) { int i=1; int help=0; while(i=argc) { DBG_ERROR(NULL, "Missing argument for \"-j\""); return GWEN_ERROR_INVALID; } s=argv[i]; } if (1!=sscanf(s, "%d", &val)) { DBG_ERROR(NULL, "Non-integer argument for \"-j\""); return GWEN_ERROR_INVALID; } GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "jobs", val); } } } i++; } /* while */ if (help) { _printHelpScreen(); return 1; } return 0; } void _printHelpScreen() { fprintf(stdout, "\n" "Gwenhywfar Build Tool " GWENHYWFAR_VERSION_FULL_STRING "\n" "\n" "Building a project (e.g. compiling and linking) is done in multiple steps.\n" "\n" "1. Setup Build Environment\n" "-------------------------\n" "A. Create files named 0BUILD inside your project (see project AqFinance for\n" "example files).\n" "B. Create an empty folder and change into it (all next commands are run\n" "from there).\n" "You might want to use a folder like 'build' inside the source tree of\n" "your project.\n" "C. run\n" " gwbuild -s PATH_TO_SOURCE_TREE [-OOPTIONS]\n" "e.g. gwbuild -s .. -Oprefix=/usr/local\n" "\n" "2. Prepare Building\n" "-------------------\n" " gwbuild -p\n" "This is only needed if your project uses typemaker2 to generate c-sources from\n" "XML files.\n" "This command makes typemaker2 create its derived type description files needed\n" "when referencing typemaker2 generated types inside another typemaker2 generated\n" "type.\n" "\n" "3. Build Typemaker2 Files\n" "--------------------------\n" " gwbuild -Btm2builder\n" "This step is only needed once after the previous step and before compiling source files.\n" "The reason is that compiling source files involves creating dependency files.\n" "But for that to work at least for GCC all the headers which are included by source\n" "files need to exist; this also means source files to be generated by typemaker2.\n" "So if you have typemaker2 input files you need to run this step once.\n" "After that gwbuild keeps track of changes made to the input files and calls typemaker2\n" "again if necessary.\n" "\n" "4. Build All Targets\n" "--------------------\n" " gwbuild\n" "This command builds typemaker2 source files first (if needed) and then all\n" "other targets.\n" "A single process is used to compile and link the project files.\n" "If you have multiple processor cores/threads you can build multiple files in\n" "parallel:\n" " gwbuild -j14\n" "This command uses 14 processes in parallel.\n" "The step can be repeated as often as needed. It will automatically check for\n" "changed files and try to only re-compile/link those modified files and others\n" "which depend on them.\n" "If you change a 0BUILD file gwbuild will automatically call the setup step\n" "using the same\n" "arguments given to the last setup command (-s). This typically leads to all\n" "files being re-build.\n" "\n" "Complete Option List\n" "--------------------\n" "-s FOLDER setup build environment (arg: source folder path)\n" "-p run preparation commands (needed e.g. if typemaker2 is used)\n" "-b build targets\n" "-i install files\n" "-c cleanup; delete generated files\n" "-r repeat setup command using the same arguments given to last setup\n" "-d make distribution folder (you need to run tar yourself for now)\n" "-Oname=value specify options (uppercase o, can occur multiple times)\n" "-Bname Only run commands for the given build (mostly used with\n" " 'tm2builder')\n" "-Lname Set loglevel (debug, info, notice, warn, error)\n" "-Cname Crosscompile for given environment (e-g- 'x86_64-w64-mingw32')\n" "-jvalue Use the given number of parallel process for building\n" "--static Generate static libs for InstallLibrary targets\n" "\n" "Please see https://www.aquamaniac.de/rdm/projects/aqbanking/wiki/Gwbuild for\n" "more info and tutorials.\n" ); } gwenhywfar-5.12.1/tools/gwenbuild/utils.h0000664000175000017500000000327314125675317015355 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_UTILS_H #define GWBUILD_UTILS_H #include "gwenbuild/types/project.h" int GWB_Utils_WriteProjectFileList(const GWB_PROJECT *project, const char *fileName); GWB_FILE_LIST2 *GWB_Utils_ReadFileList2(const char *fileName); int GWB_Utils_WriteBuildFileList(const GWENBUILD *gwenbuild, const char *fileName); int GWB_Utils_WriteInstallFileList(const GWB_PROJECT *project, const char *fileName); GWB_KEYVALUEPAIR_LIST *GWB_Utils_ReadInstallFileList(const char *fileName); int GWB_Utils_WriteProjectToFile(const GWB_PROJECT *project, const char *fileName); int GWB_Utils_WriteContextTreeToFile(const GWB_CONTEXT *ctx, const char *fileName); int GWB_Utils_WriteProjectInfoToFile(const GWB_PROJECT *project, const char *fileName); GWEN_XMLNODE *GWB_Utils_ReadProjectInfoFromFile(const char *fileName); int GWB_Utils_BuildFilesChanged(const char *fileName); int GWB_Utils_CopyFile(const char *sSrcPath, const char *sDestPath); int GWB_Utils_VersionStringToDb(GWEN_DB_NODE *db, const char *prefix, const char *s); int GWB_Utils_VersionStringToInt(const char *s); void GWB_Utils_VersionToDbVar(GWEN_DB_NODE *db, const char *dbVarName, int vmajor, int vminor, int vpatchlevel, int vbuild, const char *vtag); #endif gwenhywfar-5.12.1/tools/gwenbuild/filenames.h0000664000175000017500000000163714144206312016144 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_FILENAMES_H #define GWBUILD_C_FILENAMES_H #define GWBUILD_FILE_BUILDFILES ".gwbuild.buildfiles" #define GWBUILD_FILE_CTX ".gwbuild.ctx" #define GWBUILD_FILE_FILES ".gwbuild.files" #define GWBUILD_FILE_PROJECTINFO ".gwbuild.projectinfo" #define GWBUILD_FILE_PROJECT ".gwbuild.project" #define GWBUILD_FILE_INSTALLFILES ".gwbuild.installfiles" #define GWBUILD_FILE_ARGS ".gwbuild.args" #define GWBUILD_FILE_CTXTREE ".gwbuild.ctxtree" #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/0000755000175000017500000000000015032533715015402 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/parser/p_target.h0000664000175000017500000000123614116666046017312 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_TARGET_H #define GWBUILD_PARSER_TARGET_H #include "gwenbuild/types/project.h" #include int GWB_ParseTarget(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkcompiler.h0000664000175000017500000000126314116666046020634 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_CHECKCOMPILER_H #define GWBUILD_PARSER_CHECKCOMPILER_H #include "gwenbuild/types/project.h" #include int GWB_ParseCheckCompiler(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkfunctions.h0000664000175000017500000000126614116666046021035 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_CHECKFUNCTIONS_H #define GWBUILD_PARSER_CHECKFUNCTIONS_H #include "gwenbuild/types/project.h" #include int GWB_ParseCheckFunctions(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_options.h0000664000175000017500000000124014116666046017512 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_OPTIONS_H #define GWBUILD_PARSER_OPTIONS_H #include "gwenbuild/types/project.h" #include int GWB_ParseOption(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/Makefile.in0000644000175000017500000006460015032533615017374 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/parser ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgwb_parser_la_LIBADD = am_libgwb_parser_la_OBJECTS = parser.lo p_buildfiles.lo p_project.lo \ p_checkfunctions.lo p_checkheaders.lo p_checklibs.lo \ p_checkprogs.lo p_checkcompiler.lo p_dependencies.lo \ p_options.lo p_target.lo libgwb_parser_la_OBJECTS = $(am_libgwb_parser_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/p_buildfiles.Plo \ ./$(DEPDIR)/p_checkcompiler.Plo \ ./$(DEPDIR)/p_checkfunctions.Plo \ ./$(DEPDIR)/p_checkheaders.Plo ./$(DEPDIR)/p_checklibs.Plo \ ./$(DEPDIR)/p_checkprogs.Plo ./$(DEPDIR)/p_dependencies.Plo \ ./$(DEPDIR)/p_options.Plo ./$(DEPDIR)/p_project.Plo \ ./$(DEPDIR)/p_target.Plo ./$(DEPDIR)/parser.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwb_parser_la_SOURCES) DIST_SOURCES = $(libgwb_parser_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES = libgwb_parser.la libgwb_parser_la_SOURCES = \ parser.c \ p_buildfiles.c \ p_project.c \ p_checkfunctions.c \ p_checkheaders.c \ p_checklibs.c \ p_checkprogs.c \ p_checkcompiler.c \ p_dependencies.c \ p_options.c \ p_target.c noinst_HEADERS = \ parser.h \ p_buildfiles.h \ p_checkfunctions.h \ p_checkheaders.h \ p_checklibs.h \ p_checkcompiler.h \ p_checkprogs.h \ p_dependencies.h \ p_options.h \ p_project.h \ p_target.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/parser/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwb_parser.la: $(libgwb_parser_la_OBJECTS) $(libgwb_parser_la_DEPENDENCIES) $(EXTRA_libgwb_parser_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgwb_parser_la_OBJECTS) $(libgwb_parser_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_buildfiles.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_checkcompiler.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_checkfunctions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_checkheaders.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_checklibs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_checkprogs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_dependencies.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_options.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_project.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_target.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/p_buildfiles.Plo -rm -f ./$(DEPDIR)/p_checkcompiler.Plo -rm -f ./$(DEPDIR)/p_checkfunctions.Plo -rm -f ./$(DEPDIR)/p_checkheaders.Plo -rm -f ./$(DEPDIR)/p_checklibs.Plo -rm -f ./$(DEPDIR)/p_checkprogs.Plo -rm -f ./$(DEPDIR)/p_dependencies.Plo -rm -f ./$(DEPDIR)/p_options.Plo -rm -f ./$(DEPDIR)/p_project.Plo -rm -f ./$(DEPDIR)/p_target.Plo -rm -f ./$(DEPDIR)/parser.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/p_buildfiles.Plo -rm -f ./$(DEPDIR)/p_checkcompiler.Plo -rm -f ./$(DEPDIR)/p_checkfunctions.Plo -rm -f ./$(DEPDIR)/p_checkheaders.Plo -rm -f ./$(DEPDIR)/p_checklibs.Plo -rm -f ./$(DEPDIR)/p_checkprogs.Plo -rm -f ./$(DEPDIR)/p_dependencies.Plo -rm -f ./$(DEPDIR)/p_options.Plo -rm -f ./$(DEPDIR)/p_project.Plo -rm -f ./$(DEPDIR)/p_target.Plo -rm -f ./$(DEPDIR)/parser.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/parser/p_dependencies.h0000664000175000017500000000126014116666046020447 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_DEPENDENCIES_H #define GWBUILD_PARSER_DEPENDENCIES_H #include "gwenbuild/types/project.h" #include int GWB_ParseDependencies(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_project.c0000664000175000017500000003464714460564441017477 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_project.h" #include "gwenbuild/parser/p_buildfiles.h" #include "gwenbuild/parser/p_checkfunctions.h" #include "gwenbuild/parser/p_checkheaders.h" #include "gwenbuild/parser/p_checklibs.h" #include "gwenbuild/parser/p_checkcompiler.h" #include "gwenbuild/parser/p_checkprogs.h" #include "gwenbuild/parser/p_dependencies.h" #include "gwenbuild/parser/p_options.h" #include "gwenbuild/parser/p_target.h" #include "gwenbuild/utils.h" #include "gwenbuild/parser/parser.h" #include #include static int _parseVersions(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _writeConfigH(const GWB_PROJECT *project); static int _parseDefine(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseI18n(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static void _addTargetForLanguage(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *sLanguage, const char *installPath); static int _setProjectVersionFromString(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars, const char *sVersionString); static void _setProjectVersionFromProjectAttributes(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars, GWEN_XMLNODE *xmlNode); static void _writeProjectVersionToContextDbVars(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars); static void _writeProjectSoVersionToContextDbVars(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars); int GWB_ParseProject(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { const char *s; int rv; GWEN_DB_NODE *db; uint32_t flags=GWEN_DB_FLAGS_OVERWRITE_VARS; db=GWB_Context_GetVars(currentContext); s=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(s && *s)) { DBG_ERROR(NULL, "Project has no name"); return GWEN_ERROR_BAD_DATA; } GWB_Project_SetProjectName(project, s); GWEN_DB_SetCharValue(db, flags, "PACKAGE", s); GWB_Project_SetDefineQuoted(project, "PACKAGE", s); s=GWEN_XMLNode_GetProperty(xmlNode, "write_config_h", "TRUE"); if (s && strcasecmp(s, "TRUE")==0) GWB_Project_AddFlags(project, GWB_PROJECT_FLAGS_CONFIG_H); rv=_parseVersions(project, currentContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } rv=_parseChildNodes(project, currentContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } if (GWB_Project_GetFlags(project) & GWB_PROJECT_FLAGS_CONFIG_H) { int rv; rv=_writeConfigH(project); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error writing config.h, aborting"); return rv; } } return 0; } int _parseVersions(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { const char *s; int rv; GWEN_DB_NODE *dbContextVars; dbContextVars=GWB_Context_GetVars(currentContext); s=GWEN_XMLNode_GetProperty(xmlNode, "version", NULL); if (s && *s) { rv=_setProjectVersionFromString(project, dbContextVars, s); if (rv<0) { DBG_ERROR(NULL, "here (%d)", rv); return GWEN_ERROR_BAD_DATA; } } else _setProjectVersionFromProjectAttributes(project, dbContextVars, xmlNode); _writeProjectVersionToContextDbVars(project, dbContextVars); GWB_Project_SetSoVersion(project, GWEN_XMLNode_GetIntProperty(xmlNode, "so_current", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "so_age", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "so_revision", 0)); _writeProjectSoVersionToContextDbVars(project, dbContextVars); s=GWEN_DB_GetCharValue(dbContextVars, "project_version", 0, NULL); if (s && *s) { GWB_Project_SetDefineQuoted(project, "VERSION", s); } return 0; } void _writeProjectVersionToContextDbVars(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars) { const uint32_t flags=GWEN_DB_FLAGS_OVERWRITE_VARS; const char *s; GWEN_DB_SetCharValue(dbContextVars, flags, "project_name", GWB_Project_GetProjectName(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_vmajor", GWB_Project_GetVersionMajor(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_vminor", GWB_Project_GetVersionMinor(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_vpatchlevel", GWB_Project_GetVersionPatchlevel(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_vbuild", GWB_Project_GetVersionBuild(project)); s=GWB_Project_GetVersionTag(project); if (s && *s) GWEN_DB_SetCharValue(dbContextVars, flags, "project_vtag", s); s=GWEN_DB_GetCharValue(dbContextVars, "project_version", 0, NULL); if (s && *s) { GWEN_DB_SetCharValue(dbContextVars, flags, "VERSION", s); } } void _writeProjectSoVersionToContextDbVars(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars) { const uint32_t flags=GWEN_DB_FLAGS_OVERWRITE_VARS; GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_so_current", GWB_Project_GetSoVersionCurrent(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_so_age", GWB_Project_GetSoVersionAge(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_so_revision", GWB_Project_GetSoVersionRevision(project)); GWEN_DB_SetCharValueFromInt(dbContextVars, flags, "project_so_effective", GWB_Project_GetSoVersionCurrent(project)-GWB_Project_GetSoVersionAge(project)); } int _setProjectVersionFromString(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars, const char *sVersionString) { int rv; const uint32_t flags=GWEN_DB_FLAGS_OVERWRITE_VARS; GWEN_DB_NODE *versionDb; GWEN_DB_SetCharValue(dbContextVars, flags, "project_version", sVersionString); versionDb=GWEN_DB_Group_new("versionDb"); rv=GWB_Utils_VersionStringToDb(versionDb, NULL, sVersionString); if (rv<0) { DBG_ERROR(NULL, "Invalid version string [%s]", sVersionString); GWEN_DB_Group_free(versionDb); return GWEN_ERROR_BAD_DATA; } GWB_Project_SetVersion(project, GWEN_DB_GetIntValue(versionDb, "vmajor", 0, 0), GWEN_DB_GetIntValue(versionDb, "vminor", 0, 0), GWEN_DB_GetIntValue(versionDb, "vpatchlevel", 0, 0), GWEN_DB_GetIntValue(versionDb, "vbuild", 0, 0), GWEN_DB_GetCharValue(versionDb, "vtag", 0, NULL)); GWEN_DB_Group_free(versionDb); return 0; } void _setProjectVersionFromProjectAttributes(GWB_PROJECT *project, GWEN_DB_NODE *dbContextVars, GWEN_XMLNODE *xmlNode) { GWB_Project_SetVersion(project, GWEN_XMLNode_GetIntProperty(xmlNode, "vmajor", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "vminor", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "vpatchlevel", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "vbuild", 0), GWEN_XMLNode_GetProperty(xmlNode, "vtag", NULL)); GWB_Utils_VersionToDbVar(dbContextVars, "project_version", GWB_Project_GetVersionMajor(project), GWB_Project_GetVersionMinor(project), GWB_Project_GetVersionPatchlevel(project), GWB_Project_GetVersionBuild(project), GWB_Project_GetVersionTag(project)); } int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; DBG_DEBUG(NULL, "- Reading child node"); name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "option")==0) rv=GWB_ParseOption(project, currentContext, n); else if (strcasecmp(name, "dependencies")==0) rv=GWB_ParseDependencies(project, currentContext, n); else if (strcasecmp(name, "checkheaders")==0) rv=GWB_ParseCheckHeaders(project, currentContext, n); else if (strcasecmp(name, "checkfunctions")==0) rv=GWB_ParseCheckFunctions(project, currentContext, n); else if (strcasecmp(name, "checklibs")==0) rv=GWB_ParseCheckLibs(project, currentContext, n); else if (strcasecmp(name, "checkprogs")==0) rv=GWB_ParseCheckProgs(project, currentContext, n); else if (strcasecmp(name, "checkCompiler")==0) rv=GWB_ParseCheckCompiler(project, currentContext, n); else if (strcasecmp(name, "target")==0) rv=GWB_ParseTarget(project, currentContext, n); else if (strcasecmp(name, "define")==0) rv=_parseDefine(project, currentContext, n); else if (strcasecmp(name, "i18n")==0) rv=_parseI18n(project, currentContext, n); else if (strcasecmp(name, "buildFiles")==0) rv=GWB_ParseBuildFiles(project, currentContext, n); else if (strcasecmp(name, "extradist")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST, NULL, NULL); else if (strcasecmp(name, "data")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST, NULL, NULL); else if (strcasecmp(name, "i18n")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST, "po", "msgfmt"); else if (strcasecmp(name, "subdirs")==0) rv=GWB_Parser_ParseSubdirs(project, currentContext, n, _parseChildNodes); else rv=GWB_Parser_ParseWellKnownElements(project, currentContext, n, _parseChildNodes); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _writeConfigH(const GWB_PROJECT *project) { GWB_KEYVALUEPAIR_LIST *defineList; GWEN_BUFFER *fileBuffer; int rv; defineList=GWB_Project_GetDefineList(project); fileBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fileBuffer, "/* config.h generated by gwenbuild */\n\n"); if (defineList) GWB_KeyValuePair_List_WriteAllPairsToBuffer(defineList, "#define ", " ", "\n", fileBuffer); GWEN_Buffer_AppendString(fileBuffer, "\n"); unlink("config.h"); rv=GWEN_SyncIo_Helper_WriteFile("config.h", (const uint8_t*)GWEN_Buffer_GetStart(fileBuffer), GWEN_Buffer_GetUsedBytes(fileBuffer)); if (rv<0) { DBG_ERROR(NULL, "Could not write \"config.h\" (%d)", rv); GWEN_Buffer_free(fileBuffer); return rv; } GWEN_Buffer_free(fileBuffer); return 0; } int _parseDefine(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; const char *varName; const char *value; const char *quoted; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } quoted=GWEN_XMLNode_GetProperty(xmlNode, "quoted", "FALSE"); varName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); value=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (!(varName && *varName)) { DBG_ERROR(NULL, "Missing variable name in DEFINE"); return GWEN_ERROR_GENERIC; } if (quoted && strcasecmp(quoted, "TRUE")==0) GWB_Project_SetDefineQuoted(project, varName, value); else GWB_Project_SetDefine(project, varName, value); return 0; } int _parseI18n(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { if (GWEN_DB_GetCharValue(GWB_Context_GetVars(currentContext), "GWBUILD_TOOL_MSGFMT", 0, NULL)) { GWEN_STRINGLIST *sl; const char *installPath; installPath=GWEN_XMLNode_GetProperty(xmlNode, "install", NULL); sl=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { fprintf(stderr, "Adding language catalog \"%s\"\n", s); _addTargetForLanguage(project, currentContext, s, installPath); } se=GWEN_StringListEntry_Next(se); } } } else { DBG_WARN(NULL, "Tool msgfmt missing, not creating language catalogs"); } return 0; } void _addTargetForLanguage(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *sLanguage, const char *installPath) { GWEN_BUFFER *fileNameBuffer; GWEN_BUFFER *installPathBuffer=NULL; GWB_TARGET *target; fileNameBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fileNameBuffer, sLanguage); GWEN_Buffer_AppendString(fileNameBuffer, ".po"); if (!(installPath && *installPath)) installPath=GWEN_DB_GetCharValue(GWB_Context_GetVars(currentContext), "localedir", 0, NULL); if (installPath && *installPath) { installPathBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(installPathBuffer, installPath); GWEN_Buffer_AppendString(installPathBuffer, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(installPathBuffer, sLanguage); GWEN_Buffer_AppendString(installPathBuffer, GWEN_DIR_SEPARATOR_S "LC_MESSAGES"); } target=GWB_Parser_AddTargetForSourceFile(project, currentContext, GWBUILD_TargetType_I18nCatalog, GWEN_Buffer_GetStart(fileNameBuffer), "po", "msgfmt", installPathBuffer?GWEN_Buffer_GetStart(installPathBuffer):NULL); GWEN_Buffer_Reset(fileNameBuffer); GWEN_Buffer_AppendString(fileNameBuffer, GWB_Project_GetProjectName(project)); GWEN_Buffer_AppendString(fileNameBuffer, ".mo"); GWB_Target_SetInstallName(target, GWEN_Buffer_GetStart(fileNameBuffer)); GWEN_Buffer_free(installPathBuffer); GWEN_Buffer_free(fileNameBuffer); } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checklibs.h0000664000175000017500000000124714116666046017755 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_CHECKLIBS_H #define GWBUILD_PARSER_CHECKLIBS_H #include "gwenbuild/types/project.h" #include int GWB_ParseCheckLibs(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_buildfiles.h0000664000175000017500000000125214116666046020144 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_BUILDFILES_H #define GWBUILD_PARSER_BUILDFILES_H #include "gwenbuild/types/project.h" #include int GWB_ParseBuildFiles(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/Makefile.am0000664000175000017500000000107714125675316017373 00000000000000INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES=libgwb_parser.la libgwb_parser_la_SOURCES=\ parser.c \ p_buildfiles.c \ p_project.c \ p_checkfunctions.c \ p_checkheaders.c \ p_checklibs.c \ p_checkprogs.c \ p_checkcompiler.c \ p_dependencies.c \ p_options.c \ p_target.c noinst_HEADERS=\ parser.h \ p_buildfiles.h \ p_checkfunctions.h \ p_checkheaders.h \ p_checklibs.h \ p_checkcompiler.h \ p_checkprogs.h \ p_dependencies.h \ p_options.h \ p_project.h \ p_target.h gwenhywfar-5.12.1/tools/gwenbuild/parser/parser.c0000664000175000017500000007607514460564441017007 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/parser.h" #include "gwenbuild/parser/p_project.h" #include "gwenbuild/utils.h" #include #include #include #include #include #include #include #include #include #include #include /* for stat, chmod */ #include #include static GWEN_BUFFER *_getSourcePathForFileName(const GWB_CONTEXT *currentContext, const char *fileName); static void _addBuildFileNameToGwBuild(GWENBUILD *gwbuild, const GWB_CONTEXT *currentContext, const char *fileName); static int _getAndCheckRequiredGwenVersion(GWEN_XMLNODE *xmlGwbuildNode); static int _parseSubdir(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *sFolder, GWB_PARSER_PARSE_ELEMENT_FN fn); static int _parseSetVar(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseIfVarMatches(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn); static int _parseIfNotVarMatches(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn); static int _parseIfVarHasValue(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn); static int _parseIfNotVarHasValue(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn); static int _varHasValue(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseWriteFile(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _readModifyWriteFile(GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbContextVars, const char *sSourceFile, const char *sDestFile); static void _appendVarValue(GWEN_DB_NODE *db, const char *name, const char *newValue); static int _getFilePermissions(const char *fname); static int _setFilePermissions(const char *fname, int perms); GWB_PROJECT *GWB_Parser_ReadBuildTree(GWENBUILD *gwbuild, GWB_CONTEXT *currentContext, const char *srcDir, GWB_KEYVALUEPAIR_LIST *givenOptionList) { GWEN_XMLNODE *xmlNewFile; GWEN_XMLNODE *xmlProject; GWB_PROJECT *project; GWB_FILE *file; GWEN_DB_NODE *db; int rv; GWB_Context_SetInitialSourceDir(currentContext, srcDir); GWB_Context_SetTopSourceDir(currentContext, srcDir); GWB_Context_SetCurrentSourceDir(currentContext, srcDir); db=GWB_Context_GetVars(currentContext); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "topbuilddir", "."); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "topsrcdir", srcDir); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "builddir", "."); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "srcdir", srcDir); xmlNewFile=GWB_Parser_ReadBuildFile(gwbuild, currentContext, GWB_PARSER_FILENAME); if (xmlNewFile==NULL) { DBG_ERROR(NULL, "No valid node found in build file of folder \"%s\"", srcDir); return NULL; } xmlProject=GWEN_XMLNode_FindFirstTag(xmlNewFile, "project", NULL, NULL); if (xmlProject==NULL) { DBG_ERROR(NULL, "No project node found in build file of folder \"%s\"", srcDir); GWEN_XMLNode_free(xmlNewFile); return NULL; } project=GWB_Project_new(gwbuild, currentContext); file=GWB_File_List2_GetOrCreateFile(GWB_Project_GetFileList(project), GWB_Context_GetCurrentRelativeDir(currentContext), GWB_PARSER_FILENAME); GWB_File_AddFlags(file, GWB_FILE_FLAGS_DIST); if (givenOptionList) GWB_Project_SetGivenOptionList(project, givenOptionList); rv=GWB_ParseProject(project, currentContext, xmlProject); if (rv<0) { DBG_ERROR(NULL, "Error parsing build tree in folder \"%s\"", srcDir); GWB_Project_free(project); GWEN_XMLNode_free(xmlNewFile); return NULL; } GWEN_XMLNode_free(xmlNewFile); return project; } GWB_CONTEXT *GWB_Parser_CopyContextForSubdir(const GWB_CONTEXT *sourceContext, const char *folder) { GWB_CONTEXT *newContext; GWEN_DB_NODE *db; newContext=GWB_Context_dup(sourceContext); GWB_Context_AddCurrentRelativeDir(newContext, folder); GWB_Context_InsertTopBuildDir(newContext, ".."); GWB_Context_InsertTopSourceDir(newContext, ".."); GWB_Context_AddCurrentBuildDir(newContext, folder); GWB_Context_InsertCurrentSourceDir(newContext, ".."); GWB_Context_AddCurrentSourceDir(newContext, folder); GWB_Context_ClearSourceFileList2(newContext); GWB_Context_ClearIncludeList(newContext); GWB_Context_ClearDefineList(newContext); db=GWB_Context_GetVars(newContext); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "topbuilddir", GWB_Context_GetTopBuildDir(newContext)); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "topsrcdir", GWB_Context_GetTopSourceDir(newContext)); //GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "builddir", GWB_Context_GetCurrentBuildDir(newContext)); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "builddir", "."); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "srcdir", GWB_Context_GetCurrentSourceDir(newContext)); GWEN_DB_DeleteGroup(db, "local"); return newContext; } GWB_CONTEXT *GWB_Parser_CopyContextForTarget(const GWB_CONTEXT *sourceContext) { GWB_CONTEXT *newContext; newContext=GWB_Context_dup(sourceContext); GWB_Context_ClearSourceFileList2(newContext); GWB_Context_ClearIncludeList(newContext); GWB_Context_ClearDefineList(newContext); return newContext; } GWEN_XMLNODE *GWB_Parser_ReadBuildFile(GWENBUILD *gwbuild, const GWB_CONTEXT *currentContext, const char *fileName) { GWEN_BUFFER *fileNameBuf; int rv; GWEN_XMLNODE *xmlDocNode; GWEN_XMLNODE *xmlGwbuildNode; fileNameBuf=_getSourcePathForFileName(currentContext, fileName); xmlDocNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); DBG_DEBUG(NULL, "Reading file %s", GWEN_Buffer_GetStart(fileNameBuf)); rv=GWEN_XML_ReadFile(xmlDocNode, GWEN_Buffer_GetStart(fileNameBuf), GWEN_XML_FLAGS_DEFAULT); if (rv<0) { DBG_ERROR(NULL, "Error in XML file \"%s\" (%d)", GWEN_Buffer_GetStart(fileNameBuf), rv); GWEN_Buffer_free(fileNameBuf); return NULL; } xmlGwbuildNode=GWEN_XMLNode_FindFirstTag(xmlDocNode, "gwbuild", NULL, NULL); if (xmlGwbuildNode==NULL) { DBG_ERROR(NULL, "File \"%s\" does not contain an \"gwbuild\" element", GWEN_Buffer_GetStart(fileNameBuf)); GWEN_XMLNode_free(xmlDocNode); GWEN_Buffer_free(fileNameBuf); return NULL; } rv=_getAndCheckRequiredGwenVersion(xmlGwbuildNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_XMLNode_free(xmlDocNode); GWEN_Buffer_free(fileNameBuf); return NULL; } _addBuildFileNameToGwBuild(gwbuild, currentContext, fileName); GWEN_XMLNode_UnlinkChild(xmlDocNode, xmlGwbuildNode); GWEN_XMLNode_free(xmlDocNode); GWEN_Buffer_free(fileNameBuf); return xmlGwbuildNode; } GWEN_BUFFER *_getSourcePathForFileName(const GWB_CONTEXT *currentContext, const char *fileName) { GWEN_BUFFER *fileNameBuf; const char *s; fileNameBuf=GWEN_Buffer_new(0, 256, 0, 1); s=GWB_Context_GetCurrentSourceDir(currentContext); if (s && *s) { GWEN_Buffer_AppendString(fileNameBuf, s); GWEN_Buffer_AppendString(fileNameBuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(fileNameBuf, fileName); return fileNameBuf; } void _addBuildFileNameToGwBuild(GWENBUILD *gwbuild, const GWB_CONTEXT *currentContext, const char *fileName) { GWEN_BUFFER *buildFilenameBuffer; const char *buildDir; const char *initialSourceDir; initialSourceDir=GWB_Context_GetInitialSourceDir(currentContext); buildDir=GWB_Context_GetCurrentBuildDir(currentContext); buildFilenameBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buildFilenameBuffer, initialSourceDir); if (buildDir) { GWEN_Buffer_AppendString(buildFilenameBuffer, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buildFilenameBuffer, buildDir); } GWEN_Buffer_AppendString(buildFilenameBuffer, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(buildFilenameBuffer, fileName); GWBUILD_AddBuildFilename(gwbuild, GWEN_Buffer_GetStart(buildFilenameBuffer)); GWEN_Buffer_free(buildFilenameBuffer); } int _getAndCheckRequiredGwenVersion(GWEN_XMLNODE *xmlGwbuildNode) { const char *s; s=GWEN_XMLNode_GetProperty(xmlGwbuildNode, "requiredVersion", NULL); if (s && *s) { int vRequired; int vCurrent; vCurrent=(int) ((GWENHYWFAR_VERSION_MAJOR<<24)+ (GWENHYWFAR_VERSION_MINOR<<16)+ (GWENHYWFAR_VERSION_PATCHLEVEL<<8)+ (GWENHYWFAR_VERSION_BUILD)); vRequired=GWB_Utils_VersionStringToInt(s); if (vRequired<0) { DBG_ERROR(NULL, "Invalid required version \"%s\"", s); return GWEN_ERROR_GENERIC; } if (vCurrent"); return GWEN_ERROR_GENERIC; } if (GWEN_XMLNode_GetProperty(xmlNode, "value", NULL)) { DBG_WARN(NULL, "%s: Please dont use property \"value\", just store the value between and ", sName); } sMode=GWEN_XMLNode_GetProperty(xmlNode, "mode", "replace"); buf=GWB_Parser_ReadXmlDataIntoBufferAndExpand(GWB_Context_GetVars(currentContext), xmlNode); if (buf && GWEN_Buffer_GetUsedBytes(buf)) { if (strcasecmp(sMode, "replace")==0) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, sName, GWEN_Buffer_GetStart(buf)); else if (strcasecmp(sMode, "add")==0) GWEN_DB_SetCharValue(db, 0, sName, GWEN_Buffer_GetStart(buf)); else if (strcasecmp(sMode, "append")==0) _appendVarValue(db, sName, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } else { if (strcasecmp(sMode, "replace")==0) { GWEN_DB_DeleteVar(db, sName); } } return 0; } int _parseIfVarMatches(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWB_PARSER_PARSE_ELEMENT_FN fn) { const char *sName; const char *sPattern; const char *sValueInDb; GWEN_DB_NODE *db; GWEN_XMLNODE *xmlThen; GWEN_XMLNODE *xmlElse; int rv; xmlThen=GWEN_XMLNode_FindFirstTag(xmlNode, "then", NULL, NULL); xmlElse=GWEN_XMLNode_FindFirstTag(xmlNode, "else", NULL, NULL); db=GWB_Context_GetVars(currentContext); sName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(sName && *sName)) { DBG_ERROR(NULL, "No name for "); return GWEN_ERROR_GENERIC; } sPattern=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (!(sPattern && *sPattern)) { DBG_ERROR(NULL, "No value for "); return GWEN_ERROR_GENERIC; } sValueInDb=GWEN_DB_GetCharValue(db, sName, 0, NULL); if (!(sValueInDb && *sValueInDb)) { DBG_ERROR(NULL, "No value for \"%s\" in db for ", sName); return GWEN_ERROR_GENERIC; } if (-1!=GWEN_Text_ComparePattern(sValueInDb, sPattern, 0)) { rv=fn(project, currentContext, xmlThen?xmlThen:xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } else { if (xmlElse) { rv=fn(project, currentContext, xmlElse); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } } return 0; } int _parseIfNotVarMatches(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWB_PARSER_PARSE_ELEMENT_FN fn) { const char *sName; const char *sPattern; const char *sValueInDb; GWEN_DB_NODE *db; GWEN_XMLNODE *xmlThen; GWEN_XMLNODE *xmlElse; int rv; xmlThen=GWEN_XMLNode_FindFirstTag(xmlNode, "then", NULL, NULL); xmlElse=GWEN_XMLNode_FindFirstTag(xmlNode, "else", NULL, NULL); db=GWB_Context_GetVars(currentContext); sName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(sName && *sName)) { DBG_ERROR(NULL, "No name for "); return GWEN_ERROR_GENERIC; } sPattern=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (!(sPattern && *sPattern)) { DBG_ERROR(NULL, "No value for "); return GWEN_ERROR_GENERIC; } sValueInDb=GWEN_DB_GetCharValue(db, sName, 0, NULL); if (!(sValueInDb && *sValueInDb)) { DBG_ERROR(NULL, "No value for \"%s\" in db for ", sName); return GWEN_ERROR_GENERIC; } if (-1==GWEN_Text_ComparePattern(sValueInDb, sPattern, 0)) { rv=fn(project, currentContext, xmlThen?xmlThen:xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } else { if (xmlElse) { rv=fn(project, currentContext, xmlElse); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } } return 0; } int _parseIfVarHasValue(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWB_PARSER_PARSE_ELEMENT_FN fn) { int rv; GWEN_XMLNODE *xmlThen; GWEN_XMLNODE *xmlElse; xmlThen=GWEN_XMLNode_FindFirstTag(xmlNode, "then", NULL, NULL); xmlElse=GWEN_XMLNode_FindFirstTag(xmlNode, "else", NULL, NULL); rv=_varHasValue(currentContext, xmlNode); if (rv<0) return rv; if (rv) { return fn(project, currentContext, xmlThen?xmlThen:xmlNode); } else { if (xmlElse) return fn(project, currentContext, xmlElse); } return 0; } int _parseIfNotVarHasValue(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWB_PARSER_PARSE_ELEMENT_FN fn) { int rv; GWEN_XMLNODE *xmlThen; GWEN_XMLNODE *xmlElse; xmlThen=GWEN_XMLNode_FindFirstTag(xmlNode, "then", NULL, NULL); xmlElse=GWEN_XMLNode_FindFirstTag(xmlNode, "else", NULL, NULL); rv=_varHasValue(currentContext, xmlNode); if (rv<0) return rv; if (rv==0) { return fn(project, currentContext, xmlThen?xmlThen:xmlNode); } else { if (xmlElse) return fn(project, currentContext, xmlElse); } return 0; } int _varHasValue(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { const char *sName; const char *sPattern; GWEN_DB_NODE *db; int i; db=GWB_Context_GetVars(currentContext); sName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(sName && *sName)) { DBG_ERROR(NULL, "No name for "); return GWEN_ERROR_GENERIC; } sPattern=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (!(sPattern && *sPattern)) { DBG_ERROR(NULL, "No value for "); return GWEN_ERROR_GENERIC; } for (i=0; i<100; i++) { const char *sValueInDb; sValueInDb=GWEN_DB_GetCharValue(db, sName, i, NULL); if (!sValueInDb) break; if (-1!=GWEN_Text_ComparePattern(sValueInDb, sPattern, 0)) return 1; } return 0; } int _parseWriteFile(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { const char *fileName; GWEN_BUFFER *fileNameBuffer; GWB_FILE *file; const char *installPath; int rv; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } fileName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(fileName && *fileName)) { DBG_ERROR(NULL, "No name for "); return GWEN_ERROR_GENERIC; } installPath=GWEN_XMLNode_GetProperty(xmlNode, "install", NULL); fileNameBuffer=_getSourcePathForFileName(currentContext, fileName); GWEN_Buffer_AppendString(fileNameBuffer, ".in"); rv=_readModifyWriteFile(xmlNode, GWB_Context_GetVars(currentContext), GWEN_Buffer_GetStart(fileNameBuffer), fileName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(fileNameBuffer); return rv; } /* add output file */ file=GWB_File_List2_GetOrCreateFile(GWB_Project_GetFileList(project), GWB_Context_GetCurrentRelativeDir(currentContext), fileName); GWB_File_AddFlags(file, GWB_FILE_FLAGS_GENERATED); if (installPath && *installPath) { GWB_File_AddFlags(file, GWB_FILE_FLAGS_INSTALL); GWB_File_SetInstallPath(file, installPath); } /* add input file */ GWEN_Buffer_Reset(fileNameBuffer); GWEN_Buffer_AppendString(fileNameBuffer, fileName); GWEN_Buffer_AppendString(fileNameBuffer, ".in"); file=GWB_File_List2_GetOrCreateFile(GWB_Project_GetFileList(project), GWB_Context_GetCurrentRelativeDir(currentContext), GWEN_Buffer_GetStart(fileNameBuffer)); GWB_File_AddFlags(file, GWB_FILE_FLAGS_DIST); GWEN_Buffer_free(fileNameBuffer); return 0; } int _readModifyWriteFile(GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbContextVars, const char *sSourceFile, const char *sDestFile) { const char *fileName; GWEN_BUFFER *fileBufferIn; GWEN_BUFFER *fileBufferOut; int sourceFilePerms; int rv; fileName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(fileName && *fileName)) { DBG_ERROR(NULL, "No name for "); return GWEN_ERROR_GENERIC; } rv=_getFilePermissions(sSourceFile); if (rv<0) { DBG_ERROR(NULL, "Could not read permissions for \"%s\" (%d)", sSourceFile, rv); return rv; } sourceFilePerms=rv; fileBufferIn=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_SyncIo_Helper_ReadFile(sSourceFile, fileBufferIn); if (rv<0) { DBG_ERROR(NULL, "Could not read \"%s\" (%d)", sSourceFile, rv); GWEN_Buffer_free(fileBufferIn); return rv; } fileBufferOut=GWEN_Buffer_new(0, 256, 0, 1); rv=GWB_Parser_ReplaceVarsBetweenAtSigns(GWEN_Buffer_GetStart(fileBufferIn), fileBufferOut, dbContextVars); GWEN_Buffer_free(fileBufferIn); if (rv<0) { DBG_ERROR(NULL, "Error translating content of file \"%s\" (%d)", sSourceFile, rv); GWEN_Buffer_free(fileBufferOut); return rv; } unlink(sDestFile); rv=GWEN_SyncIo_Helper_WriteFile(sDestFile, (const uint8_t*)GWEN_Buffer_GetStart(fileBufferOut), GWEN_Buffer_GetUsedBytes(fileBufferOut)); GWEN_Buffer_free(fileBufferOut); if (rv<0) { DBG_ERROR(NULL, "Could not write \"%s\" (%d)", sDestFile, rv); return rv; } rv=_setFilePermissions(sDestFile, sourceFilePerms); if (rv<0) { DBG_ERROR(NULL, "Could not set perms for \"%s\" (%d)", sDestFile, rv); return rv; } return 0; } int _getFilePermissions(const char *fname) { struct stat st; int rv; #if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED rv=lstat(fname, &st); #else rv=stat(fname, &st); #endif if (rv == -1) { DBG_ERROR(NULL, "Error on stat(\"%s\"): %d (%s)", fname, errno, strerror(errno)); return GWEN_ERROR_IO; } return (int)((st.st_mode & ~S_IFMT)); } int _setFilePermissions(const char *fname, int perms) { if (chmod(fname, perms) == -1) { DBG_ERROR(NULL, "Error on chmod(\"%s\"): %d (%s)", fname, errno, strerror(errno)); return GWEN_ERROR_IO; } return 0; } void _appendVarValue(GWEN_DB_NODE *db, const char *name, const char *newValue) { const char *s; s=GWEN_DB_GetCharValue(db, name, 0, NULL); if (s && *s) { GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, s); GWEN_Buffer_AppendString(buf, " "); GWEN_Buffer_AppendString(buf, newValue); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, name, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } else GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, name, newValue); } void GWB_Parser_SetItemValue(GWEN_DB_NODE *db, const char *sId, const char *suffix, const char *value) { GWEN_BUFFER *varNameBuffer; varNameBuffer=GWEN_Buffer_new(0, 64, 0, 1); GWEN_Buffer_AppendString(varNameBuffer, sId); GWEN_Buffer_AppendString(varNameBuffer, suffix); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_Buffer_GetStart(varNameBuffer), value); GWEN_Buffer_free(varNameBuffer); } int GWB_Parser_ReplaceVarsBetweenAtSigns(const char *s, GWEN_BUFFER *dbuf, GWEN_DB_NODE *db) { const char *p; #if 0 DBG_ERROR(NULL, "Using vars:"); GWEN_DB_Dump(db, 2); #endif p=s; while (*p) { if (*p=='@') { p++; if (*p=='@') GWEN_Buffer_AppendByte(dbuf, '@'); else if (!isalpha(*p)) { GWEN_Buffer_AppendByte(dbuf, '@'); GWEN_Buffer_AppendByte(dbuf, *p); } else { const char *pStart; pStart=p; while (*p && *p!='@' && (isalnum(*p) || *p=='_')) p++; if (*p=='@') { int len; char *rawName; const char *value; len=p-pStart; if (len<1) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty variable name in code"); return GWEN_ERROR_BAD_DATA; } rawName=(char *) malloc(len+1); assert(rawName); memmove(rawName, pStart, len); rawName[len]=0; /*DBG_ERROR(NULL, "Setting data from variable \"%s\"", rawName);*/ value=GWEN_DB_GetCharValue(db, rawName, 0, NULL); if (value) GWEN_Buffer_AppendString(dbuf, value); else { DBG_WARN(NULL, "Warning: Empty value for DB var \"%s\"", rawName); } free(rawName); } else { DBG_INFO(GWEN_LOGDOMAIN, "Not interpreting at sign as start of variable name, adding to output."); p=pStart; GWEN_Buffer_AppendByte(dbuf, '@'); GWEN_Buffer_AppendByte(dbuf, *p); } } p++; } else { GWEN_Buffer_AppendByte(dbuf, *p); p++; } } return 0; } int GWB_Parser_ParseWellKnownElements(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "writeFile")==0) rv=_parseWriteFile(project, currentContext, n); else if (strcasecmp(name, "setVar")==0) rv=_parseSetVar(currentContext, n); else if (strcasecmp(name, "ifVarMatches")==0) rv=_parseIfVarMatches(project, currentContext, n, fn); else if (strcasecmp(name, "ifNotVarMatches")==0) rv=_parseIfNotVarMatches(project, currentContext, n, fn); else if (strcasecmp(name, "ifVarHasValue")==0) rv=_parseIfVarHasValue(project, currentContext, n, fn); else if (strcasecmp(name, "ifNotVarHasValue")==0) rv=_parseIfNotVarHasValue(project, currentContext, n, fn); else { DBG_DEBUG(NULL, "Element not handled here, ignoring"); rv=1; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } return 0; } int GWB_Parser_ParseSourcesOrHeaders(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, /*int alwaysDist, int isSource,*/ uint32_t fileFlags, const char *defaultTypeName, const char *defaultBuilder) { uint32_t flags=0; int rv; const char *s; const char *installPath; const char *fileType; const char *currentFolder; const char *builder; GWEN_STRINGLIST *fileNameList; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } currentFolder=GWB_Context_GetCurrentRelativeDir(currentContext); fileType=GWEN_XMLNode_GetProperty(xmlNode, "type", defaultTypeName); builder=GWEN_XMLNode_GetProperty(xmlNode, "builder", defaultBuilder); installPath=GWEN_XMLNode_GetProperty(xmlNode, "install", NULL); if (installPath && *installPath) flags|=GWB_FILE_FLAGS_INSTALL; s=GWEN_XMLNode_GetProperty(xmlNode, "generated", "FALSE"); if (s && *s && (strcasecmp(s, "true")==0 || strcasecmp(s, "yes")==0)) flags|=GWB_FILE_FLAGS_GENERATED; s=GWEN_XMLNode_GetProperty(xmlNode, "dist", (fileFlags & GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST)?"TRUE":"FALSE"); if (s && *s && (strcasecmp(s, "true")==0 || strcasecmp(s, "yes")==0)) flags|=GWB_FILE_FLAGS_DIST; fileNameList=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (fileNameList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(fileNameList); while(se) { const char *sFileName; sFileName=GWEN_StringListEntry_Data(se); if (sFileName && *sFileName) { GWB_FILE *file; file=GWB_File_List2_GetOrCreateFile(GWB_Project_GetFileList(project), currentFolder, sFileName); GWB_File_AddFlags(file, flags); if (installPath) GWB_File_SetInstallPath(file, installPath); if (fileType) GWB_File_SetFileType(file, fileType); if (builder) GWB_File_SetBuilder(file, builder); if (fileFlags & GWB_PARSER_SRCFILEFLAGS_ISSOURCE) GWB_Context_AddSourceFile(currentContext, file); } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(fileNameList); } return 0; } GWB_TARGET *GWB_Parser_AddTargetForSourceFile(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWBUILD_TARGETTYPE targetType, const char *fileName, const char *fileType, const char *builderName, const char *installPath) { GWB_TARGET *target; GWB_CONTEXT *newContext; GWB_FILE *file; const char *currentFolder; currentFolder=GWB_Context_GetCurrentRelativeDir(currentContext); target=GWB_Target_new(project); GWB_Target_SetName(target, fileName); GWB_Target_SetId(target, fileName); GWB_Target_SetTargetType(target, targetType); newContext=GWB_Parser_CopyContextForTarget(currentContext); GWB_Context_SetCurrentTarget(newContext, target); GWB_Target_SetContext(target, newContext); GWB_Project_AddTarget(project, target); GWB_Context_Tree2_AddChild(currentContext, newContext); file=GWB_File_List2_GetOrCreateFile(GWB_Project_GetFileList(project), currentFolder, fileName); GWB_File_AddFlags(file, GWB_FILE_FLAGS_DIST); GWB_File_SetFileType(file, fileType); GWB_File_SetBuilder(file, builderName); if (installPath && *installPath) GWB_Target_SetInstallPath(target, installPath); GWB_Context_AddSourceFile(newContext, file); return target; } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkheaders.h0000664000175000017500000000126014116666046020432 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_CHECKHEADERS_H #define GWBUILD_PARSER_CHECKHEADERS_H #include "gwenbuild/types/project.h" #include int GWB_ParseCheckHeaders(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkprogs.h0000664000175000017500000000125214116666046020152 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_CHECKPROGS_H #define GWBUILD_PARSER_CHECKPROGS_H #include "gwenbuild/types/project.h" #include int GWB_ParseCheckProgs(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_dependencies.c0000664000175000017500000002345614465133476020460 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_dependencies.h" #include "gwenbuild/parser/parser.h" #include #include #include #include #include #include static int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseDep(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _checkVersion(GWEN_DB_NODE *db, const char *sId, const char *sName, const char *sMinVersion, const char *sMaxVersion); static int _retrieveCflags(GWEN_DB_NODE *db, const char *sId, const char *sName); static int _retrieveLdflags(GWEN_DB_NODE *db, const char *sId, const char *sName); static int _callPkgConfig(GWEN_DB_NODE *db, const char *sId, const char *sName, const char *suffix, const char *args); static void _replaceControlCharsWithBlanks(char *ptr); static int _retrieveVariables(GWB_CONTEXT *currentContext, GWEN_DB_NODE *db, const char *sId, const char *sName, GWEN_XMLNODE *xmlNode); static int _retrieveVariable(GWEN_DB_NODE *db, const char *sId, const char *sName, const char *variableName); int GWB_ParseDependencies(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; rv=_parseChildNodes(project, currentContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "subdirs")==0) rv=GWB_Parser_ParseSubdirs(project, currentContext, n, _parseChildNodes); else if (strcasecmp(name, "dep")==0) rv=_parseDep(currentContext, n); else rv=GWB_Parser_ParseWellKnownElements(project, currentContext, n, _parseChildNodes); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _parseDep(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; const char *s; const char *sId; const char *sName; const char *sMinVersion; const char *sMaxVersion; int required; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } sId=GWEN_XMLNode_GetProperty(xmlNode, "prefix", NULL); if (!(sId && *sId)) sId=GWEN_XMLNode_GetProperty(xmlNode, "id", NULL); sName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(sName && *sName)) { DBG_ERROR(NULL, "Dependency has no name"); return GWEN_ERROR_GENERIC; } if (!(sId && *sId)) /* use name if no id/prefix given */ sId=sName; s=GWEN_XMLNode_GetProperty(xmlNode, "required", "FALSE"); required=(strcasecmp(s, "TRUE")==0)?1:0; sMinVersion=GWEN_XMLNode_GetProperty(xmlNode, "minversion", NULL); sMaxVersion=GWEN_XMLNode_GetProperty(xmlNode, "maxversion", NULL); rv=_checkVersion(GWB_Context_GetVars(currentContext), sId, sName, sMinVersion, sMaxVersion); if (rv==0) { GWEN_XMLNODE *n; rv=_retrieveCflags(GWB_Context_GetVars(currentContext), sId, sName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } rv=_retrieveLdflags(GWB_Context_GetVars(currentContext), sId, sName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } n=GWEN_XMLNode_FindFirstTag(xmlNode, "variables", NULL, NULL); if (n) { rv=_retrieveVariables(currentContext, GWB_Context_GetVars(currentContext), sId, sName, n); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } } else if (rv==GWEN_ERROR_NOT_FOUND) { if (required) { DBG_ERROR(NULL, "Dependency \"%s\" not found but required", sName); return rv; } } else { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int _retrieveVariables(GWB_CONTEXT *currentContext, GWEN_DB_NODE *db, const char *sId, const char *sName, GWEN_XMLNODE *xmlNode) { GWEN_STRINGLIST *slVariables; slVariables=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (slVariables) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(slVariables); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { int rv; rv=_retrieveVariable(db, sId, sName, s); if (rv<0) { DBG_ERROR(NULL, "Error retrieving variable \"%s\" for dependency \"%s\"", s, sId); GWEN_StringList_free(slVariables); return rv; } } se=GWEN_StringListEntry_Next(se); } } return 0; } int _checkVersion(GWEN_DB_NODE *db, const char *sId, const char *sName, const char *sMinVersion, const char *sMaxVersion) { GWEN_BUFFER *argBuffer; GWEN_BUFFER *stdOutBuffer; GWEN_BUFFER *stdErrBuffer; int rv; stdOutBuffer=GWEN_Buffer_new(0, 256, 0, 1); stdErrBuffer=GWEN_Buffer_new(0, 256, 0, 1); argBuffer=GWEN_Buffer_new(0, 256, 0, 1); if (sMinVersion) { GWEN_Buffer_AppendString(argBuffer, " --atleast-version="); GWEN_Buffer_AppendString(argBuffer, sMinVersion); GWEN_Buffer_AppendString(argBuffer, " "); } if (sMaxVersion) { GWEN_Buffer_AppendString(argBuffer, " --max-version="); GWEN_Buffer_AppendString(argBuffer, sMaxVersion); GWEN_Buffer_AppendString(argBuffer, " "); } GWEN_Buffer_AppendString(argBuffer, sName); DBG_DEBUG(NULL, "Running command with args: [%s]", GWEN_Buffer_GetStart(argBuffer)); rv=GWEN_Process_RunCommandWaitAndGather("pkg-config", GWEN_Buffer_GetStart(argBuffer), stdOutBuffer, stdErrBuffer); if (rv<0) { DBG_ERROR(NULL, "Error running pkg-config (%d)", rv); GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); return rv; } GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); GWB_Parser_SetItemValue(db, sId, "_EXISTS", (rv==0)?"TRUE":"FALSE"); fprintf(stdout, " dep %s: %s\n", sId, (rv==0)?"found":"not found"); return (rv==0)?0:GWEN_ERROR_NOT_FOUND; } int _retrieveCflags(GWEN_DB_NODE *db, const char *sId, const char *sName) { int rv; rv=_callPkgConfig(db, sId, sName, "_CFLAGS", "--cflags"); if (rv<0) { DBG_ERROR(NULL, "Error running pkg-config (%d)", rv); return rv; } return 0; } int _retrieveLdflags(GWEN_DB_NODE *db, const char *sId, const char *sName) { int rv; rv=_callPkgConfig(db, sId, sName, "_LIBS", "--libs"); if (rv<0) { DBG_ERROR(NULL, "Error running pkg-config (%d)", rv); return rv; } return 0; } int _retrieveVariable(GWEN_DB_NODE *db, const char *sId, const char *sName, const char *variableName) { int rv; GWEN_BUFFER *varArgBuffer; GWEN_BUFFER *varSuffixBuffer; const char *s; varArgBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(varArgBuffer, "--variable="); GWEN_Buffer_AppendString(varArgBuffer, variableName); varSuffixBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(varSuffixBuffer, "_"); s=variableName; while(*s) GWEN_Buffer_AppendByte(varSuffixBuffer, toupper(*(s++))); rv=_callPkgConfig(db, sId, sName, GWEN_Buffer_GetStart(varSuffixBuffer), GWEN_Buffer_GetStart(varArgBuffer)); GWEN_Buffer_free(varSuffixBuffer); GWEN_Buffer_free(varArgBuffer); if (rv<0) { DBG_ERROR(NULL, "Error running pkg-config (%d)", rv); return rv; } return 0; } int _callPkgConfig(GWEN_DB_NODE *db, const char *sId, const char *sName, const char *suffix, const char *args) { GWEN_BUFFER *argBuffer; GWEN_BUFFER *stdOutBuffer; GWEN_BUFFER *stdErrBuffer; int rv; stdOutBuffer=GWEN_Buffer_new(0, 256, 0, 1); stdErrBuffer=GWEN_Buffer_new(0, 256, 0, 1); argBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(argBuffer, args); GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, sName); DBG_DEBUG(NULL, "Running command with args: [%s]", GWEN_Buffer_GetStart(argBuffer)); rv=GWEN_Process_RunCommandWaitAndGather("pkg-config", GWEN_Buffer_GetStart(argBuffer), stdOutBuffer, stdErrBuffer); if (rv<0) { DBG_ERROR(NULL, "Error running pkg-config (%d)", rv); GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); return rv; } GWEN_Buffer_free(argBuffer); _replaceControlCharsWithBlanks(GWEN_Buffer_GetStart(stdOutBuffer)); GWEN_Text_CondenseBuffer(stdOutBuffer); GWB_Parser_SetItemValue(db, sId, suffix, GWEN_Buffer_GetStart(stdOutBuffer)); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); return 0; } void _replaceControlCharsWithBlanks(char *ptr) { while(ptr && *ptr) { if (*ptr<32) *ptr=32; ptr++; } } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_project.h0000664000175000017500000000124114116666046017466 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_PROJECT_H #define GWBUILD_PARSER_PROJECT_H #include "gwenbuild/types/project.h" #include int GWB_ParseProject(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_options.c0000664000175000017500000002011014465133070017473 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_options.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/types/option.h" #include #include #include int _checkAgainstGivenOption(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWB_OPTION *option); int _checkStringOption(GWB_OPTION *option, GWB_CONTEXT *currentContext, const char *givenValue); int _checkStringListOption(GWB_PROJECT *project, GWB_OPTION *option, GWB_CONTEXT *currentContext, const char *givenValue); int GWB_ParseOption(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { const char *sId; int otype; GWB_OPTION *option; const char *s; GWEN_XMLNODE *n; int rv; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } sId=GWEN_XMLNode_GetProperty(xmlNode, "id", NULL); if (!(sId && *sId)) { DBG_ERROR(NULL, "Option has no id"); GWEN_XMLNode_Dump(xmlNode, 2); return GWEN_ERROR_GENERIC; } otype=GWB_OptionType_fromString(GWEN_XMLNode_GetProperty(xmlNode, "type", "string")); if (!(otype>GWB_OptionType_None)) { DBG_ERROR(NULL, "Invalid option type (id=%s)", sId); GWEN_XMLNode_Dump(xmlNode, 2); return GWEN_ERROR_GENERIC; } option=GWB_Option_new(sId); GWB_Option_SetOptionType(option, otype); if (1) { GWEN_BUFFER *buf; buf=GWB_Parser_ReadNamedXmlDataIntoBufferAndExpand(GWB_Context_GetVars(currentContext), xmlNode, "default"); if (buf) { if (GWEN_Buffer_GetUsedBytes(buf)) GWB_Option_SetDefaultValue(option, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } } s=GWEN_XMLNode_GetProperty(xmlNode, "definePrefix", NULL); if (s) GWB_Option_SetDefinePrefix(option, s); s=GWEN_XMLNode_GetCharValue(xmlNode, "choices", NULL); if (s) { GWEN_STRINGLIST *sl; sl=GWEN_StringList_fromString2(s, " ", 1, GWEN_TEXT_FLAGS_DEL_QUOTES | GWEN_TEXT_FLAGS_CHECK_BACKSLASH); if (sl) { GWEN_StringList_AppendStringList(GWB_Option_GetChoiceList(option), sl, 1); GWEN_StringList_free(sl); } } /* entries can be used for string values to define a name which contains multiple strings. * An example from AqBanking: * * * * Here "all" can be given as alias for "aqhbci aqofxconnect aqebics aqpaypal aqnone" so that the user can * just specify "-O backends=all" to include all backends instead of having to specify every single one. */ n=GWEN_XMLNode_FindFirstTag(xmlNode, "alias", NULL, NULL); while(n) { const char *sName; GWEN_BUFFER *valueBuffer; sName=GWEN_XMLNode_GetProperty(n, "name", NULL); valueBuffer=GWB_Parser_ReadXmlDataIntoBufferAndExpand(GWB_Context_GetVars(currentContext), n); if (valueBuffer) { GWB_Option_AddAlias(option, sName, GWEN_Buffer_GetStart(valueBuffer)); GWEN_Buffer_free(valueBuffer); } n=GWEN_XMLNode_FindNextTag(n, "alias", NULL, NULL); } _checkAgainstGivenOption(project, currentContext, option); GWB_Project_AddOption(project, option); return 0; } int _checkAgainstGivenOption(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWB_OPTION *option) { const char *optionId; GWB_KEYVALUEPAIR *kvp; const char *givenValue=NULL; optionId=GWB_Option_GetId(option); kvp=GWB_KeyValuePair_List_GetFirstByKey(GWB_Project_GetGivenOptionList(project), optionId); if (kvp) givenValue=GWB_KeyValuePair_GetValue(kvp); if (givenValue==NULL) givenValue=GWB_Option_GetDefaultValue(option); if (givenValue) { int rv=GWEN_ERROR_GENERIC; switch(GWB_Option_GetOptionType(option)) { case GWB_OptionType_Unknown: case GWB_OptionType_None: DBG_ERROR(NULL, "Bad option type in option %s", optionId); rv=GWEN_ERROR_GENERIC; break; case GWB_OptionType_String: rv=_checkStringOption(option, currentContext, givenValue); break; case GWB_OptionType_StringList: rv=_checkStringListOption(project, option, currentContext, givenValue); break; } if (rv<0) return rv; } if (kvp) { GWB_KeyValuePair_List_Del(kvp); GWB_KeyValuePair_free(kvp); } return 0; } int _checkStringOption(GWB_OPTION *option, GWB_CONTEXT *currentContext, const char *givenValue) { const char *optionId; optionId=GWB_Option_GetId(option); fprintf(stdout, " option %s: ", optionId); if (givenValue) { const char *s; GWEN_BUFFER *nameBuffer; s=GWB_Option_GetAlias(option, givenValue); if (s==NULL) s=givenValue; if (!GWB_Option_IsValidChoice(option, s)) { DBG_ERROR(NULL, "Value \"%s\" (given value \"%s\") is not a valid choice for option \"%s\"", s, givenValue, optionId); return GWEN_ERROR_INVALID; } nameBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuffer, "option_"); GWEN_Buffer_AppendString(nameBuffer, optionId); GWEN_DB_SetCharValue(GWB_Context_GetVars(currentContext), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_Buffer_GetStart(nameBuffer), s); GWEN_Buffer_free(nameBuffer); fprintf(stdout, "%s\n", s); } return 0; } int _checkStringListOption(GWB_PROJECT *project, GWB_OPTION *option, GWB_CONTEXT *currentContext, const char *givenValue) { const char *optionId; const char *definePrefix; optionId=GWB_Option_GetId(option); definePrefix=GWB_Option_GetDefinePrefix(option); fprintf(stdout, " option %s: ", optionId); if (givenValue) { const char *s; GWEN_STRINGLIST *sl; s=GWB_Option_GetAlias(option, givenValue); if (s==NULL) s=givenValue; sl=GWEN_StringList_fromString2(s, " ", 1, GWEN_TEXT_FLAGS_DEL_QUOTES | GWEN_TEXT_FLAGS_CHECK_BACKSLASH); if (sl) { GWEN_STRINGLISTENTRY *se; GWEN_BUFFER *nameBuffer; nameBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuffer, "option_"); GWEN_Buffer_AppendString(nameBuffer, optionId); se=GWEN_StringList_FirstEntry(sl); while(se) { const char *sCurrentGivenValue; sCurrentGivenValue=GWEN_StringListEntry_Data(se); if (sCurrentGivenValue) { if (!GWB_Option_IsValidChoice(option, sCurrentGivenValue)) { DBG_ERROR(NULL, "Value \"%s\" is not a valid choice for option \"%s\"", sCurrentGivenValue, optionId); GWEN_Buffer_free(nameBuffer); GWEN_StringList_free(sl); return GWEN_ERROR_INVALID; } GWEN_DB_SetCharValue(GWB_Context_GetVars(currentContext), 0, GWEN_Buffer_GetStart(nameBuffer), sCurrentGivenValue); fprintf(stdout, "%s ", sCurrentGivenValue); if (definePrefix) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 64, 0, 1); GWEN_Buffer_AppendString(dbuf, definePrefix); s=sCurrentGivenValue; while(*s) GWEN_Buffer_AppendByte(dbuf, toupper(*(s++))); GWB_Project_SetDefine(project, GWEN_Buffer_GetStart(dbuf), "1"); GWEN_Buffer_free(dbuf); } } se=GWEN_StringListEntry_Next(se); } /* while */ GWEN_Buffer_free(nameBuffer); GWEN_StringList_free(sl); } /* if sl */ } /* if givenValue */ fprintf(stdout, "\n"); return 0; } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_target.c0000664000175000017500000002411114460564441017300 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_target.h" #include "gwenbuild/parser/p_buildfiles.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/types/builder_be.h" #include #include static GWB_TARGET *_readTarget(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseUsedTargets(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseIncludes(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseLibraries(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseDefines(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); int GWB_ParseTarget(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; GWB_TARGET *target; GWB_CONTEXT *newContext; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } target=_readTarget(project, currentContext, xmlNode); if (target==NULL) { DBG_INFO(NULL, "No target created"); return GWEN_ERROR_GENERIC; } newContext=GWB_Parser_CopyContextForTarget(currentContext); GWB_Context_SetCurrentTarget(newContext, target); GWB_Target_SetContext(target, newContext); rv=_parseChildNodes(project, newContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_Context_free(newContext); GWB_Target_free(target); return rv; } GWB_Project_AddTarget(project, target); GWB_Context_Tree2_AddChild(currentContext, newContext); return 0; } GWB_TARGET *_readTarget(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWB_TARGET *target; const char *s; GWBUILD_TARGETTYPE targetType; uint32_t flags=GWEN_DB_FLAGS_OVERWRITE_VARS; GWEN_DB_NODE *db; target=GWB_Target_new(project); s=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(s && *s)) { DBG_ERROR(NULL, "Target has no name"); return NULL; } GWB_Target_SetName(target, s); GWB_Target_SetId(target, s); s=GWEN_XMLNode_GetProperty(xmlNode, "id", NULL); if (s && *s) GWB_Target_SetId(target, s); s=GWEN_XMLNode_GetProperty(xmlNode, "type", NULL); if (!(s && *s)) { DBG_ERROR(NULL, "Target has no type"); GWB_Target_free(target); return NULL; } targetType=GWBUILD_TargetType_fromString(s); if (targetType==GWBUILD_TargetType_Invalid) { DBG_ERROR(NULL, "Bad target type \"%s\"", s?s:""); GWB_Target_free(target); return NULL; } GWB_Target_SetTargetType(target, targetType); s=GWEN_XMLNode_GetProperty(xmlNode, "install", NULL); GWB_Target_SetInstallPath(target, s); GWB_Target_SetSoVersion(target, GWEN_XMLNode_GetIntProperty(xmlNode, "so_current", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "so_age", 0), GWEN_XMLNode_GetIntProperty(xmlNode, "so_revision", 0)); db=GWB_Context_GetVars(currentContext); GWEN_DB_SetCharValue(db, flags, "target_name", GWB_Target_GetName(target)); GWEN_DB_SetCharValueFromInt(db, flags, "target_so_current", GWB_Target_GetSoVersionCurrent(target)); GWEN_DB_SetCharValueFromInt(db, flags, "target_so_age", GWB_Target_GetSoVersionAge(target)); GWEN_DB_SetCharValueFromInt(db, flags, "target_so_revision", GWB_Target_GetSoVersionRevision(target)); GWEN_DB_SetCharValueFromInt(db, flags, "target_so_effective", GWB_Target_GetSoVersionCurrent(target)-GWB_Target_GetSoVersionAge(target)); return target; } int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "subdirs")==0) rv=GWB_Parser_ParseSubdirs(project, currentContext, n, _parseChildNodes); else if (strcasecmp(name, "sources")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST | GWB_PARSER_SRCFILEFLAGS_ISSOURCE, NULL, NULL); else if (strcasecmp(name, "headers")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST, NULL, NULL); else if (strcasecmp(name, "data")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST, NULL, NULL); else if (strcasecmp(name, "extradist")==0) rv=GWB_Parser_ParseSourcesOrHeaders(project, currentContext, n, GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST, NULL, NULL); else if (strcasecmp(name, "useTargets")==0) rv=_parseUsedTargets(currentContext, n); else if (strcasecmp(name, "includes")==0) rv=_parseIncludes(currentContext, n); else if (strcasecmp(name, "define")==0) rv=_parseDefines(currentContext, n); else if (strcasecmp(name, "libraries")==0) rv=_parseLibraries(currentContext, n); else if (strcasecmp(name, "target")==0) rv=GWB_ParseTarget(project, currentContext, n); else if (strcasecmp(name, "buildFiles")==0) rv=GWB_ParseBuildFiles(project, currentContext, n); else rv=GWB_Parser_ParseWellKnownElements(project, currentContext, n, _parseChildNodes); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _parseUsedTargets(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWB_TARGET *target; int rv; GWEN_STRINGLIST *targetNameList; target=GWB_Context_GetCurrentTarget(currentContext); if (target==NULL) { DBG_ERROR(NULL, "No target in current context, SNH!"); return GWEN_ERROR_INTERNAL; } rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } targetNameList=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (targetNameList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(targetNameList); while(se) { const char *sTargetName; sTargetName=GWEN_StringListEntry_Data(se); if (sTargetName && *sTargetName) GWB_Target_AddUsedTargetName(target, sTargetName); se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(targetNameList); } return 0; } int _parseIncludes(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWB_TARGET *target; int rv; const char *builderType; GWEN_STRINGLIST *entryList; target=GWB_Context_GetCurrentTarget(currentContext); if (target==NULL) { DBG_ERROR(NULL, "No target in current context, SNH!"); return GWEN_ERROR_INTERNAL; } rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } builderType=GWEN_XMLNode_GetProperty(xmlNode, "type", "c"); entryList=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 0); if (entryList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(entryList); while(se) { const char *sEntry; sEntry=GWEN_StringListEntry_Data(se); if (sEntry && *sEntry) GWB_Context_AddInclude(currentContext, builderType, sEntry); se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(entryList); } return 0; } int _parseDefines(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; const char *varName; const char *value; const char *quoted; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } quoted=GWEN_XMLNode_GetProperty(xmlNode, "quoted", "FALSE"); varName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); value=GWEN_XMLNode_GetProperty(xmlNode, "value", NULL); if (!(varName && *varName)) { DBG_ERROR(NULL, "Missing variable name in DEFINE"); return GWEN_ERROR_GENERIC; } if (quoted && strcasecmp(quoted, "TRUE")==0) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(dbuf, "\\\""); if (value && *value) GWEN_Buffer_AppendString(dbuf, value); GWEN_Buffer_AppendString(dbuf, "\\\""); GWB_Context_SetDefine(currentContext, varName, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } else { GWB_Context_SetDefine(currentContext, varName, value); } return 0; } int _parseLibraries(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWB_TARGET *target; int rv; GWEN_STRINGLIST *entryList; target=GWB_Context_GetCurrentTarget(currentContext); if (target==NULL) { DBG_ERROR(NULL, "No target in current context, SNH!"); return GWEN_ERROR_INTERNAL; } rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } entryList=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (entryList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(entryList); while(se) { const char *sEntry; sEntry=GWEN_StringListEntry_Data(se); if (sEntry && *sEntry) GWB_Target_AddUsedLibraryName(target, sEntry); se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(entryList); } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkcompiler.c0000664000175000017500000000542114116666046020627 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_checkcompiler.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/tools/trycompile.h" #include #include static int _parseChildNodes(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseArg(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); int GWB_ParseCheckCompiler(GWEN_UNUSED GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; rv=_parseChildNodes(currentContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int _parseChildNodes(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "arg")==0) rv=_parseArg(currentContext, n); else { DBG_INFO(NULL, "Element not handled"); rv=0; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _parseArg(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; const char *sName; GWEN_DB_NODE *db; GWEN_BUFFER *argsBuffer; db=GWB_Context_GetVars(currentContext); rv=GWEN_XMLNode_ExpandProperties(xmlNode, db); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } sName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(sName && *sName)) { DBG_ERROR(NULL, "Dependency has no name"); return GWEN_ERROR_GENERIC; } argsBuffer=GWB_Parser_ReadXmlDataIntoBufferAndExpand(GWB_Context_GetVars(currentContext), xmlNode); if (argsBuffer) { rv=GWB_Tools_CheckCompilerArgs(currentContext, GWEN_Buffer_GetStart(argsBuffer)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } else if (rv==0) { GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, sName, "TRUE"); fprintf(stdout, " compiler args %s: TRUE\n", sName); } else { GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, sName, "FALSE"); fprintf(stdout, " compiler args %s: FALSE\n", sName); } } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkfunctions.c0000664000175000017500000000760114460564441021025 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_checkfunctions.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/tools/trylink.h" #include #include static int _checkFunction(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *fnName); static void _setVarFunctionExists(GWEN_DB_NODE *db, const char *header, int exists); static void _setDefineFunctionExists(GWB_PROJECT *project, const char *header); static void _toUpperAndReplacePointWithUnderscore(char *ptr); static void _replacePointWithUnderscore(char *ptr); int GWB_ParseCheckFunctions(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; GWEN_STRINGLIST *fileNameList; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } fileNameList=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (fileNameList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(fileNameList); while(se) { const char *sFileName; sFileName=GWEN_StringListEntry_Data(se); if (sFileName && *sFileName) { rv=_checkFunction(project, currentContext, sFileName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_StringList_free(fileNameList); return rv; } } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(fileNameList); } return 0; } int _checkFunction(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *fnName) { GWEN_BUFFER *codeBuf; int rv; codeBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(codeBuf, "int %s(void);\n", fnName); GWEN_Buffer_AppendArgs(codeBuf, "int main(int argc, char **argv) {return %s();}", fnName); rv=GWB_Tools_TryLink(currentContext, GWEN_Buffer_GetStart(codeBuf), NULL); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(codeBuf); return rv; } _setVarFunctionExists(GWB_Context_GetVars(currentContext), fnName, (rv==0)?1:0); if (rv==0) _setDefineFunctionExists(project, fnName); return 0; } void _setVarFunctionExists(GWEN_DB_NODE *db, const char *header, int exists) { GWEN_BUFFER *nameBuf; fprintf(stdout, " function %s: %s\n", header, exists?"found":"not found"); nameBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuf, header); _replacePointWithUnderscore(GWEN_Buffer_GetStart(nameBuf)); GWB_Parser_SetItemValue(db, GWEN_Buffer_GetStart(nameBuf), "_EXISTS", exists?"TRUE":"FALSE"); GWEN_Buffer_free(nameBuf); } void _setDefineFunctionExists(GWB_PROJECT *project, const char *header) { GWEN_BUFFER *nameBuf; nameBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuf, "HAVE_"); GWEN_Buffer_AppendString(nameBuf, header); _toUpperAndReplacePointWithUnderscore(GWEN_Buffer_GetStart(nameBuf)); GWB_Project_SetDefine(project, GWEN_Buffer_GetStart(nameBuf), "1"); GWEN_Buffer_free(nameBuf); } void _toUpperAndReplacePointWithUnderscore(char *ptr) { while(ptr && *ptr) { if (*ptr<32) *ptr=32; else if (*ptr=='.' || *ptr=='/') *ptr='_'; else *ptr=toupper(*ptr); ptr++; } } void _replacePointWithUnderscore(char *ptr) { while(ptr && *ptr) { if (*ptr<32) *ptr=32; else if (*ptr=='.' || *ptr=='/') *ptr='_'; ptr++; } } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkprogs.c0000664000175000017500000001235614460564441020152 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_checkheaders.h" #include "gwenbuild/parser/parser.h" #include #include static int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseProg(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _determineProgPath(GWEN_DB_NODE *db, const char *sCmd, const char *sId, const GWEN_STRINGLIST *slAltNames, const GWEN_STRINGLIST *slPaths); static int _determineNamePath(GWEN_DB_NODE *db, const char *sCmd, const char *sId, const GWEN_STRINGLIST *slPaths); int GWB_ParseCheckProgs(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; rv=_parseChildNodes(project, currentContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "prog")==0) rv=_parseProg(project, currentContext, n); else { DBG_INFO(NULL, "Element not handled"); rv=0; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _parseProg(GWEN_UNUSED GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; const char *sCmd; const char *sId; GWEN_XMLNODE *n; GWEN_DB_NODE *db; GWEN_STRINGLIST *slAltNames=NULL; GWEN_STRINGLIST *slPaths=NULL; db=GWB_Context_GetVars(currentContext); rv=GWEN_XMLNode_ExpandProperties(xmlNode, db); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } sCmd=GWEN_XMLNode_GetProperty(xmlNode, "cmd", NULL); if (!(sCmd && *sCmd)) { DBG_ERROR(NULL, "No cmd in "); return GWEN_ERROR_GENERIC; } sId=GWEN_XMLNode_GetProperty(xmlNode, "id", NULL); if (!(sId && *sId)) { DBG_ERROR(NULL, "No id in "); return GWEN_ERROR_GENERIC; } n=GWEN_XMLNode_FindFirstTag(xmlNode, "alternativeNames", NULL, NULL); if (n) slAltNames=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), n, 1); n=GWEN_XMLNode_FindFirstTag(xmlNode, "paths", NULL, NULL); if (n) slPaths=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), n, 1); else { slPaths=GWBUILD_GetPathFromEnvironment(); if (slPaths==NULL) slPaths=GWEN_StringList_fromString("/usr/local/bin:/usr/bin:/bin", ": ", 0); } rv=_determineProgPath(GWB_Context_GetVars(currentContext), sCmd, sId, slAltNames, slPaths); if (rv==1) { GWB_Parser_SetItemValue(db, sId, "_EXISTS", "TRUE"); fprintf(stdout, " prog %s: found\n", sCmd); } else { GWB_Parser_SetItemValue(GWB_Context_GetVars(currentContext), sId, "_EXISTS", "FALSE"); fprintf(stdout, " prog %s: not found\n", sCmd); } return 0; } /* Result <0: ERROR, ==0: Not found, >0; Found */ int _determineProgPath(GWEN_DB_NODE *db, const char *sCmd, const char *sId, const GWEN_STRINGLIST *slAltNames, const GWEN_STRINGLIST *slPaths) { int rv; rv=_determineNamePath(db, sCmd, sId, slPaths); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } else if (rv==1) { DBG_DEBUG(NULL, "Found path for prog \"%s\"", sCmd); return 1; } else { if (slAltNames) { const GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(slAltNames); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { rv=_determineNamePath(db, sCmd, sId, slPaths); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } else if (rv>0) { DBG_DEBUG(NULL, "Found path for prog \"%s\"", sCmd); return 1; } } se=GWEN_StringListEntry_Next(se); } } } return 0; } /* Result <0: ERROR, ==0: Not found, >0; Found */ int _determineNamePath(GWEN_DB_NODE *db, const char *sCmd, const char *sId, const GWEN_STRINGLIST *slPaths) { GWEN_BUFFER *dbuf; int rv; dbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(slPaths, sCmd, dbuf); if (rv<0) { if (rv==GWEN_ERROR_NOT_FOUND) { DBG_DEBUG(NULL, "Command \"%s\" not found", sCmd); GWEN_Buffer_free(dbuf); return 0; } else { DBG_DEBUG(NULL, "ERROR on GWEN_Directory_FindFileInPaths(\"%s\"): %d", sCmd, rv); GWEN_Buffer_free(dbuf); return rv; } } GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, sId, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); return 1; } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checkheaders.c0000664000175000017500000000754414460564441020436 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_checkheaders.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/tools/trycompile.h" #include #include static int _checkHeader(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *header); static void _setVarHeaderExists(GWEN_DB_NODE *db, const char *header, int exists); static void _setDefineHeaderExists(GWB_PROJECT *project, const char *header); static void _toUpperAndReplacePointWithUnderscore(char *ptr); static void _replacePointWithUnderscore(char *ptr); int GWB_ParseCheckHeaders(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; GWEN_STRINGLIST *fileNameList; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } fileNameList=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(currentContext), xmlNode, 1); if (fileNameList) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(fileNameList); while(se) { const char *sFileName; sFileName=GWEN_StringListEntry_Data(se); if (sFileName && *sFileName) { rv=_checkHeader(project, currentContext, sFileName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_StringList_free(fileNameList); return rv; } } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(fileNameList); } return 0; } int _checkHeader(GWB_PROJECT *project, GWB_CONTEXT *currentContext, const char *header) { GWEN_BUFFER *codeBuf; int rv; codeBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(codeBuf, "#include <%s>\n", header); GWEN_Buffer_AppendString(codeBuf, "int main(int argc, char **argv) { return 0;};\n"); rv=GWB_Tools_TryCompile(currentContext, GWEN_Buffer_GetStart(codeBuf)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(codeBuf); return rv; } _setVarHeaderExists(GWB_Context_GetVars(currentContext), header, (rv==0)?1:0); if (rv==0) _setDefineHeaderExists(project, header); return 0; } void _setVarHeaderExists(GWEN_DB_NODE *db, const char *header, int exists) { GWEN_BUFFER *nameBuf; fprintf(stdout, " header %s: %s\n", header, exists?"found":"not found"); nameBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuf, header); _replacePointWithUnderscore(GWEN_Buffer_GetStart(nameBuf)); GWB_Parser_SetItemValue(db, GWEN_Buffer_GetStart(nameBuf), "_EXISTS", exists?"TRUE":"FALSE"); GWEN_Buffer_free(nameBuf); } void _setDefineHeaderExists(GWB_PROJECT *project, const char *header) { GWEN_BUFFER *nameBuf; nameBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuf, "HAVE_"); GWEN_Buffer_AppendString(nameBuf, header); _toUpperAndReplacePointWithUnderscore(GWEN_Buffer_GetStart(nameBuf)); GWB_Project_SetDefine(project, GWEN_Buffer_GetStart(nameBuf), "1"); GWEN_Buffer_free(nameBuf); } void _toUpperAndReplacePointWithUnderscore(char *ptr) { while(ptr && *ptr) { if (*ptr<32) *ptr=32; else if (*ptr=='.' || *ptr=='/') *ptr='_'; else *ptr=toupper(*ptr); ptr++; } } void _replacePointWithUnderscore(char *ptr) { while(ptr && *ptr) { if (*ptr<32) *ptr=32; else if (*ptr=='.' || *ptr=='/') *ptr='_'; ptr++; } } gwenhywfar-5.12.1/tools/gwenbuild/parser/parser.h0000664000175000017500000000656514460564441017011 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_PARSER_H #define GWBUILD_PARSER_H #include "gwenbuild/types/context.h" #include "gwenbuild/types/project.h" #include #include #include #define GWB_PARSER_FILENAME "0BUILD" #define GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST 0x00000001 #define GWB_PARSER_SRCFILEFLAGS_ISSOURCE 0x00000002 GWB_PROJECT *GWB_Parser_ReadBuildTree(GWENBUILD *gwbuild, GWB_CONTEXT *currentContext, const char *srcDir, GWB_KEYVALUEPAIR_LIST *givenOptionList); GWB_CONTEXT *GWB_Parser_CopyContextForSubdir(const GWB_CONTEXT *sourceContext, const char *folder); GWB_CONTEXT *GWB_Parser_CopyContextForTarget(const GWB_CONTEXT *sourceContext); GWEN_XMLNODE *GWB_Parser_ReadBuildFile(GWENBUILD *gwbuild, const GWB_CONTEXT *currentContext, const char *fileName); GWEN_STRINGLIST *GWB_Parser_ReadXmlDataIntoStringList(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode, int ignoreDupes); GWEN_BUFFER *GWB_Parser_ReadXmlDataIntoBufferAndExpand(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode); GWEN_BUFFER *GWB_Parser_ReadNamedXmlDataIntoBufferAndExpand(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode, const char *elem); typedef int (*GWB_PARSER_PARSE_ELEMENT_FN)(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); int GWB_Parser_ParseWellKnownElements(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn); int GWB_Parser_ParseSubdirs(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWB_PARSER_PARSE_ELEMENT_FN fn); //int GWB_Parser_ParseSetVar(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); int GWB_Parser_ParseWriteFile(GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); int GWB_Parser_ParseSourcesOrHeaders(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, /*int alwaysDist, int isSource*/ uint32_t fileFlags, const char *defaultTypeName, const char *defaultBuilder); void GWB_Parser_SetItemValue(GWEN_DB_NODE *db, const char *sId, const char *suffix, const char *value); int GWB_Parser_ReplaceVarsBetweenAtSigns(const char *s, GWEN_BUFFER *dbuf, GWEN_DB_NODE *db); GWB_TARGET *GWB_Parser_AddTargetForSourceFile(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWBUILD_TARGETTYPE targetType, const char *fileName, const char *fileType, const char *builderName, const char *installPath); #endif gwenhywfar-5.12.1/tools/gwenbuild/parser/p_checklibs.c0000664000175000017500000000737714116666046017762 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_checkheaders.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/tools/trylink.h" #include static int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseLib(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static GWEN_BUFFER *_createTestCodeForLib(const char *fnName); int GWB_ParseCheckLibs(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; rv=_parseChildNodes(project, currentContext, xmlNode); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int _parseChildNodes(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(xmlNode); while (n) { const char *name; name=GWEN_XMLNode_GetData(n); if (name && *name) { int rv; DBG_DEBUG(NULL, "Handling element \"%s\"", name); if (strcasecmp(name, "lib")==0) rv=_parseLib(project, currentContext, n); else { DBG_INFO(NULL, "Element not handled"); rv=0; } if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error in element \"%s\", aborting", name); return rv; } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int _parseLib(GWEN_UNUSED GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; const char *sId; const char *sName; const char *sFunction; GWEN_DB_NODE *db; db=GWB_Context_GetVars(currentContext); rv=GWEN_XMLNode_ExpandProperties(xmlNode, db); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } sId=GWEN_XMLNode_GetProperty(xmlNode, "id", NULL); if (!(sId && *sId)) { DBG_ERROR(NULL, "Dependency has no id"); return GWEN_ERROR_GENERIC; } sName=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(sName && *sName)) { DBG_ERROR(NULL, "Dependency has no name"); return GWEN_ERROR_GENERIC; } sFunction=GWEN_XMLNode_GetProperty(xmlNode, "function", NULL); if (sFunction && *sFunction) { GWEN_BUFFER *codeBuf; codeBuf=_createTestCodeForLib(sFunction); rv=GWB_Tools_TryLink(currentContext, GWEN_Buffer_GetStart(codeBuf), sName); GWEN_Buffer_free(codeBuf); } else rv=GWB_Tools_TryLink(currentContext, "int main(int argc, char **argv) {return 0;}", sName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } else if (rv==0) { GWEN_BUFFER *dbuf; GWB_Parser_SetItemValue(db, sId, "_EXISTS", "TRUE"); dbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(dbuf, "-l"); GWEN_Buffer_AppendString(dbuf, sId); GWB_Parser_SetItemValue(db, sId, "_LIBS", GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); fprintf(stdout, " lib %s: found\n", sName); } else { GWB_Parser_SetItemValue(GWB_Context_GetVars(currentContext), sId, "_EXISTS", "FALSE"); fprintf(stdout, " lib %s: not found\n", sName); } return 0; } GWEN_BUFFER *_createTestCodeForLib(const char *fnName) { GWEN_BUFFER *codeBuf; codeBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(codeBuf, "int %s(void);\n", fnName); GWEN_Buffer_AppendArgs(codeBuf, "int main(int argc, char **argv) {return %s();}", fnName); return codeBuf; } gwenhywfar-5.12.1/tools/gwenbuild/parser/p_buildfiles.c0000664000175000017500000003177014144206312020132 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/parser/p_buildfiles.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/types/builder_be.h" #include #include static GWB_BUILD_CMD *_parseBuildCmd(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static GWB_BUILD_SUBCMD *_parseSubCmd(GWB_BUILD_CMD *bcmd, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbForCmd); static GWEN_DB_NODE *_prepareCmdDb(GWB_BUILD_CMD *bcmd, GWB_CONTEXT *currentContext); static void _parseAndSetBuildMessage(GWB_BUILD_SUBCMD *buildSubCmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbForCmd); static int _parseBuildInputFiles(GWB_BUILD_CMD *bcmd, GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static int _parseBuildOutputFiles(GWB_BUILD_CMD *bcmd, GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode); static GWB_BUILD_SUBCMD *_parseBuildCommand(GWB_BUILD_CMD *bcmd, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbForCmd); static int _readFileList(GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbVars, const char *sCurrentRelativeDir, GWB_FILE_LIST2 *projectFileList, GWB_FILE_LIST2 *targetFileList, uint32_t flagsToAdd); static int _readFilesFromDataNode(GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbVars, const char *sCurrentRelativeDir, GWB_FILE_LIST2 *projectFileList, GWB_FILE_LIST2 *targetFileList, uint32_t flagsToAdd); static int _readFileListFromTagNode(GWEN_XMLNODE *xmlNode, const GWB_FILE_LIST2 *projectFileList, GWB_FILE_LIST2 *targetFileList); static void _addFilePathsToDb(GWB_CONTEXT *currentContext, const GWB_FILE_LIST2 *fileList, GWEN_DB_NODE *db, const char *varName); int GWB_ParseBuildFiles(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWB_TARGET *target; GWB_BUILD_CMD *bcmd; GWB_BUILD_SUBCMD *buildSubCmd; GWEN_DB_NODE *dbForCmd; target=GWB_Context_GetCurrentTarget(currentContext); bcmd=_parseBuildCmd(project, currentContext, xmlNode); if (bcmd==NULL) { DBG_INFO(NULL, "here"); return GWEN_ERROR_GENERIC; } dbForCmd=_prepareCmdDb(bcmd, currentContext); if (dbForCmd==NULL) { DBG_INFO(NULL, "here"); GWB_BuildCmd_free(bcmd); return GWEN_ERROR_GENERIC; } buildSubCmd=_parseSubCmd(bcmd, currentContext, xmlNode, dbForCmd); if (buildSubCmd==NULL) { DBG_INFO(NULL, "here"); GWEN_DB_Group_free(dbForCmd); GWB_BuildCmd_free(bcmd); return GWEN_ERROR_GENERIC; } _parseAndSetBuildMessage(buildSubCmd, xmlNode, dbForCmd); GWB_BuildCmd_AddBuildCommand(bcmd, buildSubCmd); if (target) GWB_Target_AddExplicitBuild(target, bcmd); else GWB_Project_AddExplicitBuild(project, bcmd); GWEN_DB_Group_free(dbForCmd); return 0; } GWB_BUILD_CMD *_parseBuildCmd(GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *n; GWB_BUILD_CMD *bcmd; int rv; const char *s; bcmd=GWB_BuildCmd_new(); GWB_BuildCmd_SetFolder(bcmd, GWB_Context_GetCurrentRelativeDir(currentContext)); s=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (s && *s) GWB_BuildCmd_SetBuilderName(bcmd, s); s=GWEN_XMLNode_GetProperty(xmlNode, "auto", "TRUE"); if (s && *s && 0==strcasecmp(s, "TRUE")) GWB_BuildCmd_AddFlags(bcmd, GWB_BUILD_CMD_FLAGS_AUTO); n=GWEN_XMLNode_FindFirstTag(xmlNode, "input", NULL, NULL); if (n) { rv=_parseBuildInputFiles(bcmd, project, currentContext, n); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_BuildCmd_free(bcmd); return NULL; } } n=GWEN_XMLNode_FindFirstTag(xmlNode, "output", NULL, NULL); if (n) { rv=_parseBuildOutputFiles(bcmd, project, currentContext, n); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWB_BuildCmd_free(bcmd); return NULL; } } return bcmd; } GWEN_DB_NODE *_prepareCmdDb(GWB_BUILD_CMD *bcmd, GWB_CONTEXT *currentContext) { GWEN_DB_NODE *dbForCmd; dbForCmd=GWEN_DB_Group_new("dbForCmd"); _addFilePathsToDb(currentContext, GWB_BuildCmd_GetInFileList2(bcmd), dbForCmd, "INPUT"); _addFilePathsToDb(currentContext, GWB_BuildCmd_GetOutFileList2(bcmd), dbForCmd, "OUTPUT"); return dbForCmd; } GWB_BUILD_SUBCMD *_parseSubCmd(GWB_BUILD_CMD *bcmd, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbForCmd) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(xmlNode, "cmd", NULL, NULL); if (n) { GWB_BUILD_SUBCMD *buildSubCmd; const char *s; buildSubCmd=_parseBuildCommand(bcmd, currentContext, n, dbForCmd); if (buildSubCmd==NULL) { DBG_ERROR(NULL, "here"); return NULL; } s=GWEN_XMLNode_GetProperty(n, "deleteOutFileFirst", "FALSE"); if (s && strcasecmp(s, "TRUE")==0) GWB_BuildCmd_AddFlags(bcmd, GWB_BUILD_CMD_FLAGS_DEL_OUTFILES); return buildSubCmd; } return 0; } void _parseAndSetBuildMessage(GWB_BUILD_SUBCMD *buildSubCmd, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbForCmd) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(xmlNode, "buildMessage", NULL, NULL); if (n) { GWEN_BUFFER *dbuf; dbuf=GWB_Parser_ReadXmlDataIntoBufferAndExpand(dbForCmd, n); if (dbuf) { GWB_BuildSubCmd_SetBuildMessage(buildSubCmd, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } } } int _parseBuildInputFiles(GWB_BUILD_CMD *bcmd, GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; rv=_readFileList(xmlNode, GWB_Context_GetVars(currentContext), GWB_Context_GetCurrentRelativeDir(currentContext), GWB_Project_GetFileList(project), GWB_BuildCmd_GetInFileList2(bcmd), 0); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int _parseBuildOutputFiles(GWB_BUILD_CMD *bcmd, GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode) { int rv; rv=_readFileList(xmlNode, GWB_Context_GetVars(currentContext), GWB_Context_GetCurrentRelativeDir(currentContext), GWB_Project_GetFileList(project), GWB_BuildCmd_GetOutFileList2(bcmd), GWB_FILE_FLAGS_GENERATED); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } GWB_BUILD_SUBCMD *_parseBuildCommand(GWB_BUILD_CMD *bcmd, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbForCmd) { GWEN_BUFFER *dbuf; const char *toolName; GWB_BUILD_SUBCMD *buildSubCmd; const char *s; int rv; rv=GWEN_XMLNode_ExpandProperties(xmlNode, GWB_Context_GetVars(currentContext)); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return NULL; } toolName=GWEN_XMLNode_GetProperty(xmlNode, "tool", NULL); if (!(toolName && *toolName)) { DBG_ERROR(NULL, "No tool in "); return NULL; } dbuf=GWB_Parser_ReadXmlDataIntoBufferAndExpand(dbForCmd, xmlNode); buildSubCmd=GWB_BuildSubCmd_new(); GWB_BuildSubCmd_SetCommand(buildSubCmd, toolName); if (dbuf) { GWB_BuildSubCmd_SetArguments(buildSubCmd, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } s=GWEN_XMLNode_GetProperty(xmlNode, "checkDates", "TRUE"); if (s && strcasecmp(s, "TRUE")==0) GWB_BuildCmd_AddFlags(bcmd, GWB_BUILD_CMD_FLAGS_CHECK_DATES); return buildSubCmd; } int _readFileList(GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbVars, const char *sCurrentRelativeDir, GWB_FILE_LIST2 *projectFileList, GWB_FILE_LIST2 *targetFileList, uint32_t flagsToAdd) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetChild(xmlNode); while(n) { GWEN_XMLNODE_TYPE tt; int rv; tt=GWEN_XMLNode_GetType(n); if (tt==GWEN_XMLNodeTypeTag) rv=_readFileListFromTagNode(n, projectFileList, targetFileList); else if (tt==GWEN_XMLNodeTypeData) rv=_readFilesFromDataNode(n, dbVars, sCurrentRelativeDir, projectFileList, targetFileList, flagsToAdd); else rv=0; if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } n=GWEN_XMLNode_Next(n); } return 0; } int _readFilesFromDataNode(GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbVars, const char *sCurrentRelativeDir, GWB_FILE_LIST2 *projectFileList, GWB_FILE_LIST2 *targetFileList, uint32_t flagsToAdd) { const char *s; s=GWEN_XMLNode_GetData(xmlNode); if (s && *s) { int rv; GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_DB_ReplaceVars(dbVars, s, buf); if(rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(buf); return rv; } if (GWEN_Buffer_GetUsedBytes(buf)) { GWEN_STRINGLIST *sl; sl=GWEN_StringList_fromString(GWEN_Buffer_GetStart(buf), " ", 1); if (sl==NULL) { DBG_ERROR(NULL, "Could not generate string list from data [%s]", GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); return GWEN_ERROR_GENERIC; } GWBUILD_AddFilesFromStringList(projectFileList, sCurrentRelativeDir, sl, targetFileList, flagsToAdd, 0); GWEN_StringList_free(sl); } GWEN_Buffer_free(buf); } return 0; } int _readFileListFromTagNode(GWEN_XMLNODE *xmlNode, const GWB_FILE_LIST2 *projectFileList, GWB_FILE_LIST2 *targetFileList) { const char *tagName; tagName=GWEN_XMLNode_GetData(xmlNode); if (tagName && *tagName && strcasecmp(tagName, "files")==0) { int index; const char *pattern; pattern=GWEN_XMLNode_GetProperty(xmlNode, "match", NULL); index=GWEN_XMLNode_GetIntProperty(xmlNode, "index", -1); if (index>=0) { GWB_FILE *file; file=GWB_File_List2_GetAt(projectFileList, index); if (file) GWB_File_List2_PushBack(targetFileList, file); } else { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(projectFileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { const char *fname; fname=GWB_File_GetName(file); if (fname) { if (pattern==NULL || -1!=GWEN_Text_ComparePattern(fname, pattern, 0)) GWB_File_List2_PushBack(targetFileList, file); } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } return 0; } else { DBG_ERROR(NULL, "Unknown tag name \"%s\"", tagName); return GWEN_ERROR_GENERIC; } } void _addFilePathsToDb(GWB_CONTEXT *currentContext, const GWB_FILE_LIST2 *fileList, GWEN_DB_NODE *db, const char *varName) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { const GWB_FILE *file; GWEN_BUFFER *fbuf; fbuf=GWEN_Buffer_new(0, 256, 0, 1); file=GWB_File_List2Iterator_Data(it); while(file) { const char *folder; int useBuildDir; useBuildDir=GWB_File_GetFlags(file) & GWB_FILE_FLAGS_GENERATED; folder=GWB_File_GetFolder(file); GWB_Builder_AddRelativeFolderToBuffer(currentContext, folder, useBuildDir, fbuf); if (GWEN_Buffer_GetUsedBytes(fbuf)) GWEN_Buffer_AppendString(fbuf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(fbuf, GWB_File_GetName(file)); GWEN_DB_SetCharValue(db, 0, varName, GWEN_Buffer_GetStart(fbuf)); GWEN_Buffer_Reset(fbuf); file=GWB_File_List2Iterator_Next(it); } GWEN_Buffer_free(fbuf); GWB_File_List2Iterator_free(it); } } gwenhywfar-5.12.1/tools/gwenbuild/README0000664000175000017500000001332514606206641014715 00000000000000 GwenBuild ========= GwenBuild is yet another build system. "autotools" (automake, autoconf) are really cool and they work in almost every case as expected. However, they are extremely slow which is a problem with larger projects containing many source files and convenience libraries. Also, they are hard to debug if you encounter unusual problems, e.g. in AqBanking we have the problem that sometimes not all sources/convenience libraries are correctly rebuilt after source code changes and up to now I have no idea why that is. A nice solution would be to switch to "cmake", especially when using their build target "ninja" which is astonishingly fast. "cmake" is quite easy to setup for simple projects, however, it is not that easy to change larger projects to use it. Also, there is quite a steep learning curve. "meson" is another good alternative since it also uses "ninja" and is therefore also extremely fast. But I wasn't able to adapt my projects to use "meson" because some features I needed for e.g. AqFinance or AqBanking required a version of "meson" newer than what is provided by the distribution I'm currently working with. Out of curiosity "gwenbuild" was started. I wanted to see how fast a build system can be and how hard it would be to write one. Gwenbuild is a tool inside the library gwenhywfar, which is a base library for all my projects. Therefore it is always available in the required version for depending projects. Gwenhywfar itself will not be ported to use this build system to avoid the hen-and-egg-problem. The following major goals were identified before development started: - needs to be much faster than autotools/make - needs to provide library, header and function search functions - needs to be able to generate a "config.h" file - needs to be able to rewrite files by replacing placeholders in source files (like "sed" does in ./configure) - needs to be simple to setup - needs to have support for typemaker2 source files - needs to allow out-of-source build - should be easy to extend - should handle dependency trees QuickStart for Users -------------------- - create a new folder in which to build, there: - "gwbuild PATH_TO_SOURCE_FOLDER" - "gwbuild -p" - "gwbuild -B tm2builder" (sometimes needed explicitly) - "gwbuild -jMAX_NUMBER_OF_PARALLEL_JOBS" After changing source files only the last step needs to be repeated. QuickStart for Development -------------------------- - builder (modules which generate commands to compile or link source files) are defined in XML files in "builders/" (see *.gwb files). - new builders should be added in file "gwenbuild.c" in functions "_genBuilderForSourceFile()" and "_genBuilderForTarget()" at the bottom of that file. Current Status -------------- gwenbuild is now able to compile C and C++ files, link shared libraries and temporary convenience libraries and generate source files from typemaker2 type description files. It also handles dependencies and custom build commands (like for XML merge) can now be defined which can also use gwenbuild's dependency handling. It can build using multiple processes in parallel. Compiling and linking AqBanking using 14 processes in parallel takes about 9 secs on my machine now. How it Works Internally ------------------------ The first step is to setup the build environment. The user changes into an empty folder outside the source tree (or into a folder inside it like "build") and runs "gwbuild -s SRCFOLDER". In this run gwenbuild reads the 0BUILD files in the top source folder and all other 0BUILD files referred to inside the 0BUILD file(s) and collects all the info about targets and object files etc. From this run a "BuildContext" is generated. This structure contains a list of commands needed to compile and link the files of the project. This structure has no further knowledge of the generated project other than which files to compile/link and how the files of the project depend on each other. This build context is then used in the subsequent steps of the gwenbuild process like in "gwbuild -p" (prepare) and "gwbuild -b" (build). The last step usually is to install the generated files using "gwbuild -i". This step only reads a file containing the list of files to install and copies the files from the given list to their specified destinations. This step also has no knowledge of the project to build, it simply works on the install file list. Adding New Source File or Target Types -------------------------------------- - types/gwenbuild.c: - _genBuilderForSourceFile() - _genBuilderForTarget() - builders/posix, builders/windows: - add a *.gwb file for the new builder type Some notes to myself ==================== https://docencia.ac.upc.edu/FIB/USO/Bibliografia/unix-c-libraries.html Build dependecies: cc -E -I INCLUDE_FOLDER -M -MF DEPOUTFILE SRCFILE or $(CC) $(CFLAGS) -MM *.c > Makefile.deps # shared lib: gcc -shared -nostdlib -o libaqdiagram.so aqdiagram.o -lgwenhywfar -lgmp -Wl,--whole-archive draw/libaqdg_draw.a TODO: - eventuell Builder_AddCmds und angleichen (verwenden von GWEN_DB wie bei ) -> commandsFromXml() - commands - cppcheck -s setup build environment -p run preparation commands (needed e.g. if typemaker2 is used) -b build targets -i install files -c cleanup; delete generated files -r repeat setup command using the same arguments given to last setup -Oname=value specify options (can occur multiple times) -Bname Only run commands for the given build (mostly used with 'tm2builder') -Lname Set loglevel (debug, info, notice, warn, error) -Cname Crosscompile for given environment (e-g- 'x86_64-w64-mingw32') -jvalue Use the given number of parallel process for building gwenhywfar-5.12.1/tools/gwenbuild/c_install.h0000664000175000017500000000112014116666046016151 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_INSTALL_H #define GWBUILD_C_INSTALL_H #include int GWB_InstallFiles(const char *fileName, const char *destDir); #endif gwenhywfar-5.12.1/tools/gwenbuild/c_setup.c0000664000175000017500000002763214460564441015654 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "c_setup.h" #include "utils.h" #include "gwenbuild/parser/parser.h" #include "gwenbuild/buildctx/buildctx_xml.h" #include "gwenbuild/filenames.h" #include #include #include #include #include #include static int _prepareContextForSetup(GWB_CONTEXT *firstContext, GWEN_DB_NODE *dbArgs); static void _determineTarget(GWB_CONTEXT *context, GWEN_DB_NODE *dbArgs); static int _determineTools(GWB_CONTEXT *context, GWEN_DB_NODE *dbArgs); static int _getAllToolPaths(GWEN_DB_NODE *dbVars, const char *sCompileTarget, const GWEN_STRINGLIST *sl); static int _getToolPath(GWEN_DB_NODE *dbVars, const char *sTarget, const GWEN_STRINGLIST *sl, const char *sCommand, const char *sEnvVar, const char *sVarName); static void _copySomeEnvironmentVariablesToDb(GWEN_DB_NODE *db); static void _copyEnvironmentVariableToDb(GWEN_DB_NODE *db, const char *envName, const char *dbVarName); static GWB_KEYVALUEPAIR_LIST *_readOptionsFromDb(GWEN_DB_NODE *db); static int _writeStaticLibHelper(const char *fileName); int GWB_Setup(GWEN_DB_NODE *dbArgs) { GWENBUILD *gwenbuild; GWB_CONTEXT *firstContext; GWB_PROJECT *project; GWB_BUILD_CONTEXT *buildCtx; const char *folder; int doDump; GWB_KEYVALUEPAIR_LIST *givenOptionList; int rv; doDump=GWEN_DB_GetIntValue(dbArgs, "dump", 0, 0); folder=GWEN_DB_GetCharValue(dbArgs, "folder", 0, NULL); if (!(folder && *folder)) { fprintf(stderr, "ERROR: Folder needed.\n"); return 1; } if (strcasecmp(folder, ".")==0) { fprintf(stderr, "ERROR: Only building outside source folder supported.\n"); return 1; } givenOptionList=_readOptionsFromDb(dbArgs); gwenbuild=GWBUILD_new(); if (GWEN_DB_GetIntValue(dbArgs, "static", 0, 0)) GWBUILD_AddFlags(gwenbuild, GWENBUILD_FLAGS_STATIC); firstContext=GWB_Context_new(gwenbuild); rv=_prepareContextForSetup(firstContext, dbArgs); if (rv<0) { fprintf(stderr, "ERROR: Error preparing first context.\n"); return 2; } project=GWB_Parser_ReadBuildTree(gwenbuild, firstContext, folder, givenOptionList); if (project==NULL) { fprintf(stderr, "ERROR: Error reading build files.\n"); return 2; } rv=GWBUILD_MakeBuildersForTargets(project); if (rv<0) { fprintf(stderr, "ERROR: Error making builders for targets.\n"); return 2; } buildCtx=GWBUILD_MakeBuildCommands(project); if (buildCtx==NULL) { fprintf(stderr, "ERROR: Could not generate build commands.\n"); return 2; } rv=GWB_BuildCtx_WriteToXmlFile(buildCtx, GWBUILD_FILE_CTX); if (rv<0) { fprintf(stderr, "ERROR: Error writing build context file.\n"); return 3; } rv=GWB_Utils_WriteProjectFileList(project, GWBUILD_FILE_FILES); if (rv<0) { fprintf(stderr, "ERROR: Error writing file list file.\n"); return 3; } GWB_Utils_WriteBuildFileList(gwenbuild, GWBUILD_FILE_BUILDFILES); rv=GWEN_DB_WriteFile(dbArgs, GWBUILD_FILE_ARGS, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { fprintf(stderr, "ERROR: Error writing file list file.\n"); return 3; } rv=GWB_Utils_WriteInstallFileList(project, GWBUILD_FILE_INSTALLFILES); if (rv<0) { fprintf(stderr, "ERROR: Error writing install file list.\n"); return 3; } #if 0 rv=GWB_Utils_WriteProjectToFile(project, GWBUILD_FILE_PROJECT); if (rv<0) { fprintf(stderr, "ERROR: Error writing project to file.\n"); return 3; } #endif rv=GWB_Utils_WriteProjectInfoToFile(project, GWBUILD_FILE_PROJECTINFO); if (rv<0) { fprintf(stderr, "ERROR: Error writing project info to file.\n"); return 3; } rv=GWB_Utils_WriteContextTreeToFile(GWB_Project_GetRootContext(project), GWBUILD_FILE_CTXTREE); rv=_writeStaticLibHelper("staticlibhelper.sh"); if (rv<0) { fprintf(stderr, "ERROR: Error writing staticlibhelper.\n"); return 3; } if (doDump) { GWB_Project_Dump(project, 2, 1); } return 0; } int GWB_RepeatLastSetup(const char *fileName) { int rv; GWEN_DB_NODE *db; db=GWEN_DB_Group_new("args"); rv=GWEN_DB_ReadFile(db, fileName, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { DBG_ERROR(NULL, "Error reading arguments from previous run (file \"%s\")", fileName); GWEN_DB_Group_free(db); return rv; } rv=GWB_Setup(db); if (rv!=0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_DB_Group_free(db); return rv; } GWEN_DB_Group_free(db); return 0; } int _prepareContextForSetup(GWB_CONTEXT *context, GWEN_DB_NODE *dbArgs) { GWEN_DB_NODE *dbVars; int rv; dbVars=GWB_Context_GetVars(context); GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "prefix", "/usr/local"); _copySomeEnvironmentVariablesToDb(GWB_Context_GetVars(context)); _determineTarget(context, dbArgs); rv=_determineTools(context, dbArgs); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _determineTarget(GWB_CONTEXT *context, GWEN_DB_NODE *dbArgs) { GWENBUILD *gwenbuild; GWEN_DB_NODE *dbVars; const char *sTarget; const char *sTargetSystem; const char *s; int systemIsWindows=0; dbVars=GWB_Context_GetVars(context); gwenbuild=GWB_Context_GetGwenbuild(context); sTarget=GWEN_DB_GetCharValue(dbArgs, "crossCompileFor", 0, NULL); if (sTarget) { s=GWBUILD_GetArchFromTriplet(sTarget); GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "GWBUILD_ARCH", s); sTargetSystem=GWBUILD_GetSystemFromTriplet(sTarget); } else { GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "GWBUILD_ARCH", GWBUILD_GetHostArch()); sTargetSystem=GWBUILD_GetHostSystem(); } systemIsWindows=(strcasecmp(sTargetSystem, "windows")==0)?1:0; if (GWBUILD_GetFlags(gwenbuild) & GWENBUILD_FLAGS_STATIC) GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "GWBUILD_LIBTYPE", "staticlib"); else GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "GWBUILD_LIBTYPE", "sharedlib"); GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "GWBUILD_SYSTEM", sTargetSystem); GWBUILD_SetTargetSystem(gwenbuild, sTargetSystem); GWBUILD_SetTargetIsWindows(gwenbuild, systemIsWindows); GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "GWBUILD_SYSTEMTYPE", systemIsWindows?"windows":"posix"); } int _determineTools(GWB_CONTEXT *context, GWEN_DB_NODE *dbArgs) { GWEN_DB_NODE *dbVars; const char *sTarget; GWEN_STRINGLIST *sl; int rv; dbVars=GWB_Context_GetVars(context); sTarget=GWEN_DB_GetCharValue(dbArgs, "crossCompileFor", 0, NULL); sl=GWBUILD_GetPathFromEnvironment(); if (sl==NULL) sl=GWEN_StringList_new(); GWEN_StringList_AppendString(sl, "/usr/local/bin", 0, 1); GWEN_StringList_AppendString(sl, "/usr/bin", 0, 1); GWEN_StringList_AppendString(sl, "/bin", 0, 1); rv=_getAllToolPaths(dbVars, sTarget, sl); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_StringList_free(sl); return rv; } GWEN_StringList_free(sl); return 0; } int _getAllToolPaths(GWEN_DB_NODE *dbVars, const char *sCompileTarget, const GWEN_STRINGLIST *sl) { int rv; rv=_getToolPath(dbVars, sCompileTarget, sl, "gcc", "CC", "GWBUILD_TOOL_CC"); if (rv<0) return rv; rv=_getToolPath(dbVars, sCompileTarget, sl, "g++", "CXX", "GWBUILD_TOOL_CXX"); if (rv<0) return rv; rv=_getToolPath(dbVars, sCompileTarget, sl, "ld", "LD", "GWBUILD_TOOL_LD"); if (rv<0) return rv; rv=_getToolPath(dbVars, sCompileTarget, sl, "ar", "AR", "GWBUILD_TOOL_AR"); if (rv<0) return rv; rv=_getToolPath(dbVars, sCompileTarget, sl, "ranlib", "RANLIB", "GWBUILD_TOOL_RANLIB"); if (rv<0) return rv; rv=_getToolPath(dbVars, NULL, sl, "typemaker2", "TYPEMAKER2", "GWBUILD_TOOL_TYPEMAKER2"); if (rv<0) return rv; /* optional tools */ rv=_getToolPath(dbVars, sCompileTarget, sl, "msgfmt", "MSGFMT", "GWBUILD_TOOL_MSGFMT"); if (rv<0) { DBG_WARN(NULL, "Tool msgfmt not found, limited i18n support."); GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "msgfmt_EXISTS", "FALSE"); } else GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, "msgfmt_EXISTS", "TRUE"); rv=_getToolPath(dbVars, NULL, sl, "avra", "AVRA", "GWBUILD_TOOL_AVRA"); if (rv<0) { DBG_INFO(NULL, "Tool avra not found, only needed when assembling AVR assembler code."); } /* add more tools here */ /* done */ return 0; } int _getToolPath(GWEN_DB_NODE *dbVars, const char *sCompileTarget, const GWEN_STRINGLIST *sl, const char *sCommand, const char *sEnvVar, const char *sVarName) { GWEN_BUFFER *fbufIn; GWEN_BUFFER *fbufOut; const char *s; int rv; fbufIn=GWEN_Buffer_new(0, 256, 0, 1); if (sCompileTarget && *sCompileTarget) { GWEN_Buffer_AppendString(fbufIn, sCompileTarget); GWEN_Buffer_AppendString(fbufIn, "-"); } s=getenv(sEnvVar); if (s) GWEN_Buffer_AppendString(fbufIn, s); else GWEN_Buffer_AppendString(fbufIn, sCommand); fbufOut=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(sl, GWEN_Buffer_GetStart(fbufIn), fbufOut); if (rv<0) { DBG_ERROR(NULL, "Tool \"%s\" not available (%d)", GWEN_Buffer_GetStart(fbufIn), rv); GWEN_Buffer_free(fbufOut); GWEN_Buffer_free(fbufIn); return rv; } GWEN_DB_SetCharValue(dbVars, GWEN_DB_FLAGS_OVERWRITE_VARS, sVarName, GWEN_Buffer_GetStart(fbufOut)); GWEN_Buffer_free(fbufOut); GWEN_Buffer_free(fbufIn); return 0; } void _copySomeEnvironmentVariablesToDb(GWEN_DB_NODE *db) { _copyEnvironmentVariableToDb(db, "CFLAGS", "CFLAGS"); _copyEnvironmentVariableToDb(db, "CXXFLAGS", "CXXFLAGS"); _copyEnvironmentVariableToDb(db, "CPPFLAGS", "CPPFLAGS"); _copyEnvironmentVariableToDb(db, "LDFLAGS", "LDFLAGS"); _copyEnvironmentVariableToDb(db, "TM2FLAGS", "TM2FLAGS"); } void _copyEnvironmentVariableToDb(GWEN_DB_NODE *db, const char *envName, const char *dbVarName) { const char *s; s=getenv(envName); if (s && *s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, dbVarName, s); } GWB_KEYVALUEPAIR_LIST *_readOptionsFromDb(GWEN_DB_NODE *db) { int i; GWB_KEYVALUEPAIR_LIST *kvpList; kvpList=GWB_KeyValuePair_List_new(); for (i=0; i<100; i++) { const char *sOption; GWEN_STRINGLIST *sl; sOption=GWEN_DB_GetCharValue(db, "option", i, NULL); if (sOption==NULL) break; sl=GWEN_StringList_fromString2(sOption, "=", 0, GWEN_TEXT_FLAGS_DEL_QUOTES | GWEN_TEXT_FLAGS_CHECK_BACKSLASH); if (sl) { const char *name; const char *value; name=GWEN_StringList_StringAt(sl, 0); value=GWEN_StringList_StringAt(sl, 1); if (name) { GWB_KEYVALUEPAIR *kvp; kvp=GWB_KeyValuePair_new(name, value); GWB_KeyValuePair_List_Add(kvp, kvpList); } GWEN_StringList_free(sl); } } /* for */ if (GWB_KeyValuePair_List_GetCount(kvpList)==0) { GWB_KeyValuePair_List_free(kvpList); return NULL; } return kvpList; } int _writeStaticLibHelper(const char *fileName) { int rv; static char *staticLibHelperContent= "#!/bin/sh\n" "\n" "TOOL=$1\n" "LIB=$2\n" "\n" "$TOOL -t $LIB | xargs ar rvs $LIB.new && mv -v $LIB.new $LIB"; unlink(fileName); rv=GWEN_SyncIo_Helper_WriteFile(fileName, (const uint8_t*) staticLibHelperContent, strlen(staticLibHelperContent)); if (rv<0) { DBG_ERROR(NULL, "Error writing static lib helper to \"%s\" (%d)", fileName, rv); return rv; } if (chmod(fileName, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP)==-1) { DBG_ERROR(NULL, "Error on chmod(%s): %s", fileName, strerror(errno)); return GWEN_ERROR_GENERIC; } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/tools/0000755000175000017500000000000015032533715015246 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/tools/trylink.h0000664000175000017500000000115714116666046017047 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_TRYLINK_H #define GWBUILD_TRYLINK_H #include "gwenbuild/types/gwenbuild.h" int GWB_Tools_TryLink(GWB_CONTEXT *context, const char *testCode, const char *libName); #endif gwenhywfar-5.12.1/tools/gwenbuild/tools/trycompile.c0000664000175000017500000000756514116666046017546 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/tools/trycompile.h" #include #include #include #include #include int GWB_Tools_TryCompile(GWB_CONTEXT *context, const char *testCode) { GWEN_BUFFER *argBuffer; GWEN_BUFFER *stdOutBuffer; GWEN_BUFFER *stdErrBuffer; const char *toolName; const char *s; int rv; toolName=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "GWBUILD_TOOL_CC", 0, "gcc"); if (!(toolName && *toolName)) { DBG_ERROR(NULL, "No tool name for \"CC\""); return GWEN_ERROR_INTERNAL; } rv=GWEN_SyncIo_Helper_WriteFile("conftest.c", (const uint8_t*) testCode, strlen(testCode)); if (rv<0) { DBG_ERROR(NULL, "Error writing conftest.c (%d)", rv); return rv; } stdOutBuffer=GWEN_Buffer_new(0, 256, 0, 1); stdErrBuffer=GWEN_Buffer_new(0, 256, 0, 1); argBuffer=GWEN_Buffer_new(0, 256, 0, 1); s=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "cflags", 0, NULL); if (s) { if (GWEN_Buffer_GetUsedBytes(argBuffer)) GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, s); } s=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "local/cflags", 0, NULL); if (s) { if (GWEN_Buffer_GetUsedBytes(argBuffer)) GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, s); } if (GWEN_Buffer_GetUsedBytes(argBuffer)) GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, "-c -fPIC -o conftest.o conftest.c"); rv=GWEN_Process_RunCommandWaitAndGather(toolName, GWEN_Buffer_GetStart(argBuffer), stdOutBuffer, stdErrBuffer); if (rv<0) { DBG_ERROR(NULL, "Error running gcc (%d)", rv); GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); unlink("conftest.c"); return rv; } GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); unlink("conftest.c"); unlink("conftest.o"); return rv; } int GWB_Tools_CheckCompilerArgs(GWB_CONTEXT *context, const char *compilerArgs) { GWEN_BUFFER *stdOutBuffer; GWEN_BUFFER *stdErrBuffer; const char *toolName; int rv; const char *testCode="int main(int argc, char **argv) { return 0;};\n"; GWEN_BUFFER *argBuffer; toolName=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "GWBUILD_TOOL_CC", 0, "gcc"); if (!(toolName && *toolName)) { DBG_ERROR(NULL, "No tool name for \"CC\""); return GWEN_ERROR_INTERNAL; } rv=GWEN_SyncIo_Helper_WriteFile("conftest.c", (const uint8_t*) testCode, strlen(testCode)); if (rv<0) { DBG_ERROR(NULL, "Error writing conftest.c (%d)", rv); return rv; } stdOutBuffer=GWEN_Buffer_new(0, 256, 0, 1); stdErrBuffer=GWEN_Buffer_new(0, 256, 0, 1); argBuffer=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(argBuffer, compilerArgs); GWEN_Buffer_AppendString(argBuffer, " -c -fPIC conftest.c -o conftest.o"); rv=GWEN_Process_RunCommandWaitAndGather(toolName, GWEN_Buffer_GetStart(argBuffer), stdOutBuffer, stdErrBuffer); if (rv<0) { DBG_ERROR(NULL, "Error running gcc (%d)", rv); GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); unlink("conftest.c"); return rv; } GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); unlink("conftest.c"); unlink("conftest.o"); return rv; } gwenhywfar-5.12.1/tools/gwenbuild/tools/trylink.c0000664000175000017500000000507714116666046017047 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/tools/trylink.h" #include #include #include #include #include int GWB_Tools_TryLink(GWB_CONTEXT *context, const char *testCode, const char *libName) { GWEN_BUFFER *argBuffer; GWEN_BUFFER *stdOutBuffer; GWEN_BUFFER *stdErrBuffer; const char *toolName; const char *s; int rv; toolName=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "GWBUILD_TOOL_CC", 0, "gcc"); if (!(toolName && *toolName)) { DBG_ERROR(NULL, "No tool name for \"CC\""); return GWEN_ERROR_INTERNAL; } rv=GWEN_SyncIo_Helper_WriteFile("conftest.c", (const uint8_t*) testCode, strlen(testCode)); if (rv<0) { DBG_ERROR(NULL, "Error writing conftest.c (%d)", rv); return rv; } stdOutBuffer=GWEN_Buffer_new(0, 256, 0, 1); stdErrBuffer=GWEN_Buffer_new(0, 256, 0, 1); argBuffer=GWEN_Buffer_new(0, 256, 0, 1); s=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "ldflags", 0, NULL); if (s) { if (GWEN_Buffer_GetUsedBytes(argBuffer)) GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, s); } s=GWEN_DB_GetCharValue(GWB_Context_GetVars(context), "local/ldflags", 0, NULL); if (s) { if (GWEN_Buffer_GetUsedBytes(argBuffer)) GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, s); } if (GWEN_Buffer_GetUsedBytes(argBuffer)) GWEN_Buffer_AppendString(argBuffer, " "); GWEN_Buffer_AppendString(argBuffer, "-fPIC conftest.c -o conftest"); if (libName) { GWEN_Buffer_AppendString(argBuffer, " -l"); GWEN_Buffer_AppendString(argBuffer, libName); } rv=GWEN_Process_RunCommandWaitAndGather(toolName, GWEN_Buffer_GetStart(argBuffer), stdOutBuffer, stdErrBuffer); if (rv<0) { DBG_ERROR(NULL, "Error running gcc (%d)", rv); GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); return rv; } GWEN_Buffer_free(argBuffer); GWEN_Buffer_free(stdErrBuffer); GWEN_Buffer_free(stdOutBuffer); unlink("conftest.c"); unlink("conftest"); return rv; } gwenhywfar-5.12.1/tools/gwenbuild/tools/trycompile.h0000664000175000017500000000126514116666046017542 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_TRYCOMPILE_H #define GWBUILD_TRYCOMPILE_H #include "gwenbuild/types/gwenbuild.h" int GWB_Tools_TryCompile(GWB_CONTEXT *context, const char *testCode); int GWB_Tools_CheckCompilerArgs(GWB_CONTEXT *context, const char *compilerArgs); #endif gwenhywfar-5.12.1/tools/gwenbuild/tools/Makefile.am0000664000175000017500000000036714125675316017240 00000000000000INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES=libgwb_tools.la libgwb_tools_la_SOURCES=\ trycompile.c \ trylink.c noinst_HEADERS=\ trycompile.h \ trylink.h gwenhywfar-5.12.1/tools/gwenbuild/tools/Makefile.in0000644000175000017500000006015315032533615017237 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgwb_tools_la_LIBADD = am_libgwb_tools_la_OBJECTS = trycompile.lo trylink.lo libgwb_tools_la_OBJECTS = $(am_libgwb_tools_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/trycompile.Plo \ ./$(DEPDIR)/trylink.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwb_tools_la_SOURCES) DIST_SOURCES = $(libgwb_tools_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES = libgwb_tools.la libgwb_tools_la_SOURCES = \ trycompile.c \ trylink.c noinst_HEADERS = \ trycompile.h \ trylink.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/tools/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwb_tools.la: $(libgwb_tools_la_OBJECTS) $(libgwb_tools_la_DEPENDENCIES) $(EXTRA_libgwb_tools_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgwb_tools_la_OBJECTS) $(libgwb_tools_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trycompile.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trylink.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/trycompile.Plo -rm -f ./$(DEPDIR)/trylink.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/trycompile.Plo -rm -f ./$(DEPDIR)/trylink.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/c_dist.c0000664000175000017500000001215714144206312015440 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "c_dist.h" #include "utils.h" #include "gwenbuild/filenames.h" #include #include #include #include #include #include #include #include #include static int _writeDistFiles(const char *initialSourceDir, const GWB_FILE_LIST2 *fileList, const char *folder); int GWB_MkDist() { GWB_FILE_LIST2 *projectFileList; GWEN_XMLNODE *xmlProjectInfo; GWEN_BUFFER *nameBuf; const char *initialSourceDir; const char *projectName; int versionMajor; int versionMinor; int versionPatchlevel; int versionBuild; const char *versionTag; int rv; projectFileList=GWB_Utils_ReadFileList2(GWBUILD_FILE_FILES); if (projectFileList==NULL) { DBG_ERROR(NULL, "No file list read."); return GWEN_ERROR_GENERIC; } xmlProjectInfo=GWB_Utils_ReadProjectInfoFromFile(GWBUILD_FILE_PROJECTINFO); if (xmlProjectInfo==NULL) { DBG_ERROR(NULL, "Error reading project info."); GWB_File_List2_free(projectFileList); return GWEN_ERROR_GENERIC; } initialSourceDir=GWEN_XMLNode_GetCharValue(xmlProjectInfo, "initialSourceDir", NULL); projectName=GWEN_XMLNode_GetCharValue(xmlProjectInfo, "projectName", NULL); versionMajor=GWEN_XMLNode_GetIntValue(xmlProjectInfo, "versionMajor", 0); versionMinor=GWEN_XMLNode_GetIntValue(xmlProjectInfo, "versionMinor", 0); versionPatchlevel=GWEN_XMLNode_GetIntValue(xmlProjectInfo, "versionPatchlevel", 0); versionBuild=GWEN_XMLNode_GetIntValue(xmlProjectInfo, "versionBuild", 0); versionTag=GWEN_XMLNode_GetCharValue(xmlProjectInfo, "versionTag", NULL); if (!(projectName && *projectName)) { DBG_ERROR(NULL, "Missing project name in project info file"); GWEN_XMLNode_free(xmlProjectInfo); GWB_File_List2_free(projectFileList); return GWEN_ERROR_GENERIC; } nameBuf=GWEN_Buffer_new(0, 256, 0, 1); if (versionBuild>0) GWEN_Buffer_AppendArgs(nameBuf, "%s-%d.%d.%d.%d%s", projectName, versionMajor, versionMinor, versionPatchlevel, versionBuild, versionTag?versionTag:""); else GWEN_Buffer_AppendArgs(nameBuf, "%s-%d.%d.%d%s", projectName, versionMajor, versionMinor, versionPatchlevel, versionTag?versionTag:""); rv=_writeDistFiles(initialSourceDir, projectFileList, GWEN_Buffer_GetStart(nameBuf)); if (rv<0) { DBG_ERROR(NULL, "Error copying files into dist folder \"%s\"", GWEN_Buffer_GetStart(nameBuf)); GWEN_Buffer_free(nameBuf); GWEN_XMLNode_free(xmlProjectInfo); GWB_File_List2_free(projectFileList); return rv; } GWEN_Buffer_free(nameBuf); GWEN_XMLNode_free(xmlProjectInfo); GWB_File_List2_free(projectFileList); return 0; } int _writeDistFiles(const char *initialSourceDir, const GWB_FILE_LIST2 *fileList, const char *folder) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; GWEN_BUFFER *sourceNameBuf; GWEN_BUFFER *destNameBuf; sourceNameBuf=GWEN_Buffer_new(0, 256, 0, 1); destNameBuf=GWEN_Buffer_new(0, 256, 0, 1); file=GWB_File_List2Iterator_Data(it); while(file) { uint32_t flags; const char *s; flags=GWB_File_GetFlags(file); if (flags & GWB_FILE_FLAGS_DIST) { int rv; /* generate source path */ if (!(flags & GWB_FILE_FLAGS_GENERATED)) { GWEN_Buffer_AppendString(sourceNameBuf, initialSourceDir); GWEN_Buffer_AppendString(sourceNameBuf, GWEN_DIR_SEPARATOR_S); } s=GWB_File_GetFolder(file); if (s && *s) { GWEN_Buffer_AppendString(sourceNameBuf, s); GWEN_Buffer_AppendString(sourceNameBuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(sourceNameBuf, GWB_File_GetName(file)); /* generate target path */ GWEN_Buffer_AppendString(destNameBuf, folder); GWEN_Buffer_AppendString(destNameBuf, GWEN_DIR_SEPARATOR_S); if (s && *s) { GWEN_Buffer_AppendString(destNameBuf, s); GWEN_Buffer_AppendString(destNameBuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(destNameBuf, GWB_File_GetName(file)); fprintf(stdout, "Moving file '%s' into dist folder\n", GWEN_Buffer_GetStart(sourceNameBuf)); rv=GWB_Utils_CopyFile(GWEN_Buffer_GetStart(sourceNameBuf), GWEN_Buffer_GetStart(destNameBuf)); if (rv<0) { DBG_ERROR(NULL, "Error copying \"%s\" into dist folder (%d)", GWEN_Buffer_GetStart(sourceNameBuf), rv); GWEN_Buffer_free(sourceNameBuf); GWEN_Buffer_free(destNameBuf); return rv; } GWEN_Buffer_Reset(sourceNameBuf); GWEN_Buffer_Reset(destNameBuf); } file=GWB_File_List2Iterator_Next(it); } GWEN_Buffer_free(sourceNameBuf); GWEN_Buffer_free(destNameBuf); GWB_File_List2Iterator_free(it); } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/c_clean.c0000664000175000017500000000313314144206312015551 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "c_clean.h" #include "utils.h" #include "gwenbuild/filenames.h" #include #include #include int GWB_Clean(const char *fname) { GWB_FILE_LIST2 *fileList; fileList=GWB_Utils_ReadFileList2(fname); if (fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; GWEN_BUFFER *fnameBuf; fnameBuf=GWEN_Buffer_new(0, 256, 0, 1); file=GWB_File_List2Iterator_Data(it); while(file) { if (GWB_File_GetFlags(file) & GWB_FILE_FLAGS_GENERATED) { const char *s; s=GWB_File_GetFolder(file); if (s && *s) { GWEN_Buffer_AppendString(fnameBuf, s); GWEN_Buffer_AppendString(fnameBuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(fnameBuf, GWB_File_GetName(file)); fprintf(stdout, "Deleting '%s'\n", GWEN_Buffer_GetStart(fnameBuf)); unlink(GWEN_Buffer_GetStart(fnameBuf)); GWEN_Buffer_Reset(fnameBuf); } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } GWB_File_List2_free(fileList); } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/c_build.c0000664000175000017500000000343414465136507015610 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "c_build.h" #include "c_setup.h" #include "utils.h" #include "gwenbuild/buildctx/buildctx_xml.h" #include "gwenbuild/buildctx/buildctx_run.h" #include "gwenbuild/filenames.h" #include int GWB_Build(GWEN_DB_NODE *dbArgs) { GWB_BUILD_CONTEXT *buildCtx; int rv; int numThreads; const char *builderName; numThreads=GWEN_DB_GetIntValue(dbArgs, "jobs", 0, 1); builderName=GWEN_DB_GetCharValue(dbArgs, "builder", 0, NULL); if (GWB_Utils_BuildFilesChanged(GWBUILD_FILE_BUILDFILES)) { fprintf(stdout, "Build files changed, repeating last setup command.\n"); rv=GWB_RepeatLastSetup(GWBUILD_FILE_ARGS); if (rv<0) { DBG_INFO(NULL, "here"); return rv; } } buildCtx=GWB_BuildCtx_ReadFromXmlFile(GWBUILD_FILE_CTX); if (buildCtx==NULL) { fprintf(stderr, "ERROR: Error reading build context from file.\n"); return 2; } /* first build typemaker2 files */ if (!(builderName && *builderName)) { rv=GWB_BuildCtx_Run(buildCtx, numThreads, 0, "tm2builder"); if (rv<0) { fprintf(stderr, "ERROR: Error building typermaker2 files.\n"); return 3; } } /* build the rest */ rv=GWB_BuildCtx_Run(buildCtx, numThreads, 0, builderName); if (rv<0) { fprintf(stderr, "ERROR: Error building builds.\n"); return 3; } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/Makefile.in0000644000175000017500000007752315032533615016110 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gwbuild$(EXEEXT) subdir = tools/gwenbuild ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gwbuild_OBJECTS = main.$(OBJEXT) utils.$(OBJEXT) c_setup.$(OBJEXT) \ c_prepare.$(OBJEXT) c_build.$(OBJEXT) c_install.$(OBJEXT) \ c_clean.$(OBJEXT) c_dist.$(OBJEXT) gwbuild_OBJECTS = $(am_gwbuild_OBJECTS) am__DEPENDENCIES_1 = gwbuild_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ types/libgwb_types.la parser/libgwb_parser.la \ tools/libgwb_tools.la builders/libgwb_builders.la \ buildctx/libgwb_build.la $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/c_build.Po ./$(DEPDIR)/c_clean.Po \ ./$(DEPDIR)/c_dist.Po ./$(DEPDIR)/c_install.Po \ ./$(DEPDIR)/c_prepare.Po ./$(DEPDIR)/c_setup.Po \ ./$(DEPDIR)/main.Po ./$(DEPDIR)/utils.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gwbuild_SOURCES) DIST_SOURCES = $(gwbuild_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ SUBDIRS = types parser tools buildctx builders templates INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) gwbuild_SOURCES = \ main.c \ utils.c \ c_setup.c \ c_prepare.c \ c_build.c \ c_install.c \ c_clean.c \ c_dist.c noinst_HEADERS = \ utils.h \ c_setup.h \ c_prepare.h \ c_build.h \ c_install.h \ c_clean.h \ c_dist.h \ filenames.h gwbuild_LDADD = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ types/libgwb_types.la \ parser/libgwb_parser.la \ tools/libgwb_tools.la \ builders/libgwb_builders.la \ buildctx/libgwb_build.la \ $(PROG_LIBRARIES) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list gwbuild$(EXEEXT): $(gwbuild_OBJECTS) $(gwbuild_DEPENDENCIES) $(EXTRA_gwbuild_DEPENDENCIES) @rm -f gwbuild$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gwbuild_OBJECTS) $(gwbuild_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_build.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_clean.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_dist.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_install.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_prepare.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_setup.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/c_build.Po -rm -f ./$(DEPDIR)/c_clean.Po -rm -f ./$(DEPDIR)/c_dist.Po -rm -f ./$(DEPDIR)/c_install.Po -rm -f ./$(DEPDIR)/c_prepare.Po -rm -f ./$(DEPDIR)/c_setup.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/utils.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/c_build.Po -rm -f ./$(DEPDIR)/c_clean.Po -rm -f ./$(DEPDIR)/c_dist.Po -rm -f ./$(DEPDIR)/c_install.Po -rm -f ./$(DEPDIR)/c_prepare.Po -rm -f ./$(DEPDIR)/c_setup.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/utils.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/utils.c0000664000175000017500000005357514642065262015356 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "utils.h" #include #include #include #include #include #include #include #include #include #include #include static GWB_KEYVALUEPAIR_LIST *_generateInstallList(const GWB_FILE_LIST2 *fileList, const char *initialSourceDir); static int _filesChanged(const char *fileName, GWEN_STRINGLIST *slFileNameList); static GWEN_STRINGLIST *_readBuildFileList(const char *fileName); static void _writeProjectNameAndVersionToXml(const GWB_PROJECT *project, GWEN_XMLNODE *xmlNode); static int _readIntUntilPointOrHyphen(const char **ptrToStringPtr); static int _readAndStoreNextVersionPart(const char **s, GWEN_DB_NODE *db, const char *varNamePrefix, const char *varName); static int _copyLink(const char *sSrcPath, const char *sDestPath, const struct stat *st); static int _copyRegFile(const char *sSrcPath, const char *sDestPath, const struct stat *st); int GWB_Utils_WriteProjectFileList(const GWB_PROJECT *project, const char *fileName) { GWB_FILE_LIST2 *fileList; fileList=GWB_Project_GetFileList(project); if (fileList) { GWEN_XMLNODE *xmlNode; GWEN_XMLNODE *xmlFileList; int rv; xmlNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlFileList=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "FileList"); GWB_File_List2_WriteXml(fileList, xmlFileList, "file"); GWEN_XMLNode_AddChild(xmlNode, xmlFileList); rv=GWEN_XMLNode_WriteFile(xmlNode, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlNode); if (rv<0) { DBG_ERROR(NULL, "Error writing FileList to file \"%s\" (%d)", fileName, rv); return rv; } } return 0; } GWB_FILE_LIST2 *GWB_Utils_ReadFileList2(const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlFileList; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "Error reading build file list from \"%s\"", fileName); GWEN_XMLNode_free(xmlRoot); return NULL; } xmlFileList=GWEN_XMLNode_FindFirstTag(xmlRoot, "FileList", NULL, NULL); if (xmlFileList) { GWB_FILE_LIST2 *fileList; fileList=GWB_File_List2_new(); GWB_File_List2_ReadXml(xmlFileList, "file", fileList); if (GWB_File_List2_GetSize(fileList)==0) { GWB_File_List2_free(fileList); GWEN_XMLNode_free(xmlRoot); return NULL; } return fileList; } GWEN_XMLNode_free(xmlRoot); return NULL; } int GWB_Utils_WriteBuildFileList(const GWENBUILD *gwenbuild, const char *fileName) { GWEN_STRINGLIST *sl; sl=GWBUILD_GetBuildFilenameList(gwenbuild); if (sl) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlFileList; GWEN_STRINGLISTENTRY *se; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlFileList=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "BuildFiles"); GWEN_XMLNode_AddChild(xmlRoot, xmlFileList); se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { GWEN_XMLNODE *xmlFile; GWEN_XMLNODE *xmlFileName; xmlFile=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "File"); xmlFileName=GWEN_XMLNode_new(GWEN_XMLNodeTypeData, s); GWEN_XMLNode_AddChild(xmlFile, xmlFileName); GWEN_XMLNode_AddChild(xmlFileList, xmlFile); } se=GWEN_StringListEntry_Next(se); } rv=GWEN_XMLNode_WriteFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlRoot); if (rv<0) { DBG_ERROR(NULL, "Error writing build file list to file \"%s\" (%d)", fileName, rv); return rv; } } return 0; } int GWB_Utils_WriteInstallFileList(const GWB_PROJECT *project, const char *fileName) { GWB_KEYVALUEPAIR_LIST *genFileList; const char *initialSourceDir; initialSourceDir=GWB_Context_GetInitialSourceDir(GWB_Project_GetRootContext(project)); genFileList=_generateInstallList(GWB_Project_GetFileList(project), initialSourceDir); if (genFileList) { GWB_KEYVALUEPAIR *kvp; GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlFileList; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlFileList=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "InstallFiles"); GWEN_XMLNode_AddChild(xmlRoot, xmlFileList); kvp=GWB_KeyValuePair_List_First(genFileList); while(kvp) { const char *sDestPath; const char *sSrcPath; sDestPath=GWB_KeyValuePair_GetKey(kvp); sSrcPath=GWB_KeyValuePair_GetValue(kvp); if (sDestPath && sSrcPath) { GWEN_XMLNODE *xmlFile; xmlFile=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "InstallFile"); GWEN_XMLNode_SetCharValue(xmlFile, "destination", sDestPath); GWEN_XMLNode_SetCharValue(xmlFile, "source", sSrcPath); GWEN_XMLNode_AddChild(xmlFileList, xmlFile); } kvp=GWB_KeyValuePair_List_Next(kvp); } rv=GWEN_XMLNode_WriteFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlRoot); if (rv<0) { DBG_ERROR(NULL, "Error writing build file list to file \"%s\" (%d)", fileName, rv); return rv; } } return 0; } GWB_KEYVALUEPAIR_LIST *GWB_Utils_ReadInstallFileList(const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlFileList; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "Error reading build file list from \"%s\"", fileName); GWEN_XMLNode_free(xmlRoot); return NULL; } xmlFileList=GWEN_XMLNode_FindFirstTag(xmlRoot, "InstallFiles", NULL, NULL); if (xmlFileList) { GWB_KEYVALUEPAIR_LIST *kvpList; GWEN_XMLNODE *xmlFile; kvpList=GWB_KeyValuePair_List_new(); xmlFile=GWEN_XMLNode_FindFirstTag(xmlFileList, "InstallFile", NULL, NULL); while(xmlFile) { GWB_KEYVALUEPAIR *kvp; const char *sDestPath; const char *sSrcPath; sDestPath=GWEN_XMLNode_GetCharValue(xmlFile, "destination", NULL); sSrcPath=GWEN_XMLNode_GetCharValue(xmlFile, "source", NULL); kvp=GWB_KeyValuePair_new(sDestPath, sSrcPath); GWB_KeyValuePair_List_Add(kvp, kvpList); xmlFile=GWEN_XMLNode_FindNextTag(xmlFile, "InstallFile", NULL, NULL); } GWEN_XMLNode_free(xmlRoot); if (GWB_KeyValuePair_List_GetCount(kvpList)==0) { GWB_KeyValuePair_List_free(kvpList); return NULL; } return kvpList; } GWEN_XMLNode_free(xmlRoot); return NULL; } GWB_KEYVALUEPAIR_LIST *_generateInstallList(const GWB_FILE_LIST2 *fileList, const char *initialSourceDir) { if (fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; GWB_KEYVALUEPAIR_LIST *kvpList; GWEN_BUFFER *keyBuf; GWEN_BUFFER *valueBuf; keyBuf=GWEN_Buffer_new(0, 256, 0, 1); valueBuf=GWEN_Buffer_new(0, 256, 0, 1); kvpList=GWB_KeyValuePair_List_new(); file=GWB_File_List2Iterator_Data(it); while(file) { if (GWB_File_GetFlags(file) & GWB_FILE_FLAGS_INSTALL) { const char *s; GWB_KEYVALUEPAIR *kvp; s=GWB_File_GetInstallPath(file); if (s && *s) { const char *destFileName; destFileName=GWB_File_GetInstallName(file); if (!(destFileName && *destFileName)) destFileName=GWB_File_GetName(file); GWEN_Buffer_AppendString(keyBuf, s); GWEN_Buffer_AppendString(keyBuf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(keyBuf, destFileName); GWB_File_WriteFileNameToTopBuildDirString(file, initialSourceDir, valueBuf); kvp=GWB_KeyValuePair_new(GWEN_Buffer_GetStart(keyBuf), GWEN_Buffer_GetStart(valueBuf)); GWB_KeyValuePair_List_Add(kvp, kvpList); GWEN_Buffer_Reset(valueBuf); GWEN_Buffer_Reset(keyBuf); } } file=GWB_File_List2Iterator_Next(it); } GWEN_Buffer_free(valueBuf); GWEN_Buffer_free(keyBuf); GWB_File_List2Iterator_free(it); if (GWB_KeyValuePair_List_GetCount(kvpList)==0) { GWB_KeyValuePair_List_free(kvpList); return NULL; } return kvpList; } } return NULL; } int GWB_Utils_BuildFilesChanged(const char *fileName) { GWEN_STRINGLIST *slFileNameList; slFileNameList=_readBuildFileList(fileName); if (slFileNameList) { if (_filesChanged(fileName, slFileNameList)) { GWEN_StringList_free(slFileNameList); return 1; } GWEN_StringList_free(slFileNameList); } return 0; } int _filesChanged(const char *fileName, GWEN_STRINGLIST *slFileNameList) { time_t mtSourceFile; GWEN_STRINGLISTENTRY *se; mtSourceFile=GWBUILD_GetModificationTimeOfFile(fileName); if (mtSourceFile==(time_t) 0) { DBG_INFO(NULL, "here"); return 1; /* assume changed */ } se=GWEN_StringList_FirstEntry(slFileNameList); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { time_t mt; mt=GWBUILD_GetModificationTimeOfFile(s); if (mt!=(time_t) 0) { if (difftime(mt, mtSourceFile)>0) { DBG_ERROR(NULL, "File \"%s\" changed.", s); return 1; } } } se=GWEN_StringListEntry_Next(se); } DBG_DEBUG(NULL, "Files unchanged since last setup."); return 0; } GWEN_STRINGLIST *_readBuildFileList(const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlFileList; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "Error reading build file list from \"%s\"", fileName); GWEN_XMLNode_free(xmlRoot); return NULL; } xmlFileList=GWEN_XMLNode_FindFirstTag(xmlRoot, "BuildFiles", NULL, NULL); if (xmlFileList) { GWEN_STRINGLIST *sl; GWEN_XMLNODE *xmlFile; sl=GWEN_StringList_new(); xmlFile=GWEN_XMLNode_FindFirstTag(xmlFileList, "File", NULL, NULL); while(xmlFile) { GWEN_XMLNODE *xmlFileName; xmlFileName=GWEN_XMLNode_GetFirstData(xmlFile); if (xmlFileName) { const char *s; s=GWEN_XMLNode_GetData(xmlFileName); if (s && *s) GWEN_StringList_AppendString(sl, s, 0, 1); } xmlFile=GWEN_XMLNode_FindNextTag(xmlFile, "File", NULL, NULL); } if (GWEN_StringList_Count(sl)==0) { GWEN_StringList_free(sl); GWEN_XMLNode_free(xmlRoot); return NULL; } GWEN_XMLNode_free(xmlRoot); return sl; } GWEN_XMLNode_free(xmlRoot); return NULL; } int GWB_Utils_WriteProjectToFile(const GWB_PROJECT *project, const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlProject; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlProject=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "Project"); GWB_Project_toXml(project, xmlProject); GWEN_XMLNode_AddChild(xmlRoot, xmlProject); rv=GWEN_XMLNode_WriteFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlRoot); if (rv<0) { DBG_ERROR(NULL, "Error writing project to file \"%s\" (%d)", fileName, rv); return rv; } return 0; } int GWB_Utils_WriteContextTreeToFile(const GWB_CONTEXT *ctx, const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlContext; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlContext=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "ContextTree"); GWB_Context_toXml(ctx, xmlContext, 1); GWEN_XMLNode_AddChild(xmlRoot, xmlContext); rv=GWEN_XMLNode_WriteFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlRoot); if (rv<0) { DBG_ERROR(NULL, "Error writing context tree to file \"%s\" (%d)", fileName, rv); return rv; } return 0; } int GWB_Utils_CopyFile(const char *sSrcPath, const char *sDestPath) { int rv; struct stat st; //#if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED #if ((_BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L) && !defined(__MINGW32__)) || defined(OS_DARWIN) rv=lstat(sSrcPath, &st); #else rv=stat(sSrcPath, &st); #endif if (rv == -1) { DBG_ERROR(NULL, "ERROR: stat(%s): %s", sSrcPath, strerror(errno)); return GWEN_ERROR_GENERIC; } #if ((_BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L) && !defined(__MINGW32__)) || defined(OS_DARWIN) if ((st.st_mode & S_IFMT)==S_IFLNK) { rv=_copyLink(sSrcPath, sDestPath, &st); if (rv<0) { DBG_ERROR(NULL, "ERROR: symlink(%s): %s", sSrcPath, strerror(errno)); return GWEN_ERROR_GENERIC; } } else #endif if ((st.st_mode & S_IFMT)==S_IFREG) { rv=_copyRegFile(sSrcPath, sDestPath, &st); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } else { DBG_ERROR(NULL, "Unhandled file type \"%s\"", sSrcPath); } return 0; } int _copyLink(const char *sSrcPath, const char *sDestPath, const struct stat *st) { char *symlinkbuf; int bufSizeNeeded; int rv; /* copy symlink */ if (st->st_size==0) bufSizeNeeded=256; else bufSizeNeeded=st->st_size+1; symlinkbuf=(char*) malloc(bufSizeNeeded); assert(symlinkbuf); rv=readlink(sSrcPath, symlinkbuf, bufSizeNeeded); /* doesn't add '0'!! */ if (rv==-1) { DBG_ERROR(NULL, "ERROR: readlink(%s): %s", sSrcPath, strerror(errno)); free(symlinkbuf); return GWEN_ERROR_GENERIC; } else if (rv==bufSizeNeeded) { DBG_ERROR(NULL, "Buffer too small (%d)", bufSizeNeeded); free(symlinkbuf); return GWEN_ERROR_GENERIC; } symlinkbuf[rv]=0; rv=GWEN_Directory_GetPath(sDestPath, GWEN_DIR_FLAGS_PUBLIC_PATH | GWEN_DIR_FLAGS_PUBLIC_NAME | GWEN_PATH_FLAGS_VARIABLE| GWEN_PATH_FLAGS_CHECKROOT); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); free(symlinkbuf); return rv; } unlink(sDestPath); rv=symlink(symlinkbuf, sDestPath); if (rv==-1) { DBG_ERROR(NULL, "ERROR: symlink(%s): %s", sSrcPath, strerror(errno)); free(symlinkbuf); return GWEN_ERROR_GENERIC; } return 0; } int _copyRegFile(const char *sSrcPath, const char *sDestPath, const struct stat *st) { mode_t newMode=0; int rv; rv=GWEN_Directory_GetPath(sDestPath, GWEN_DIR_FLAGS_PUBLIC_PATH | GWEN_DIR_FLAGS_PUBLIC_NAME | GWEN_PATH_FLAGS_VARIABLE| GWEN_PATH_FLAGS_CHECKROOT); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } rv=GWEN_SyncIo_Helper_CopyFile(sSrcPath, sDestPath); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } newMode=S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH; if (st->st_mode & S_IXUSR) newMode|=S_IXUSR|S_IXGRP|S_IXOTH; rv=chmod(sDestPath, newMode); if (rv<0) { DBG_ERROR(NULL, "ERROR: chmod(%s): %s", sSrcPath, strerror(errno)); return rv; } return 0; } int GWB_Utils_WriteProjectInfoToFile(const GWB_PROJECT *project, const char *fileName) { GWB_CONTEXT *rootContext; GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlProject; const char *initialSourceDir; int rv; rootContext=GWB_Project_GetRootContext(project); initialSourceDir=GWB_Context_GetInitialSourceDir(rootContext); xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlProject=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "ProjectInfo"); if (initialSourceDir && *initialSourceDir) GWEN_XMLNode_SetCharValue(xmlProject, "initialSourceDir", initialSourceDir); _writeProjectNameAndVersionToXml(project, xmlProject); GWEN_XMLNode_AddChild(xmlRoot, xmlProject); rv=GWEN_XMLNode_WriteFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlRoot); if (rv<0) { DBG_ERROR(NULL, "Error writing project to file \"%s\" (%d)", fileName, rv); return rv; } return 0; } void _writeProjectNameAndVersionToXml(const GWB_PROJECT *project, GWEN_XMLNODE *xmlNode) { const char *s; s=GWB_Project_GetProjectName(project); if (s) GWEN_XMLNode_SetCharValue(xmlNode, "projectName", s); GWEN_XMLNode_SetIntValue(xmlNode, "versionMajor", GWB_Project_GetVersionMajor(project)); GWEN_XMLNode_SetIntValue(xmlNode, "versionMinor", GWB_Project_GetVersionMinor(project)); GWEN_XMLNode_SetIntValue(xmlNode, "versionPatchlevel", GWB_Project_GetVersionPatchlevel(project)); GWEN_XMLNode_SetIntValue(xmlNode, "versionBuild", GWB_Project_GetVersionBuild(project)); s=GWB_Project_GetVersionTag(project); if (s) GWEN_XMLNode_SetCharValue(xmlNode, "versionTag", s); } GWEN_XMLNODE *GWB_Utils_ReadProjectInfoFromFile(const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlProjectInfo; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "Error reading project info from \"%s\"", fileName); GWEN_XMLNode_free(xmlRoot); return NULL; } xmlProjectInfo=GWEN_XMLNode_FindFirstTag(xmlRoot, "ProjectInfo", NULL, NULL); if (xmlProjectInfo) { GWEN_XMLNode_UnlinkChild(xmlRoot, xmlProjectInfo); GWEN_XMLNode_free(xmlRoot); return xmlProjectInfo; } GWEN_XMLNode_free(xmlRoot); return NULL; } int GWB_Utils_VersionStringToDb(GWEN_DB_NODE *db, const char *prefix, const char *s) { const char *p; int rv; p=s; while(*p && *p<33) s++; if (isdigit(*p)) { rv=_readAndStoreNextVersionPart(&p, db, prefix, "vmajor"); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return rv; } } if (*p=='.') { rv=_readAndStoreNextVersionPart(&p, db, prefix, "vminor"); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return rv; } } if (*p=='.') { rv=_readAndStoreNextVersionPart(&p, db, prefix, "vpatchlevel"); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return rv; } } if (*p=='.') { rv=_readAndStoreNextVersionPart(&p, db, prefix, "vbuild"); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return rv; } } if (*p=='-') { p++; if (prefix && *prefix) { GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, prefix); GWEN_Buffer_AppendString(buf, "vtag"); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_Buffer_GetStart(buf), p); GWEN_Buffer_free(buf); } else GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "vtag", p); } return 0; } int _readAndStoreNextVersionPart(const char **s, GWEN_DB_NODE *db, const char *varNamePrefix, const char *varName) { const char *p; int rv; p=*s; if (*p=='.') p++; rv=_readIntUntilPointOrHyphen(&p); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", *s); return GWEN_ERROR_GENERIC; } if (varNamePrefix && *varNamePrefix) { GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(buf, varNamePrefix); GWEN_Buffer_AppendString(buf, varName); GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_Buffer_GetStart(buf), rv); GWEN_Buffer_free(buf); } else GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, varName, rv); *s=p; return 0; } int GWB_Utils_VersionStringToInt(const char *s) { const char *p; unsigned int vmajor=0; unsigned int vminor=0; unsigned int vpatchlevel=0; unsigned int vbuild=0; int rv; p=s; while(*p && *p<33) s++; if (isdigit(*p)) { rv=_readIntUntilPointOrHyphen(&p); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return GWEN_ERROR_GENERIC; } vmajor=rv & 0xff; } if (*p=='.') { p++; rv=_readIntUntilPointOrHyphen(&p); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return GWEN_ERROR_GENERIC; } vminor=rv & 0xff; } if (*p=='.') { p++; rv=_readIntUntilPointOrHyphen(&p); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return GWEN_ERROR_GENERIC; } vpatchlevel=rv & 0xff; } if (*p=='.') { p++; rv=_readIntUntilPointOrHyphen(&p); if (rv<0) { DBG_ERROR(NULL, "Invalid version spec \"%s\"", s); return GWEN_ERROR_GENERIC; } vbuild=rv & 0xff; } return (int) ((vmajor<<24)+(vminor<<16)+(vpatchlevel<<8)+vbuild); } int _readIntUntilPointOrHyphen(const char **s) { int i=0; const char *p; p=*s; while(*p && *p!='.' && *p!='-') { int c; c=(*p)-'0'; if (c<0 || c>9) { DBG_ERROR(NULL, "Invalid version string \"%s\"", *s); return GWEN_ERROR_GENERIC; } i=(i*10)+c; p++; } *s=p; return i; } void GWB_Utils_VersionToDbVar(GWEN_DB_NODE *db, const char *dbVarName, int vmajor, int vminor, int vpatchlevel, int vbuild, const char *vtag) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); if (vbuild>0) GWEN_Buffer_AppendArgs(dbuf, "%d.%d.%d.%d", vmajor, vminor, vpatchlevel, vbuild); else GWEN_Buffer_AppendArgs(dbuf, "%d.%d.%d", vmajor, vminor, vpatchlevel); if (vtag && *vtag) { GWEN_Buffer_AppendString(dbuf, "-"); GWEN_Buffer_AppendArgs(dbuf, "%s", vtag); } GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, dbVarName, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/0000755000175000017500000000000015032533715015724 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/buildctx/Makefile.in0000644000175000017500000006270015032533615017715 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/buildctx ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgwb_build_la_LIBADD = am_libgwb_build_la_OBJECTS = buildcmd.lo buildsubcmd.lo buildctx.lo \ buildctx_bdeps.lo buildctx_depfile.lo buildctx_run.lo \ buildctx_xml.lo libgwb_build_la_OBJECTS = $(am_libgwb_build_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/buildcmd.Plo \ ./$(DEPDIR)/buildctx.Plo ./$(DEPDIR)/buildctx_bdeps.Plo \ ./$(DEPDIR)/buildctx_depfile.Plo ./$(DEPDIR)/buildctx_run.Plo \ ./$(DEPDIR)/buildctx_xml.Plo ./$(DEPDIR)/buildsubcmd.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwb_build_la_SOURCES) DIST_SOURCES = $(libgwb_build_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES = libgwb_build.la libgwb_build_la_SOURCES = \ buildcmd.c \ buildsubcmd.c \ buildctx.c \ buildctx_bdeps.c \ buildctx_depfile.c \ buildctx_run.c \ buildctx_xml.c noinst_HEADERS = \ buildcmd.h \ buildcmd_p.h \ buildsubcmd.h \ buildsubcmd_p.h \ buildctx.h \ buildctx_p.h \ buildctx_bdeps.h \ buildctx_depfile.h \ buildctx_run.h \ buildctx_xml.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/buildctx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/buildctx/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwb_build.la: $(libgwb_build_la_OBJECTS) $(libgwb_build_la_DEPENDENCIES) $(EXTRA_libgwb_build_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgwb_build_la_OBJECTS) $(libgwb_build_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildcmd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildctx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildctx_bdeps.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildctx_depfile.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildctx_run.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildctx_xml.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildsubcmd.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/buildcmd.Plo -rm -f ./$(DEPDIR)/buildctx.Plo -rm -f ./$(DEPDIR)/buildctx_bdeps.Plo -rm -f ./$(DEPDIR)/buildctx_depfile.Plo -rm -f ./$(DEPDIR)/buildctx_run.Plo -rm -f ./$(DEPDIR)/buildctx_xml.Plo -rm -f ./$(DEPDIR)/buildsubcmd.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/buildcmd.Plo -rm -f ./$(DEPDIR)/buildctx.Plo -rm -f ./$(DEPDIR)/buildctx_bdeps.Plo -rm -f ./$(DEPDIR)/buildctx_depfile.Plo -rm -f ./$(DEPDIR)/buildctx_run.Plo -rm -f ./$(DEPDIR)/buildctx_xml.Plo -rm -f ./$(DEPDIR)/buildsubcmd.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx.h0000664000175000017500000000430614460564441017644 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCTX_H #define GWBUILD_BUILDCTX_H #include typedef struct GWB_BUILD_CONTEXT GWB_BUILD_CONTEXT; #include "gwenbuild/buildctx/buildcmd.h" #include "gwenbuild/buildctx/buildsubcmd.h" #include "gwenbuild/types/file.h" GWB_BUILD_CONTEXT *GWB_BuildCtx_new(); void GWB_BuildCtx_free(GWB_BUILD_CONTEXT *bctx); const char *GWB_BuildCtx_GetInitialSourceDir(const GWB_BUILD_CONTEXT *bctx); void GWB_BuildCtx_SetInitialSourceDir(GWB_BUILD_CONTEXT *bctx, const char *s); GWB_BUILD_CMD_LIST2 *GWB_BuildCtx_GetCommandList(const GWB_BUILD_CONTEXT *bctx); void GWB_BuildCtx_AddCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd); GWB_FILE_LIST2 *GWB_BuildCtx_GetFileList(const GWB_BUILD_CONTEXT *bctx); void GWB_BuildCtx_AddFile(GWB_BUILD_CONTEXT *bctx, GWB_FILE *file); GWB_FILE *GWB_BuildCtx_GetFileByPathAndName(const GWB_BUILD_CONTEXT *bctx, const char *folder, const char *fname); void GWB_BuildCtx_AddInFilesToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList); void GWB_BuildCtx_AddOutFilesToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList); void GWB_BuildCtx_AddInFileToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file); void GWB_BuildCtx_AddOutFileToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file); const char *GWB_BuildCtx_GetLogPath(const GWB_BUILD_CONTEXT *bctx); void GWB_BuildCtx_SetLogPath(GWB_BUILD_CONTEXT *bctx, const char *s); int GWB_BuildCtx_CreateAndSetLogFilenameForSubCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_SUBCMD *cmd); void GWB_BuildCtx_toXml(const GWB_BUILD_CONTEXT *bctx, GWEN_XMLNODE *xmlNode); GWB_BUILD_CONTEXT *GWB_BuildCtx_fromXml(GWEN_XMLNODE *xmlNode); void GWB_BuildCtx_Dump(const GWB_BUILD_CONTEXT *bctx, int indent); #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_xml.c0000664000175000017500000002134414300757743020522 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "gwenbuild/buildctx/buildctx_p.h" #include "gwenbuild/buildctx/buildctx_xml.h" #include #include #include #include #include static void _writeFileList2ToXml(const GWB_FILE_LIST2 *fileList, GWEN_XMLNODE *xmlNode, const char *groupName); static void _readFilesFromXml(GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *destFileList); static void _writeCommandList2ToXml(const GWB_BUILD_CMD_LIST2 *commandList, GWEN_XMLNODE *xmlNode, const char *groupName); static void _readCommandsFromXml(GWB_BUILD_CONTEXT *bctx, GWEN_XMLNODE *xmlNode, const char *groupName); static void _writeFileFlagsToXml(uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName); static uint32_t _readFlagsFromChar(const char *flagsAsText); void GWB_BuildCtx_toXml(const GWB_BUILD_CONTEXT *bctx, GWEN_XMLNODE *xmlNode) { if (bctx->initialSourceDir) GWEN_XMLNode_SetCharValue(xmlNode, "initialSourceDir", bctx->initialSourceDir); if (bctx->fileList) { GWEN_XMLNODE *xmlGroupNode; xmlGroupNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "fileList"); _writeFileList2ToXml(bctx->fileList, xmlGroupNode, "file"); GWEN_XMLNode_AddChild(xmlNode, xmlGroupNode); } if (bctx->commandList) { GWEN_XMLNODE *xmlGroupNode; xmlGroupNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "commandList"); _writeCommandList2ToXml(bctx->commandList, xmlGroupNode, "command"); GWEN_XMLNode_AddChild(xmlNode, xmlGroupNode); } } GWB_BUILD_CONTEXT *GWB_BuildCtx_fromXml(GWEN_XMLNODE *xmlNode) { GWB_BUILD_CONTEXT *bctx; GWEN_XMLNODE *xmlGroupNode; const char *s; bctx=GWB_BuildCtx_new(); s=GWEN_XMLNode_GetCharValue(xmlNode, "initialSourceDir", NULL); if (s) GWB_BuildCtx_SetInitialSourceDir(bctx, s); xmlGroupNode=GWEN_XMLNode_FindFirstTag(xmlNode, "fileList", NULL, NULL); if (xmlGroupNode) _readFilesFromXml(xmlGroupNode, "file", bctx->fileList); xmlGroupNode=GWEN_XMLNode_FindFirstTag(xmlNode, "commandList", NULL, NULL); if (xmlGroupNode) _readCommandsFromXml(bctx, xmlGroupNode, "command"); return bctx; } void _writeCommandList2ToXml(const GWB_BUILD_CMD_LIST2 *commandList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(commandList); if (it) { const GWB_BUILD_CMD *cmd; cmd=GWB_BuildCmd_List2Iterator_Data(it); while(cmd) { GWEN_XMLNODE *entryNode; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWB_BuildCmd_toXml(cmd, entryNode); GWEN_XMLNode_AddChild(xmlNode, entryNode); cmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } void _writeFileList2ToXml(const GWB_FILE_LIST2 *fileList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWEN_XMLNODE *entryNode; const char *s; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWEN_XMLNode_SetIntProperty(entryNode, "id", (int) GWB_File_GetId(file)); s=GWB_File_GetFolder(file); if (s) GWEN_XMLNode_SetCharValue(entryNode, "folder", s); s=GWB_File_GetName(file); if (s) GWEN_XMLNode_SetCharValue(entryNode, "name", s); s=GWB_File_GetFileType(file); if (s) GWEN_XMLNode_SetCharValue(entryNode, "type", s); _writeFileFlagsToXml(GWB_File_GetFlags(file), entryNode, "flags"); GWEN_XMLNode_AddChild(xmlNode, entryNode); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void _writeFileFlagsToXml(uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName) { if (flags) { GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); if (flags & GWB_FILE_FLAGS_DIST) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "DIST"); } if (flags & GWB_FILE_FLAGS_INSTALL) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "INSTALL"); } if (flags & GWB_FILE_FLAGS_GENERATED) { if (GWEN_Buffer_GetUsedBytes(dbuf)) GWEN_Buffer_AppendString(dbuf, " "); GWEN_Buffer_AppendString(dbuf, "GENERATED"); } GWEN_XMLNode_SetCharValue(xmlNode, varName, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); } } void _readCommandsFromXml(GWB_BUILD_CONTEXT *bctx, GWEN_XMLNODE *xmlNode, const char *groupName) { GWEN_XMLNODE *xmlEntry; xmlEntry=GWEN_XMLNode_FindFirstTag(xmlNode, groupName, NULL, NULL); while(xmlEntry) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_fromXml(xmlEntry, bctx->fileList); GWB_BuildCmd_List2_PushBack(bctx->commandList, bcmd); xmlEntry=GWEN_XMLNode_FindNextTag(xmlEntry, groupName, NULL, NULL); } } void _readFilesFromXml(GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *destFileList) { GWEN_XMLNODE *xmlEntry; xmlEntry=GWEN_XMLNode_FindFirstTag(xmlNode, groupName, NULL, NULL); while(xmlEntry) { uint32_t id; id=(uint32_t) GWEN_XMLNode_GetIntProperty(xmlEntry, "id", 0); if (id==0) { DBG_ERROR(NULL, "FILE has no id"); } else { GWB_FILE *file; const char *folder; const char *name; const char *fileType; const char *flagsAsText; uint32_t flags; folder=GWEN_XMLNode_GetCharValue(xmlEntry, "folder", NULL); name=GWEN_XMLNode_GetCharValue(xmlEntry, "name", NULL); fileType=GWEN_XMLNode_GetCharValue(xmlEntry, "type", NULL); flagsAsText=GWEN_XMLNode_GetCharValue(xmlEntry, "flags", NULL); flags=_readFlagsFromChar(flagsAsText); file=GWB_File_new(folder, name, id); GWB_File_SetFlags(file, flags); GWB_File_SetFileType(file, fileType); GWB_File_List2_PushBack(destFileList, file); } xmlEntry=GWEN_XMLNode_FindNextTag(xmlEntry, groupName, NULL, NULL); } } uint32_t _readFlagsFromChar(const char *flagsAsText) { GWEN_STRINGLIST *sl; uint32_t flags=0; sl=GWEN_StringList_fromString(flagsAsText, " ", 1); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { if (strcasecmp(s, "DIST")==0) flags|=GWB_FILE_FLAGS_DIST; else if (strcasecmp(s, "INSTALL")==0) flags|=GWB_FILE_FLAGS_INSTALL; else if (strcasecmp(s, "GENERATED")==0) flags|=GWB_FILE_FLAGS_GENERATED; else { DBG_ERROR(NULL, "Unexpected FILE flag \"%s\"", s); } } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } return flags; } GWB_BUILD_CONTEXT *GWB_BuildCtx_ReadFromXmlFile(const char *fileName) { GWB_BUILD_CONTEXT *buildCtx; GWEN_XMLNODE *xmlNode; GWEN_XMLNODE *xmlBuildCtx; int rv; xmlNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlNode, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "Error reading BuildContext file \"%s\": Bad XML (%d)", fileName, rv); GWEN_XMLNode_free(xmlNode); return NULL; } xmlBuildCtx=GWEN_XMLNode_FindFirstTag(xmlNode, "BuildContext", NULL, NULL); if (xmlBuildCtx==NULL) { DBG_ERROR(NULL, "XML file \"%s\" doesn not contain a BuildContext element,", fileName); GWEN_XMLNode_free(xmlNode); return NULL; } buildCtx=GWB_BuildCtx_fromXml(xmlBuildCtx); GWEN_XMLNode_free(xmlNode); return buildCtx; } int GWB_BuildCtx_WriteToXmlFile(const GWB_BUILD_CONTEXT *buildCtx, const char *fileName) { GWEN_XMLNODE *xmlNode; GWEN_XMLNODE *xmlBuildCtx; int rv; xmlNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); xmlBuildCtx=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "BuildContext"); GWB_BuildCtx_toXml(buildCtx, xmlBuildCtx); GWEN_XMLNode_AddChild(xmlNode, xmlBuildCtx); rv=GWEN_XMLNode_WriteFile(xmlNode, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); GWEN_XMLNode_free(xmlNode); if (rv<0) { DBG_ERROR(NULL, "Error writing BuildContext to file \"%s\" (%d)", fileName, rv); return rv; } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildsubcmd_p.h0000664000175000017500000000134214460564441020637 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDSUBCMD_P_H #define GWBUILD_BUILDSUBCMD_P_H #include "gwenbuild/buildctx/buildsubcmd.h" struct GWB_BUILD_SUBCMD { GWEN_LIST_ELEMENT(GWB_BUILD_SUBCMD) uint32_t flags; char *command; char *arguments; char *buildMessage; char *depFilePath; char *logFilename; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_bdeps.h0000664000175000017500000000206714116666046021025 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCTX_BDEPS_H #define GWBUILD_BUILDCTX_BDEPS_H #include #include "gwenbuild/buildctx/buildctx.h" int GWB_BuildCtx_SetupDependencies(GWB_BUILD_CONTEXT *bctx); int GWB_BuildCtx_FillWaitingQueue(GWB_BUILD_CONTEXT *bctx, const char *builderName); int GWB_BuildCtx_AddBuildCmdsForFileToList(const GWB_FILE *file, GWB_BUILD_CMD_LIST2 *targetCmdList); int GWB_BuildCtx_AddBuildCmdsByBuilderNameToList(const GWB_BUILD_CMD_LIST2 *sourceCmdList, const char *builderName, GWB_BUILD_CMD_LIST2 *targetCmdList); #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_depfile.h0000664000175000017500000000125614144206312021322 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCTX_DEPFILE_H #define GWBUILD_BUILDCTX_DEPFILE_H #include #include "gwenbuild/buildctx/buildctx.h" GWEN_STRINGLIST *GWB_BuildCtx_ReadAndTranslateDepfile(const char *folder, const char *fileName); #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_p.h0000664000175000017500000000155114460564441020162 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCTX_P_H #define GWBUILD_BUILDCTX_P_H #include "gwenbuild/buildctx/buildctx.h" struct GWB_BUILD_CONTEXT { int lastFileId; char *initialSourceDir; GWB_BUILD_CMD_LIST2 *commandList; GWB_FILE_LIST2 *fileList; /* only used while running commands */ GWB_BUILD_CMD_LIST2 *waitingQueue; GWB_BUILD_CMD_LIST2 *runningQueue; GWB_BUILD_CMD_LIST2 *finishedQueue; char *logPath; int lastLogfileId; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildcmd_p.h0000664000175000017500000000163614301235317020122 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCMD_P_H #define GWBUILD_BUILDCMD_P_H #include "gwenbuild/buildctx/buildcmd.h" struct GWB_BUILD_CMD { GWEN_LIST_ELEMENT(GWB_BUILD_CMD) uint32_t flags; char *builderName; char *folder; char *buildMessage; GWB_BUILD_SUBCMD_LIST *prepareCommandList; GWB_BUILD_SUBCMD_LIST *buildCommandList; int blockingFiles; GWB_FILE_LIST2 *inFileList2; GWB_FILE_LIST2 *outFileList2; GWEN_PROCESS *currentProcess; GWB_BUILD_SUBCMD *currentCommand; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_run.c0000664000175000017500000005335014606171174020525 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "gwenbuild/buildctx/buildctx_p.h" #include "gwenbuild/buildctx/buildctx_run.h" #include "gwenbuild/buildctx/buildctx_bdeps.h" #include "gwenbuild/buildctx/buildctx_depfile.h" #include #include #include #include #include #include #include #include #include #define GWB_BUILDCTX_PROCESS_WAIT_TIMEOUT 10.0 static int _commandLogNum=0; static void _setupCommands(GWB_BUILD_CONTEXT *bctx, int forPrepareCommands); static void _createCommandQueues(GWB_BUILD_CONTEXT *bctx); static int _checkWaitingQueue(GWB_BUILD_CONTEXT *bctx, int maxStartAllowed); static int _startCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, const GWEN_STRINGLIST *slOutFiles); static int _checkRunningQueue(GWB_BUILD_CONTEXT *bctx); static void _signalJobFinished(GWB_BUILD_CMD *bcmd); static void _decBlockingFilesInWaitingBuildCommands(GWB_BUILD_CMD_LIST2 *waitingCommands); static void _printCmdOutputIfNotEmptyAndDeleteFile(GWB_BUILD_CMD *cmd, GWB_BUILD_SUBCMD *subCmd); static int _waitForRunningJobs(GWB_BUILD_CONTEXT *bctx); static void _abortAllCommands(GWB_BUILD_CONTEXT *bctx); static void _abortCommandsInQueue(GWB_BUILD_CMD_LIST2 *cmdList); static int _needRunCurrentCommand(GWB_BUILD_CMD *bcmd, const GWEN_STRINGLIST *slInFiles, const GWEN_STRINGLIST *slOutFiles); static void _finishCurrentCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *currentCommand); static int _checkDependencies(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *subCmd, const char *firstOutFileName); static int _checkDatesOfFileAgainstList(const char *fileName, const GWEN_STRINGLIST *sl); static int _inFilesNewerThanOutFiles(const GWEN_STRINGLIST *slInFiles, const GWEN_STRINGLIST *slOutFiles); static time_t _getHighestModificationTime(const GWEN_STRINGLIST *slFiles); static time_t _getLowestModificationTime(const GWEN_STRINGLIST *slFiles); static void _unlinkFilesInStringList(const GWEN_STRINGLIST *slFiles); int GWB_BuildCtx_Run(GWB_BUILD_CONTEXT *bctx, int maxConcurrentJobs, int usePrepareCommands, const char *builderName) { int rv; int waitingJobs; int runningJobs; GWB_BuildCtx_SetupDependencies(bctx); _setupCommands(bctx, usePrepareCommands); _createCommandQueues(bctx); rv=GWB_BuildCtx_FillWaitingQueue(bctx, builderName); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } if (GWB_BuildCmd_List2_GetSize(bctx->waitingQueue)==0) { fprintf(stdout, "Nothing to do.\n"); return 0; } waitingJobs=GWB_BuildCmd_List2_GetSize(bctx->waitingQueue); runningJobs=GWB_BuildCmd_List2_GetSize(bctx->runningQueue); while(waitingJobs+runningJobs) { int startedCommands; int changedCommands; startedCommands=_checkWaitingQueue(bctx, maxConcurrentJobs-runningJobs); if (startedCommands<0) { _waitForRunningJobs(bctx); _abortAllCommands(bctx); return GWEN_ERROR_GENERIC; } changedCommands=_checkRunningQueue(bctx); if (changedCommands<0) { /* error */ _waitForRunningJobs(bctx); _abortAllCommands(bctx); return GWEN_ERROR_GENERIC; } if (startedCommands==0 && changedCommands==0) { if (runningJobs==0) { DBG_ERROR(NULL, "ERROR: No running jobs and none could be started, maybe circular dependencies?"); _waitForRunningJobs(bctx); _abortAllCommands(bctx); return GWEN_ERROR_GENERIC; } DBG_DEBUG(NULL, "Nothing changed, sleeping..."); sleep(3); } waitingJobs=GWB_BuildCmd_List2_GetSize(bctx->waitingQueue); runningJobs=GWB_BuildCmd_List2_GetSize(bctx->runningQueue); } /* while */ GWB_BuildCmd_List2_free(bctx->waitingQueue); bctx->waitingQueue=NULL; GWB_BuildCmd_List2_free(bctx->runningQueue); bctx->runningQueue=NULL; GWB_BuildCmd_List2_free(bctx->finishedQueue); bctx->finishedQueue=NULL; return 0; } int _waitForRunningJobs(GWB_BUILD_CONTEXT *bctx) { int numRunningJobs; time_t startTime; startTime=time(0); numRunningJobs=GWB_BuildCmd_List2_GetSize(bctx->runningQueue); if (numRunningJobs) fprintf(stderr, "NOTICE: Waiting for %d jobs.\n", numRunningJobs); while(numRunningJobs) { int numChangedCommands; time_t currentTime; numChangedCommands=_checkRunningQueue(bctx); if (numChangedCommands<0) { /* error */ DBG_INFO(NULL, "Some jobs had errors"); } numRunningJobs=GWB_BuildCmd_List2_GetSize(bctx->runningQueue); if (numRunningJobs>0) { double delta; currentTime=time(0); delta=difftime(currentTime, startTime); if (delta>=GWB_BUILDCTX_PROCESS_WAIT_TIMEOUT) { DBG_ERROR(NULL, "%d jobs still running after %f.1 seconds, aborting", numRunningJobs, delta); return GWEN_ERROR_TIMEOUT; } DBG_DEBUG(NULL, "Jobs still running, sleeping..."); sleep(1); } } /* while */ return 0; } void _abortAllCommands(GWB_BUILD_CONTEXT *bctx) { _abortCommandsInQueue(bctx->waitingQueue); GWB_BuildCmd_List2_free(bctx->waitingQueue); bctx->waitingQueue=NULL; _abortCommandsInQueue(bctx->runningQueue); GWB_BuildCmd_List2_free(bctx->runningQueue); bctx->runningQueue=NULL; _abortCommandsInQueue(bctx->finishedQueue); GWB_BuildCmd_List2_free(bctx->finishedQueue); bctx->finishedQueue=NULL; } void _abortCommandsInQueue(GWB_BUILD_CMD_LIST2 *cmdList) { GWB_BUILD_CMD *bcmd; while( (bcmd=GWB_BuildCmd_List2_GetFront(cmdList)) ) { GWB_BuildCmd_List2_PopFront(cmdList); GWB_BuildCmd_SetCurrentProcess(bcmd, NULL); } /* while */ } void _setupCommands(GWB_BUILD_CONTEXT *bctx, int forPrepareCommands) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(bctx->commandList); if (it) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { GWB_BUILD_SUBCMD_LIST *cmdList; if (forPrepareCommands) cmdList=GWB_BuildCmd_GetPrepareCommandList(bcmd); else cmdList=GWB_BuildCmd_GetBuildCommandList(bcmd); if (cmdList) GWB_BuildCmd_SetCurrentCommand(bcmd, GWB_BuildSubCmd_List_First(cmdList)); bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } void _createCommandQueues(GWB_BUILD_CONTEXT *bctx) { bctx->waitingQueue=GWB_BuildCmd_List2_new(); bctx->finishedQueue=GWB_BuildCmd_List2_new(); bctx->runningQueue=GWB_BuildCmd_List2_new(); } int _checkWaitingQueue(GWB_BUILD_CONTEXT *bctx, int maxStartAllowed) { GWB_BUILD_CMD_LIST2 *oldQueue; GWB_BUILD_CMD *bcmd; int started=0; int errors=0; oldQueue=bctx->waitingQueue; bctx->waitingQueue=GWB_BuildCmd_List2_new(); while( (bcmd=GWB_BuildCmd_List2_GetFront(oldQueue)) ) { GWB_BuildCmd_List2_PopFront(oldQueue); if (startedinitialSourceDir); slOutFiles=GWB_File_FileListToTopBuildDirStringList(GWB_BuildCmd_GetOutFileList2(bcmd), bctx->initialSourceDir); if (_needRunCurrentCommand(bcmd, slInFiles, slOutFiles)) { rv=_startCommand(bctx, bcmd, slOutFiles); if (rv<0) { GWB_BuildCmd_List2_PushBack(bctx->finishedQueue, bcmd); errors++; } else { GWB_BuildCmd_List2_PushBack(bctx->runningQueue, bcmd); started++; } } else { _finishCurrentCommand(bctx, bcmd, GWB_BuildCmd_GetCurrentCommand(bcmd)); started++; } GWEN_StringList_free(slOutFiles); GWEN_StringList_free(slInFiles); } else GWB_BuildCmd_List2_PushBack(bctx->waitingQueue, bcmd); } else GWB_BuildCmd_List2_PushBack(bctx->waitingQueue, bcmd); } /* while */ GWB_BuildCmd_List2_free(oldQueue); if (errors) return GWEN_ERROR_GENERIC; return started; } GWEN_STRINGLIST *_fileListToTopBuildDirStringList(const char *initialSourceDir, GWB_FILE_LIST2 *fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWEN_STRINGLIST *sl; GWB_FILE *file; GWEN_BUFFER *fbuf; sl=GWEN_StringList_new(); fbuf=GWEN_Buffer_new(0, 256, 0, 1); file=GWB_File_List2Iterator_Data(it); while(file) { GWB_File_WriteFileNameToTopBuildDirString(file, initialSourceDir, fbuf); GWEN_StringList_AppendString(sl, GWEN_Buffer_GetStart(fbuf), 0, 1); GWEN_Buffer_Reset(fbuf); file=GWB_File_List2Iterator_Next(it); } /* while */ GWEN_Buffer_Reset(fbuf); GWB_File_List2Iterator_free(it); if (GWEN_StringList_Count(sl)==0) { GWEN_StringList_free(sl); return NULL; } return sl; } return NULL; } int _needRunCurrentCommand(GWB_BUILD_CMD *bcmd, const GWEN_STRINGLIST *slInFiles, const GWEN_STRINGLIST *slOutFiles) { GWB_BUILD_SUBCMD *currentCommand; currentCommand=GWB_BuildCmd_GetCurrentCommand(bcmd); if (currentCommand) { uint32_t cmdFlags; uint32_t subCmdFlags; cmdFlags=GWB_BuildCmd_GetFlags(bcmd); subCmdFlags=GWB_BuildSubCmd_GetFlags(currentCommand); if (cmdFlags & GWB_BUILD_CMD_FLAGS_CHECK_DATES) { if (_inFilesNewerThanOutFiles(slInFiles, slOutFiles)) { /* need rebuild */ DBG_INFO(NULL, "Input files newer than output files, rebuild needed"); return 1; } } else /* dont check dates, always rebuild */ return 1; if (subCmdFlags & GWB_BUILD_SUBCMD_FLAGS_CHECK_DEPENDS) { int rv; rv=_checkDependencies(bcmd, currentCommand, GWEN_StringList_FirstString(slOutFiles)); if (rv==-1) { DBG_INFO(NULL, "Dependencies flag NO rebuild needed (%d)", rv); return 0; } DBG_INFO(NULL, "Dependencies flag rebuild needed (%d)", rv); return 1; } } DBG_INFO(NULL, "Rebuild not needed"); return 0; } /* return 0: no rebuild needed; 1: rebuild needed */ int _inFilesNewerThanOutFiles(const GWEN_STRINGLIST *slInFiles, const GWEN_STRINGLIST *slOutFiles) { time_t tiHighestInFileTime; time_t tiLowestOutFileTime; tiHighestInFileTime=_getHighestModificationTime(slInFiles); tiLowestOutFileTime=_getLowestModificationTime(slOutFiles); if (tiHighestInFileTime==0 || tiLowestOutFileTime==0) { DBG_INFO(NULL, "Either input or output time not available"); return 1; } if (tiHighestInFileTime>tiLowestOutFileTime) return 1; return 0; } time_t _getLowestModificationTime(const GWEN_STRINGLIST *slFiles) { time_t tiLowest=0; if (slFiles) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(slFiles); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { time_t tiFile; tiFile=GWBUILD_GetModificationTimeOfFile(s); if (tiFile>0) { if (tiLowest==0) tiLowest=tiFile; else if (tiFile0) { if (tiHighest==0) tiHighest=tiFile; else if (tiFile>tiHighest) tiHighest=tiFile; } else { DBG_INFO(NULL, "No modification time for \"%s\"", s); return 0; } } se=GWEN_StringListEntry_Next(se); } } return tiHighest; } void _unlinkFilesInStringList(const GWEN_STRINGLIST *slFiles) { if (slFiles) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(slFiles); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { DBG_DEBUG(NULL, "Deleting \"%s\"", s); unlink(s); } se=GWEN_StringListEntry_Next(se); } } } /* return 1: need rebuild, -1: Need no rebuild, 0: undecided */ int _checkDependencies(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *subCmd, const char *firstOutFileName) { const char *depFileName; depFileName=GWB_BuildSubCmd_GetDepFilePath(subCmd); if (depFileName && firstOutFileName) { GWEN_STRINGLIST *sl; DBG_DEBUG(NULL, "Checking depend file \"%s\"", depFileName); sl=GWB_BuildCtx_ReadAndTranslateDepfile(GWB_BuildCmd_GetFolder(bcmd), depFileName); if (sl) { int rv; //GWBUILD_Debug_PrintStringList(depFileName, sl, 2); rv=_checkDatesOfFileAgainstList(firstOutFileName, sl); GWEN_StringList_free(sl); return rv; } else { DBG_DEBUG(NULL, "Could not load depend file \"%s\"", depFileName); } } else { if (depFileName==NULL) { DBG_DEBUG(NULL, "No depFileName for %s", firstOutFileName?firstOutFileName:""); } if (firstOutFileName==NULL) { DBG_DEBUG(NULL, "No outFileName"); } } return 0; /* indeterminate */ } int _checkDatesOfFileAgainstList(const char *fileName, const GWEN_STRINGLIST *sl) { time_t tFile; GWEN_STRINGLISTENTRY *se; tFile=GWBUILD_GetModificationTimeOfFile(fileName); if (tFile==0) { DBG_DEBUG(NULL, "%s: No modification time, need rebuild", fileName); return 1; /* need rebuild */ } se=GWEN_StringList_FirstEntry(sl); if (se) { while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { time_t tCurrent; DBG_DEBUG(NULL, " Checking dep: %s", s); tCurrent=GWBUILD_GetModificationTimeOfFile(s); if (tCurrent==0) { DBG_DEBUG(NULL, "No modification time for dependency \"%s\", need rebuild", s); return 1; /* need rebuild */ } if (difftime(tFile, tCurrent)<0.0) { DBG_DEBUG(NULL, "File \"%s\" is newer than \"%s\", rebuild needed", s, fileName); return 1; /* definately need rebuild */ } } se=GWEN_StringListEntry_Next(se); } DBG_DEBUG(NULL, "No dependency is newer than file \"%s\", NO rebuild needed", fileName); return -1; /* definately no need for rebuild */ } else { DBG_DEBUG(NULL, "Empty dependency list, rebuild needed"); } return 0; } int _startCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, const GWEN_STRINGLIST *slOutFiles) { GWB_BUILD_SUBCMD *currentCommand; currentCommand=GWB_BuildCmd_GetCurrentCommand(bcmd); if (currentCommand) { const char *folder; const char *cmd; const char *args; folder=GWB_BuildCmd_GetFolder(bcmd); cmd=GWB_BuildSubCmd_GetCommand(currentCommand); args=GWB_BuildSubCmd_GetArguments(currentCommand); if (cmd && *cmd) { GWEN_PROCESS *process; GWEN_PROCESS_STATE pstate; const char *buildMessage; int rv; if (GWB_BuildSubCmd_List_Previous(currentCommand)==NULL) { /* first command */ if (slOutFiles && (GWB_BuildCmd_GetFlags(bcmd) & GWB_BUILD_CMD_FLAGS_DEL_OUTFILES)) { _unlinkFilesInStringList(slOutFiles); } } buildMessage=GWB_BuildSubCmd_GetBuildMessage(currentCommand); if (buildMessage) fprintf(stdout, "%s [%s]\n", buildMessage, cmd); else fprintf(stdout, "%s %s\n", cmd, args); rv=GWB_BuildCtx_CreateAndSetLogFilenameForSubCmd(bctx, currentCommand); if (rv<0) { DBG_ERROR(NULL, "Error creating logfile path for output redirection (%d)", rv); GWB_BuildCmd_SetCurrentProcess(bcmd, NULL); return GWEN_ERROR_GENERIC; } process=GWEN_Process_new(); if (folder && *folder) GWEN_Process_SetFolder(process, folder); GWEN_Process_SetFilenameStdOut(process, GWB_BuildSubCmd_GetLogFilename(currentCommand)); GWEN_Process_SetFilenameStdErr(process, GWB_BuildSubCmd_GetLogFilename(currentCommand)); GWB_BuildCmd_SetCurrentProcess(bcmd, process); pstate=GWEN_Process_Start(process, cmd, args); if (pstate!=GWEN_ProcessStateRunning) { DBG_ERROR(NULL, "Error starting command process (%d)", pstate); GWB_BuildCmd_SetCurrentProcess(bcmd, NULL); return GWEN_ERROR_GENERIC; } DBG_DEBUG(NULL, "Process started"); return 0; } else { DBG_ERROR(NULL, "No command in build command"); return GWEN_ERROR_GENERIC; } } else { DBG_ERROR(NULL, "No current command in build command"); return GWEN_ERROR_GENERIC; } } int _checkRunningQueue(GWB_BUILD_CONTEXT *bctx) { GWB_BUILD_CMD_LIST2 *oldRunningQueue; GWB_BUILD_CMD *bcmd; int changes=0; int errors=0; oldRunningQueue=bctx->runningQueue; bctx->runningQueue=GWB_BuildCmd_List2_new(); while( (bcmd=GWB_BuildCmd_List2_GetFront(oldRunningQueue)) ) { GWEN_PROCESS *process; GWEN_PROCESS_STATE pstate; GWB_BUILD_SUBCMD *currentCommand; GWB_BuildCmd_List2_PopFront(oldRunningQueue); currentCommand=GWB_BuildCmd_GetCurrentCommand(bcmd); process=GWB_BuildCmd_GetCurrentProcess(bcmd); pstate=GWEN_Process_CheckState(process); if (pstate!=GWEN_ProcessStateRunning) { changes++; if (pstate==GWEN_ProcessStateExited) { int result; result=GWEN_Process_GetResult(process); _printCmdOutputIfNotEmptyAndDeleteFile(bcmd, currentCommand); if (result) { if (GWB_BuildSubCmd_GetFlags(currentCommand) & GWB_BUILD_SUBCMD_FLAGS_IGNORE_RESULT) { DBG_INFO(NULL, "Command exited with result %d, ignoring", result); _finishCurrentCommand(bctx, bcmd, currentCommand); } else { DBG_INFO(NULL, "Command exited with result %d", result); errors++; } //_printCmdOutput(currentCommand); } else { _finishCurrentCommand(bctx, bcmd, currentCommand); } } else { DBG_ERROR(NULL, "Command aborted (status: %d)", pstate); GWB_BuildCmd_List2_PushBack(bctx->finishedQueue, bcmd); errors++; } GWB_BuildCmd_SetCurrentProcess(bcmd, NULL); /* no longer running */ } else GWB_BuildCmd_List2_PushBack(bctx->runningQueue, bcmd); /* still running, put back */ } /* while still commands in running queue */ GWB_BuildCmd_List2_free(oldRunningQueue); if (errors) return GWEN_ERROR_GENERIC; return changes; } void _finishCurrentCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *currentCommand) { GWB_BUILD_SUBCMD *nextCommand; nextCommand=GWB_BuildSubCmd_List_Next(currentCommand); GWB_BuildCmd_SetCurrentCommand(bcmd, nextCommand); if (nextCommand) GWB_BuildCmd_List2_PushBack(bctx->waitingQueue, bcmd); else { _signalJobFinished(bcmd); GWB_BuildCmd_List2_PushBack(bctx->finishedQueue, bcmd); } } void _signalJobFinished(GWB_BUILD_CMD *bcmd) { GWB_FILE_LIST2 *outFileList; outFileList=GWB_BuildCmd_GetOutFileList2(bcmd); if (outFileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(outFileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_BUILD_CMD_LIST2 *waitingCommands; waitingCommands=GWB_File_GetWaitingBuildCmdList2(file); if (waitingCommands) _decBlockingFilesInWaitingBuildCommands(waitingCommands); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } } void _decBlockingFilesInWaitingBuildCommands(GWB_BUILD_CMD_LIST2 *waitingCommands) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(waitingCommands); if (it) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { GWB_BuildCmd_DecBlockingFiles(bcmd); bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } void _printCmdOutputIfNotEmptyAndDeleteFile(GWB_BUILD_CMD *cmd, GWB_BUILD_SUBCMD *subCmd) { const char *fileName; fileName=GWB_BuildSubCmd_GetLogFilename(subCmd); if (fileName) { struct stat sb; if (stat(fileName, &sb)==-1) { DBG_ERROR(GWEN_LOGDOMAIN, "stat(%s): %d [%s]", fileName, errno, strerror(errno)); } else { if (sb.st_size>0) { int rv; GWEN_BUFFER *dbuf; dbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_SyncIo_Helper_ReadFile(fileName, dbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error reading command output from file \"%s\": %d", fileName, rv); } else { const char *buildMessage; const char *exe; const char *folder; folder=GWB_BuildCmd_GetFolder(cmd); buildMessage=GWB_BuildSubCmd_GetBuildMessage(subCmd); exe=GWB_BuildSubCmd_GetCommand(subCmd); fprintf(stderr, "Output from [%s]\n", buildMessage?buildMessage:(exe?exe:"NONE")); if (folder && *folder) fprintf(stderr, "make[%d]: Entering directory '%s'\n", ++_commandLogNum, folder); fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(dbuf)); if (folder && *folder) fprintf(stderr, "make[%d]: Leaving directory '%s'\n", _commandLogNum, folder); fflush(stderr); } GWEN_Buffer_free(dbuf); } unlink(fileName); } } } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildcmd.c0000664000175000017500000003624414460564441017612 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/buildctx/buildcmd_p.h" #include #include GWEN_LIST_FUNCTIONS(GWB_BUILD_CMD, GWB_BuildCmd); GWEN_LIST2_FUNCTIONS(GWB_BUILD_CMD, GWB_BuildCmd); static void _writeIdsFromFile2ListToXml(const GWB_FILE_LIST2 *fileList2, GWEN_XMLNODE *xmlNode, const char *groupName); static void _readFileIdsFromXml(GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *ctxFileList, GWB_FILE_LIST2 *destFileList); static void _writeSubCommandListToXml(const GWB_BUILD_SUBCMD_LIST *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName); static void _readSubCommandListFromXml(GWB_BUILD_SUBCMD_LIST *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName); GWB_BUILD_CMD *GWB_BuildCmd_new(void) { GWB_BUILD_CMD *bcmd; GWEN_NEW_OBJECT(GWB_BUILD_CMD, bcmd); GWEN_LIST_INIT(GWB_BUILD_CMD, bcmd); bcmd->inFileList2=GWB_File_List2_new(); bcmd->outFileList2=GWB_File_List2_new(); bcmd->prepareCommandList=GWB_BuildSubCmd_List_new(); bcmd->buildCommandList=GWB_BuildSubCmd_List_new(); return bcmd; } GWB_BUILD_CMD *GWB_BuildCmd_dup(GWB_BUILD_CMD *origCmd) { GWB_BUILD_CMD *bcmd; GWEN_NEW_OBJECT(GWB_BUILD_CMD, bcmd); GWEN_LIST_INIT(GWB_BUILD_CMD, bcmd); bcmd->flags=origCmd->flags; bcmd->builderName=(origCmd->builderName)?strdup(origCmd->builderName):NULL; bcmd->folder=(origCmd->folder)?strdup(origCmd->folder):NULL; bcmd->buildMessage=(origCmd->buildMessage)?strdup(origCmd->buildMessage):NULL; if (origCmd->prepareCommandList) bcmd->prepareCommandList=GWB_BuildSubCmd_List_dup(origCmd->prepareCommandList); else bcmd->prepareCommandList=GWB_BuildSubCmd_List_new(); if (origCmd->buildCommandList) bcmd->buildCommandList=GWB_BuildSubCmd_List_dup(origCmd->buildCommandList); else bcmd->buildCommandList=GWB_BuildSubCmd_List_new(); bcmd->blockingFiles=origCmd->blockingFiles; if (origCmd->inFileList2) bcmd->inFileList2=GWB_File_List2_dup(origCmd->inFileList2); else bcmd->inFileList2=GWB_File_List2_new(); if (origCmd->outFileList2) bcmd->outFileList2=GWB_File_List2_dup(origCmd->outFileList2); else bcmd->outFileList2=GWB_File_List2_new(); bcmd->currentProcess=NULL; bcmd->currentCommand=NULL; return bcmd; } void GWB_BuildCmd_free(GWB_BUILD_CMD *bcmd) { if (bcmd) { GWEN_LIST_FINI(GWB_BUILD_CMD, bcmd); GWB_BuildCmd_SetCurrentProcess(bcmd, NULL); GWB_BuildCmd_SetCurrentCommand(bcmd, NULL); free(bcmd->buildMessage); free(bcmd->folder); free(bcmd->builderName); GWB_BuildSubCmd_List_free(bcmd->prepareCommandList); GWB_BuildSubCmd_List_free(bcmd->buildCommandList); GWB_File_List2_free(bcmd->inFileList2); GWB_File_List2_free(bcmd->outFileList2); GWEN_FREE_OBJECT(bcmd); } } uint32_t GWB_BuildCmd_GetFlags(const GWB_BUILD_CMD *bcmd) { return bcmd->flags; } void GWB_BuildCmd_SetFlags(GWB_BUILD_CMD *bcmd, uint32_t i) { bcmd->flags=i; } void GWB_BuildCmd_AddFlags(GWB_BUILD_CMD *bcmd, uint32_t i) { bcmd->flags|=i; } void GWB_BuildCmd_DelFlags(GWB_BUILD_CMD *bcmd, uint32_t i) { bcmd->flags&=~i; } const char *GWB_BuildCmd_GetBuilderName(const GWB_BUILD_CMD *bcmd) { return bcmd->builderName; } void GWB_BuildCmd_SetBuilderName(GWB_BUILD_CMD *bcmd, const char *s) { free(bcmd->builderName); bcmd->builderName=s?strdup(s):NULL; } const char *GWB_BuildCmd_GetFolder(const GWB_BUILD_CMD *bcmd) { return bcmd->folder; } void GWB_BuildCmd_SetFolder(GWB_BUILD_CMD *bcmd, const char *s) { free(bcmd->folder); bcmd->folder=s?strdup(s):NULL; } const char *GWB_BuildCmd_GetBuildMessage(const GWB_BUILD_CMD *bcmd) { return bcmd->buildMessage; } void GWB_BuildCmd_SetBuildMessage(GWB_BUILD_CMD *bcmd, const char *s) { free(bcmd->buildMessage); bcmd->buildMessage=s?strdup(s):NULL; } GWB_BUILD_SUBCMD_LIST *GWB_BuildCmd_GetPrepareCommandList(const GWB_BUILD_CMD *bcmd) { return bcmd->prepareCommandList; } void GWB_BuildCmd_AddPrepareCommand(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *cmd) { GWB_BuildSubCmd_List_Add(cmd, bcmd->prepareCommandList); } GWB_BUILD_SUBCMD_LIST *GWB_BuildCmd_GetBuildCommandList(const GWB_BUILD_CMD *bcmd) { return bcmd->buildCommandList; } void GWB_BuildCmd_AddBuildCommand(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *cmd) { GWB_BuildSubCmd_List_Add(cmd, bcmd->buildCommandList); } int GWB_BuildCmd_GetBlockingFiles(const GWB_BUILD_CMD *bcmd) { return bcmd->blockingFiles; } void GWB_BuildCmd_SetBlockingFiles(GWB_BUILD_CMD *bcmd, int i) { bcmd->blockingFiles=i; } int GWB_BuildCmd_IncBlockingFiles(GWB_BUILD_CMD *bcmd) { return ++(bcmd->blockingFiles); } int GWB_BuildCmd_DecBlockingFiles(GWB_BUILD_CMD *bcmd) { if (bcmd->blockingFiles>0) return --(bcmd->blockingFiles); else return bcmd->blockingFiles; } GWB_FILE_LIST2 *GWB_BuildCmd_GetInFileList2(const GWB_BUILD_CMD *bcmd) { return bcmd->inFileList2; } void GWB_BuildCmd_AddInFile(GWB_BUILD_CMD *bcmd, GWB_FILE *file) { if (file) GWB_File_List2_PushBack(bcmd->inFileList2, file); } GWB_FILE_LIST2 *GWB_BuildCmd_GetOutFileList2(const GWB_BUILD_CMD *bcmd) { return bcmd->outFileList2; } void GWB_BuildCmd_AddOutFile(GWB_BUILD_CMD *bcmd, GWB_FILE *file) { if (file) GWB_File_List2_PushBack(bcmd->outFileList2, file); } GWEN_PROCESS *GWB_BuildCmd_GetCurrentProcess(const GWB_BUILD_CMD *bcmd) { return bcmd->currentProcess; } void GWB_BuildCmd_SetCurrentProcess(GWB_BUILD_CMD *bcmd, GWEN_PROCESS *process) { if (bcmd->currentProcess) { if (GWEN_Process_CheckState(bcmd->currentProcess)==GWEN_ProcessStateRunning) { DBG_ERROR(NULL, "Process is still running!"); GWEN_Process_Terminate(bcmd->currentProcess); } GWEN_Process_free(bcmd->currentProcess); } bcmd->currentProcess=process; } GWB_BUILD_SUBCMD *GWB_BuildCmd_GetCurrentCommand(const GWB_BUILD_CMD *bcmd) { return bcmd->currentCommand; } void GWB_BuildCmd_SetCurrentCommand(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *cmd) { bcmd->currentCommand=cmd; } void GWB_BuildCmd_toXml(const GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode) { if (bcmd->builderName) GWEN_XMLNode_SetCharValue(xmlNode, "builderName", bcmd->builderName); GWEN_XMLNode_SetIntValue(xmlNode, "flags", bcmd->flags); if (bcmd->folder) GWEN_XMLNode_SetCharValue(xmlNode, "folder", bcmd->folder); if (bcmd->buildMessage) GWEN_XMLNode_SetCharValue(xmlNode, "buildMessage", bcmd->buildMessage); if (bcmd->prepareCommandList) { GWEN_XMLNODE *xmlGroupNode; xmlGroupNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "prepareCommands"); _writeSubCommandListToXml(bcmd->prepareCommandList, xmlGroupNode, "command"); GWEN_XMLNode_AddChild(xmlNode, xmlGroupNode); } if (bcmd->buildCommandList) { GWEN_XMLNODE *xmlGroupNode; xmlGroupNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "buildCommands"); _writeSubCommandListToXml(bcmd->buildCommandList, xmlGroupNode, "command"); GWEN_XMLNode_AddChild(xmlNode, xmlGroupNode); } if (bcmd->inFileList2) { GWEN_XMLNODE *xmlGroupNode; xmlGroupNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "inputFiles"); _writeIdsFromFile2ListToXml(bcmd->inFileList2, xmlGroupNode, "file"); GWEN_XMLNode_AddChild(xmlNode, xmlGroupNode); } if (bcmd->outFileList2) { GWEN_XMLNODE *xmlGroupNode; xmlGroupNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "outputFiles"); _writeIdsFromFile2ListToXml(bcmd->outFileList2, xmlGroupNode, "file"); GWEN_XMLNode_AddChild(xmlNode, xmlGroupNode); } } GWB_BUILD_CMD *GWB_BuildCmd_fromXml(GWEN_XMLNODE *xmlNode, GWB_FILE_LIST2 *fileList) { GWB_BUILD_CMD *bcmd; GWEN_XMLNODE *xmlGroupNode; const char *s; bcmd=GWB_BuildCmd_new(); s=GWEN_XMLNode_GetCharValue(xmlNode, "builderName", NULL); GWB_BuildCmd_SetBuilderName(bcmd, s); bcmd->flags=GWEN_XMLNode_GetIntValue(xmlNode, "flags", 0); s=GWEN_XMLNode_GetCharValue(xmlNode, "folder", NULL); GWB_BuildCmd_SetFolder(bcmd, s); s=GWEN_XMLNode_GetCharValue(xmlNode, "buildMessage", NULL); GWB_BuildCmd_SetBuildMessage(bcmd, s); xmlGroupNode=GWEN_XMLNode_FindFirstTag(xmlNode, "prepareCommands", NULL, NULL); if (xmlGroupNode) _readSubCommandListFromXml(bcmd->prepareCommandList, xmlGroupNode, "command"); xmlGroupNode=GWEN_XMLNode_FindFirstTag(xmlNode, "buildCommands", NULL, NULL); if (xmlGroupNode) _readSubCommandListFromXml(bcmd->buildCommandList, xmlGroupNode, "command"); xmlGroupNode=GWEN_XMLNode_FindFirstTag(xmlNode, "inputFiles", NULL, NULL); if (xmlGroupNode) _readFileIdsFromXml(xmlGroupNode, "file", fileList, bcmd->inFileList2); xmlGroupNode=GWEN_XMLNode_FindFirstTag(xmlNode, "outputFiles", NULL, NULL); if (xmlGroupNode) _readFileIdsFromXml(xmlGroupNode, "file", fileList, bcmd->outFileList2); return bcmd; } void _writeSubCommandListToXml(const GWB_BUILD_SUBCMD_LIST *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName) { const GWB_BUILD_SUBCMD *cmd; cmd=GWB_BuildSubCmd_List_First(cmdList); while(cmd) { GWEN_XMLNODE *entryNode; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWB_BuildSubCmd_toXml(cmd, entryNode); GWEN_XMLNode_AddChild(xmlNode, entryNode); cmd=GWB_BuildSubCmd_List_Next(cmd); } } void _readSubCommandListFromXml(GWB_BUILD_SUBCMD_LIST *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWEN_XMLNODE *xmlEntry; xmlEntry=GWEN_XMLNode_FindFirstTag(xmlNode, groupName, NULL, NULL); while(xmlEntry) { GWB_BUILD_SUBCMD *cmd; cmd=GWB_BuildSubCmd_fromXml(xmlEntry); if (cmd) GWB_BuildSubCmd_List_Add(cmd, cmdList); xmlEntry=GWEN_XMLNode_FindNextTag(xmlEntry, groupName, NULL, NULL); } } void _writeIdsFromFile2ListToXml(const GWB_FILE_LIST2 *fileList2, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList2); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWEN_XMLNODE *entryNode; uint32_t id; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); id=GWB_File_GetId(file); GWEN_XMLNode_SetIntProperty(entryNode, "id", (int) id); GWEN_XMLNode_AddChild(xmlNode, entryNode); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void _readFileIdsFromXml(GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *ctxFileList, GWB_FILE_LIST2 *destFileList) { GWEN_XMLNODE *xmlEntry; xmlEntry=GWEN_XMLNode_FindFirstTag(xmlNode, groupName, NULL, NULL); while(xmlEntry) { uint32_t id; id=(uint32_t) GWEN_XMLNode_GetIntProperty(xmlEntry, "id", 0); if (id==0) { DBG_ERROR(NULL, "FILE has no id"); } else { GWB_FILE *file; file=GWB_File_List2_GetFileById(ctxFileList, id); if (file==NULL) { DBG_ERROR(NULL, "FILE %d not found", (int) id); } else GWB_File_List2_PushBack(destFileList, file); } xmlEntry=GWEN_XMLNode_FindNextTag(xmlEntry, groupName, NULL, NULL); } } void GWB_BuildCmd_List2_WriteXml(const GWB_BUILD_CMD_LIST2 *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(cmdList); if (it) { GWB_BUILD_CMD *cmd; cmd=GWB_BuildCmd_List2Iterator_Data(it); while(cmd) { GWEN_XMLNODE *entryNode; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWB_BuildCmd_toXml(cmd, entryNode); GWEN_XMLNode_AddChild(xmlNode, entryNode); cmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } void GWB_BuildCmd_List_WriteXml(const GWB_BUILD_CMD_LIST *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName) { GWB_BUILD_CMD *cmd; cmd=GWB_BuildCmd_List_First(cmdList); while(cmd) { GWEN_XMLNODE *entryNode; entryNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, groupName); GWB_BuildCmd_toXml(cmd, entryNode); GWEN_XMLNode_AddChild(xmlNode, entryNode); cmd=GWB_BuildCmd_List_Next(cmd); } } void GWB_BuildCmd_List2_FreeAll(GWB_BUILD_CMD_LIST2 *cmdList) { if (cmdList) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(cmdList); if (it) { GWB_BUILD_CMD *cmd; cmd=GWB_BuildCmd_List2Iterator_Data(it); while(cmd) { GWB_BuildCmd_free(cmd); cmd=GWB_BuildCmd_List2Iterator_Next(it); } } GWB_BuildCmd_List2_free(cmdList); } } void GWB_BuildCmd_Dump(const GWB_BUILD_CMD *bcmd, int indent) { int i; for(i=0; ifolder, indent+2); GWBUILD_Debug_PrintIntValue("blockingFiles", bcmd->blockingFiles, indent+2); GWB_BuildSubCmd_List_Dump(bcmd->prepareCommandList, indent+2, "prepareCommandList"); GWB_BuildSubCmd_List_Dump(bcmd->buildCommandList, indent+2, "buildCommandList"); GWBUILD_Debug_PrintFileList2("inFileList2", bcmd->inFileList2, indent+2); GWBUILD_Debug_PrintFileList2("outFileList2", bcmd->outFileList2, indent+2); } void GWB_BuildCmd_PrintDescriptionWithText(const GWB_BUILD_CMD *bcmd, int indent, const char *text) { if (bcmd) { const GWB_FILE *fileIn=NULL; const GWB_FILE *fileOut=NULL; if (bcmd->inFileList2) fileIn=GWB_File_List2_GetFront(bcmd->inFileList2); if (bcmd->outFileList2) fileOut=GWB_File_List2_GetFront(bcmd->outFileList2); if (fileIn || fileOut) { const char *folder; const char *fileNameIn=NULL; const char *fileNameOut=NULL; folder=GWB_BuildCmd_GetFolder(bcmd); if (fileIn) fileNameIn=GWB_File_GetName(fileIn); if (fileOut) fileNameOut=GWB_File_GetName(fileOut); if (fileNameIn && fileNameOut) { int i; for(i=0; i %s) [%d blocking files]\n", folder?folder:"", text?text:"BuildCmd", fileNameIn?fileNameIn:"", fileNameOut?fileNameOut:"", bcmd->blockingFiles); } else if (fileIn) { int i; for(i=0; i", text?text:"BuildCmd", fileNameIn?fileNameIn:"", bcmd->blockingFiles); } } } } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildsubcmd.h0000664000175000017500000000447514460564441020332 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDSUBCMD_H #define GWBUILD_BUILDSUBCMD_H #include typedef struct GWB_BUILD_SUBCMD GWB_BUILD_SUBCMD; GWEN_LIST_FUNCTION_DEFS(GWB_BUILD_SUBCMD, GWB_BuildSubCmd); #include "gwenbuild/buildctx/buildcmd.h" #define GWB_BUILD_SUBCMD_FLAGS_IGNORE_RESULT 0x0001 #define GWB_BUILD_SUBCMD_FLAGS_CHECK_DEPENDS 0x0004 GWB_BUILD_SUBCMD *GWB_BuildSubCmd_new(void); GWB_BUILD_SUBCMD *GWB_BuildSubCmd_dup(const GWB_BUILD_SUBCMD *origCmd); void GWB_BuildSubCmd_free(GWB_BUILD_SUBCMD *cmd); uint32_t GWB_BuildSubCmd_GetFlags(const GWB_BUILD_SUBCMD *cmd); void GWB_BuildSubCmd_SetFlags(GWB_BUILD_SUBCMD *cmd, uint32_t f); void GWB_BuildSubCmd_AddFlags(GWB_BUILD_SUBCMD *cmd, uint32_t f); void GWB_BuildSubCmd_DelFlags(GWB_BUILD_SUBCMD *cmd, uint32_t f); const char *GWB_BuildSubCmd_GetCommand(const GWB_BUILD_SUBCMD *cmd); void GWB_BuildSubCmd_SetCommand(GWB_BUILD_SUBCMD *cmd, const char *s); const char *GWB_BuildSubCmd_GetArguments(const GWB_BUILD_SUBCMD *cmd); void GWB_BuildSubCmd_SetArguments(GWB_BUILD_SUBCMD *cmd, const char *s); const char *GWB_BuildSubCmd_GetBuildMessage(const GWB_BUILD_SUBCMD *cmd); void GWB_BuildSubCmd_SetBuildMessage(GWB_BUILD_SUBCMD *cmd, const char *s); const char *GWB_BuildSubCmd_GetDepFilePath(const GWB_BUILD_SUBCMD *cmd); void GWB_BuildSubCmd_SetDepFilePath(GWB_BUILD_SUBCMD *cmd, const char *s); const char *GWB_BuildSubCmd_GetLogFilename(const GWB_BUILD_SUBCMD *cmd); void GWB_BuildSubCmd_SetLogFilename(GWB_BUILD_SUBCMD *cmd, const char *s); void GWB_BuildSubCmd_toXml(const GWB_BUILD_SUBCMD *cmd, GWEN_XMLNODE *xmlNode); GWB_BUILD_SUBCMD *GWB_BuildSubCmd_fromXml(GWEN_XMLNODE *xmlNode); GWB_BUILD_SUBCMD_LIST *GWB_BuildSubCmd_List_dup(const GWB_BUILD_SUBCMD_LIST *cmdList); void GWB_BuildSubCmd_Dump(const GWB_BUILD_SUBCMD *cmd, int indent); void GWB_BuildSubCmd_List_Dump(const GWB_BUILD_SUBCMD_LIST *cmdList, int indent, const char *text); #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/Makefile.am0000664000175000017500000000075014144206312017675 00000000000000INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES=libgwb_build.la libgwb_build_la_SOURCES=\ buildcmd.c \ buildsubcmd.c \ buildctx.c \ buildctx_bdeps.c \ buildctx_depfile.c \ buildctx_run.c \ buildctx_xml.c noinst_HEADERS=\ buildcmd.h \ buildcmd_p.h \ buildsubcmd.h \ buildsubcmd_p.h \ buildctx.h \ buildctx_p.h \ buildctx_bdeps.h \ buildctx_depfile.h \ buildctx_run.h \ buildctx_xml.h gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_depfile.c0000664000175000017500000001136614144206312021320 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "gwenbuild/buildctx/buildctx_p.h" #include "gwenbuild/buildctx/buildctx_depfile.h" #include "gwenbuild/buildctx/buildctx_run.h" #include #include #include #include #include static GWEN_STRINGLIST *_readDepFile(const char *fileName); static GWEN_STRINGLIST *_makeAbsolutePaths(GWEN_STRINGLIST *slInput, const char *folder); static void _overwriteEscapedLineFeedsWithSpace(GWEN_BUFFER *buffer); GWEN_STRINGLIST *GWB_BuildCtx_ReadAndTranslateDepfile(const char *folder, const char *fileName) { GWEN_STRINGLIST *slInput; slInput=_readDepFile(fileName); if (slInput) { GWEN_STRINGLIST *slOutput; slOutput=_makeAbsolutePaths(slInput, folder); if (slOutput) { GWEN_StringList_free(slInput); return slOutput; } GWEN_StringList_free(slInput); } return NULL; } GWEN_STRINGLIST *_readDepFile(const char *fileName) { GWEN_BUFFER *fileBuffer; int rv; char *s; fileBuffer=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_SyncIo_Helper_ReadFile(fileName, fileBuffer); if (rv<0) { DBG_ERROR(NULL, "here (%d)", rv); GWEN_Buffer_free(fileBuffer); return NULL; } _overwriteEscapedLineFeedsWithSpace(fileBuffer); GWEN_Text_CondenseBuffer(fileBuffer); s=strchr(GWEN_Buffer_GetStart(fileBuffer), ':'); if (s) { GWEN_STRINGLIST *slDependencies; slDependencies=GWEN_StringList_fromString2(s+1, " ", 1, GWEN_TEXT_FLAGS_DEL_QUOTES | GWEN_TEXT_FLAGS_CHECK_BACKSLASH | GWEN_TEXT_FLAGS_DEL_MULTIPLE_BLANKS| GWEN_TEXT_FLAGS_DEL_LEADING_BLANKS| GWEN_TEXT_FLAGS_DEL_TRAILING_BLANKS); if (slDependencies) { GWEN_Buffer_free(fileBuffer); return slDependencies; } } GWEN_Buffer_free(fileBuffer); return NULL; } void _overwriteEscapedLineFeedsWithSpace(GWEN_BUFFER *buffer) { char *ptr; ptr=GWEN_Buffer_GetStart(buffer); while(*ptr) { char *ptrNextEscape; ptrNextEscape=strchr(ptr, '\\'); if (ptrNextEscape) { if (iscntrl(ptrNextEscape[1])) { /* overwrite backslash */ *(ptrNextEscape++)=' '; /* overwrite every immediately following control character (such as LF, CR, TAB etc) */ while(*ptrNextEscape && iscntrl(*ptrNextEscape)) *(ptrNextEscape++)=' '; } } else break; } } GWEN_STRINGLIST *_makeAbsolutePaths(GWEN_STRINGLIST *slInput, const char *folder) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(slInput); if (se) { GWEN_STRINGLIST *slOutput; slOutput=GWEN_StringList_new(); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s) { while(*s && *s<33) s++; if (*s) { if (*s=='/') { GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); while(*s && *s>31) GWEN_Buffer_AppendByte(buf, *(s++)); GWEN_StringList_AppendString(slOutput, GWEN_Buffer_GetStart(buf), 0, 1); GWEN_Buffer_free(buf); } else { const char *ptrToSlash; ptrToSlash=strrchr(s, '/'); if (ptrToSlash) { GWEN_BUFFER *buf; GWEN_BUFFER *absBuf; /* get absolute path for folder */ buf=GWEN_Buffer_new(0, 256, 0, 1); if (folder) { GWEN_Buffer_AppendString(buf, folder); GWEN_Buffer_AppendString(buf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendBytes(buf, s, ptrToSlash-s); /* deliberately not "+1": excluding '/' */ absBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Directory_GetAbsoluteFolderPath(GWEN_Buffer_GetStart(buf), absBuf); if (GWEN_Buffer_GetUsedBytes(absBuf)) GWEN_Buffer_AppendString(absBuf, GWEN_DIR_SEPARATOR_S); /* add file name */ ptrToSlash++; /* skip '/', ptrToSlash now points to file name */ GWEN_Buffer_AppendString(absBuf, ptrToSlash); /* add complete absolute path to stringlist */ GWEN_StringList_AppendString(slOutput, GWEN_Buffer_GetStart(absBuf), 0, 1); GWEN_Buffer_free(absBuf); GWEN_Buffer_free(buf); } } } } se=GWEN_StringListEntry_Next(se); } if (GWEN_StringList_Count(slOutput)==0) { GWEN_StringList_free(slOutput); return NULL; } return slOutput; } return NULL; } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_run.h0000664000175000017500000000126614116666046020534 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCTX_RUN_H #define GWBUILD_BUILDCTX_RUN_H #include #include "gwenbuild/buildctx/buildctx.h" int GWB_BuildCtx_Run(GWB_BUILD_CONTEXT *bctx, int maxConcurrentJobs, int usePrepareCommands, const char *builderName); #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_bdeps.c0000664000175000017500000001660114460564441021015 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "gwenbuild/buildctx/buildctx_p.h" #include "gwenbuild/buildctx/buildctx_bdeps.h" #include #include #include #include #include static void _setupDepsForCmd(GWB_BUILD_CMD *bcmd, GWB_BUILD_CMD_LIST2 *targetCmdList); static void _setBuildCmdInFiles(GWB_BUILD_CONTEXT *bctx); static void _fileListSetBuildCmd(GWB_FILE_LIST2 *fileList, GWB_BUILD_CMD *bcmd); static int _cmdIsInList(const GWB_BUILD_CMD_LIST2 *sourceCmdList, const GWB_BUILD_CMD *cmd); static void _clearDeps(GWB_BUILD_CONTEXT *bctx); static void _clearDepsInCommands(GWB_BUILD_CONTEXT *bctx); static void _clearDepsInFiles(GWB_BUILD_CONTEXT *bctx); int GWB_BuildCtx_SetupDependencies(GWB_BUILD_CONTEXT *bctx) { _clearDeps(bctx); _setBuildCmdInFiles(bctx); return 0; } int GWB_BuildCtx_FillWaitingQueue(GWB_BUILD_CONTEXT *bctx, const char *builderName) { int rv; rv=GWB_BuildCtx_AddBuildCmdsByBuilderNameToList(bctx->commandList, builderName, bctx->waitingQueue); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } #if 0 DBG_ERROR(NULL, "Got this queue:"); GWBUILD_Debug_PrintBuildCmdList2("Waiting Queue", bctx->waitingQueue, 2); #endif return 0; } int GWB_BuildCtx_AddBuildCmdsForFileToList(const GWB_FILE *file, GWB_BUILD_CMD_LIST2 *targetCmdList) { GWB_BUILD_CMD *bcmd; bcmd=GWB_File_GetBuildCmd(file); if (bcmd) { if (GWB_BuildCmd_GetCurrentCommand(bcmd)) { GWB_BuildCmd_List2_PushBack(targetCmdList, bcmd); _setupDepsForCmd(bcmd, targetCmdList); } else { const char *sBuilderName; const char *sFolder; const char *sFileName; sBuilderName=GWB_BuildCmd_GetBuilderName(bcmd); sFileName=GWB_File_GetName(file); sFolder=GWB_File_GetFolder(file); DBG_ERROR(NULL, "Builder \"%s\" for selected file \"%s\" in folder \"%s\" has no build commands", sBuilderName?sBuilderName:"", sFileName?sFileName:"", sFolder?sFolder:"."); } } return 0; } int GWB_BuildCtx_AddBuildCmdsByBuilderNameToList(const GWB_BUILD_CMD_LIST2 *sourceCmdList, const char *builderName, GWB_BUILD_CMD_LIST2 *targetCmdList) { if (sourceCmdList) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(sourceCmdList); if (it) { if (builderName && *builderName) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { const char *s; s=GWB_BuildCmd_GetBuilderName(bcmd); if (s && strcasecmp(s, builderName)==0) { if (!_cmdIsInList(targetCmdList, bcmd)) { if (GWB_BuildCmd_GetCurrentCommand(bcmd)) { GWB_BuildCmd_List2_PushBack(targetCmdList, bcmd); _setupDepsForCmd(bcmd, targetCmdList); } } } bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } else { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { if (GWB_BuildCmd_GetFlags(bcmd) & GWB_BUILD_CMD_FLAGS_AUTO) { if (!_cmdIsInList(targetCmdList, bcmd)) { if (GWB_BuildCmd_GetCurrentCommand(bcmd)) { GWB_BuildCmd_List2_PushBack(targetCmdList, bcmd); _setupDepsForCmd(bcmd, targetCmdList); } } } bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } } return 0; } void _clearDeps(GWB_BUILD_CONTEXT *bctx) { _clearDepsInCommands(bctx); _clearDepsInFiles(bctx); } void _clearDepsInCommands(GWB_BUILD_CONTEXT *bctx) { if (bctx->commandList) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(bctx->commandList); if (it) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { GWB_BuildCmd_SetBlockingFiles(bcmd, 0); bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } } void _clearDepsInFiles(GWB_BUILD_CONTEXT *bctx) { if (bctx->fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(bctx->fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_File_ClearWaitingBuildCmds(file); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } } void _setupDepsForCmd(GWB_BUILD_CMD *bcmd, GWB_BUILD_CMD_LIST2 *targetCmdList) { GWB_FILE_LIST2 *fileList; fileList=GWB_BuildCmd_GetInFileList2(bcmd); if (fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_BUILD_CMD *fileBuildCmd; fileBuildCmd=GWB_File_GetBuildCmd(file); if (fileBuildCmd) { GWB_File_AddWaitingBuildCmd(file, bcmd); GWB_BuildCmd_IncBlockingFiles(bcmd); if (!_cmdIsInList(targetCmdList, fileBuildCmd)) { if (GWB_BuildCmd_GetCurrentCommand(fileBuildCmd)) { GWB_BuildCmd_List2_PushBack(targetCmdList, fileBuildCmd); _setupDepsForCmd(fileBuildCmd, targetCmdList); /* recursion! */ } } } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } } void _setBuildCmdInFiles(GWB_BUILD_CONTEXT *bctx) { if (bctx->commandList) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(bctx->commandList); if (it) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { _fileListSetBuildCmd(GWB_BuildCmd_GetOutFileList2(bcmd), bcmd); bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } } } void _fileListSetBuildCmd(GWB_FILE_LIST2 *fileList, GWB_BUILD_CMD *bcmd) { if (fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_File_SetBuildCmd(file, bcmd); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } } int _cmdIsInList(const GWB_BUILD_CMD_LIST2 *sourceCmdList, const GWB_BUILD_CMD *cmd) { GWB_BUILD_CMD_LIST2_ITERATOR *it; it=GWB_BuildCmd_List2_First(sourceCmdList); if (it) { GWB_BUILD_CMD *bcmd; bcmd=GWB_BuildCmd_List2Iterator_Data(it); while(bcmd) { if (bcmd==cmd) { GWB_BuildCmd_List2Iterator_free(it); return 1; } bcmd=GWB_BuildCmd_List2Iterator_Next(it); } GWB_BuildCmd_List2Iterator_free(it); } return 0; } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx.c0000664000175000017500000001501214460564441017633 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define DISABLE_DEBUGLOG #include "gwenbuild/buildctx/buildctx.h" #include "gwenbuild/buildctx/buildctx_run.h" #include "gwenbuild/buildctx/buildctx_p.h" #include #include #include #include #include #include static int _prepareBaseLogPath(GWB_BUILD_CONTEXT *bctx); GWB_BUILD_CONTEXT *GWB_BuildCtx_new() { GWB_BUILD_CONTEXT *bctx; GWEN_NEW_OBJECT(GWB_BUILD_CONTEXT, bctx); bctx->commandList=GWB_BuildCmd_List2_new(); bctx->fileList=GWB_File_List2_new(); return bctx; } void GWB_BuildCtx_free(GWB_BUILD_CONTEXT *bctx) { if (bctx) { GWB_BuildCmd_List2_free(bctx->waitingQueue); GWB_BuildCmd_List2_free(bctx->runningQueue); GWB_BuildCmd_List2_free(bctx->finishedQueue); GWB_BuildCmd_List2_FreeAll(bctx->commandList); GWB_File_List2_FreeAll(bctx->fileList); free(bctx->initialSourceDir); GWEN_FREE_OBJECT(bctx); } } const char *GWB_BuildCtx_GetLogPath(const GWB_BUILD_CONTEXT *bctx) { return bctx->logPath; } void GWB_BuildCtx_SetLogPath(GWB_BUILD_CONTEXT *bctx, const char *s) { free(bctx->logPath); bctx->logPath=s?strdup(s):NULL; } const char *GWB_BuildCtx_GetInitialSourceDir(const GWB_BUILD_CONTEXT *bctx) { return bctx->initialSourceDir; } void GWB_BuildCtx_SetInitialSourceDir(GWB_BUILD_CONTEXT *bctx, const char *s) { free(bctx->initialSourceDir); bctx->initialSourceDir=s?strdup(s):NULL; } GWB_BUILD_CMD_LIST2 *GWB_BuildCtx_GetCommandList(const GWB_BUILD_CONTEXT *bctx) { return bctx->commandList; } void GWB_BuildCtx_AddCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *cmd) { GWB_BuildCmd_List2_PushBack(bctx->commandList, cmd); } GWB_FILE_LIST2 *GWB_BuildCtx_GetFileList(const GWB_BUILD_CONTEXT *bctx) { return bctx->fileList; } void GWB_BuildCtx_AddFile(GWB_BUILD_CONTEXT *bctx, GWB_FILE *file) { GWB_File_SetId(file, ++(bctx->lastFileId)); DBG_INFO(NULL, "Adding file%s/%s", GWB_File_GetFolder(file), GWB_File_GetName(file)); GWB_File_List2_PushBack(bctx->fileList, file); } GWB_FILE *GWB_BuildCtx_GetFileByPathAndName(const GWB_BUILD_CONTEXT *bctx, const char *folder, const char *fname) { return GWB_File_List2_GetFileByPathAndName(bctx->fileList, folder, fname); } void GWB_BuildCtx_AddInFileToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file) { GWB_FILE *storedFile; storedFile=GWB_BuildCtx_GetFileByPathAndName(bctx, GWB_File_GetFolder(file), GWB_File_GetName(file)); if (storedFile) GWB_BuildCmd_AddInFile(bcmd, storedFile); else { GWB_FILE *fileCopy; fileCopy=GWB_File_dup(file); GWB_BuildCtx_AddFile(bctx, fileCopy); GWB_BuildCmd_AddInFile(bcmd, fileCopy); } } void GWB_BuildCtx_AddInFilesToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_BuildCtx_AddInFileToCtxAndCmd(bctx, bcmd, file); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void GWB_BuildCtx_AddOutFileToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file) { GWB_FILE *storedFile; storedFile=GWB_BuildCtx_GetFileByPathAndName(bctx, GWB_File_GetFolder(file), GWB_File_GetName(file)); if (storedFile) GWB_BuildCmd_AddOutFile(bcmd, storedFile); else { GWB_FILE *fileCopy; fileCopy=GWB_File_dup(file); GWB_BuildCtx_AddFile(bctx, fileCopy); GWB_BuildCmd_AddOutFile(bcmd, fileCopy); } } void GWB_BuildCtx_AddOutFilesToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(fileList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { GWB_BuildCtx_AddOutFileToCtxAndCmd(bctx, bcmd, file); file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } void GWB_BuildCtx_Dump(const GWB_BUILD_CONTEXT *bctx, int indent) { int i; for(i=0; icommandList, indent+2); GWBUILD_Debug_PrintFileList2("fileList", bctx->fileList, indent+2); } int GWB_BuildCtx_CreateAndSetLogFilenameForSubCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_SUBCMD *cmd) { GWEN_BUFFER *dbuf; int rv; if (bctx->logPath==NULL) { rv=_prepareBaseLogPath(bctx); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } dbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(dbuf, bctx->logPath); #if 0 rv=GWEN_Directory_GetPath(GWEN_Buffer_GetStart(dbuf), 0); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error opening/creating folder \"%s\": %d", GWEN_Buffer_GetStart(dbuf), rv); GWEN_Buffer_free(dbuf); return rv; } #endif /*GWEN_Buffer_AppendString(dbuf, GWEN_DIR_SEPARATOR_S);*/ GWEN_Buffer_AppendString(dbuf, "-"); GWEN_Buffer_AppendArgs(dbuf, "%05d", ++(bctx->lastLogfileId)); GWEN_Buffer_AppendString(dbuf, ".log"); GWB_BuildSubCmd_SetLogFilename(cmd, GWEN_Buffer_GetStart(dbuf)); GWEN_Buffer_free(dbuf); return 0; } int _prepareBaseLogPath(GWB_BUILD_CONTEXT *bctx) { GWEN_BUFFER *dbuf; GWEN_TIME *ti; int rv; dbuf=GWEN_Buffer_new(0, 256, 0, 1); ti=GWEN_CurrentTime(); GWEN_Buffer_AppendString(dbuf, ".logs"); rv=GWEN_Directory_GetPath(GWEN_Buffer_GetStart(dbuf), 0); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error getting path \"%s\": %d", GWEN_Buffer_GetStart(dbuf), rv); GWEN_Time_free(ti); GWEN_Buffer_free(dbuf); return rv; } GWEN_Buffer_AppendString(dbuf, GWEN_DIR_SEPARATOR_S); rv=GWEN_Time_toString(ti, "YYYYMMDD-hhmmss", dbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error adding time string to buffer: %d", rv); GWEN_Time_free(ti); GWEN_Buffer_free(dbuf); return rv; } GWB_BuildCtx_SetLogPath(bctx, GWEN_Buffer_GetStart(dbuf)); GWEN_Time_free(ti); GWEN_Buffer_free(dbuf); return 0; } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildctx_xml.h0000664000175000017500000000133714116666046020527 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCTX_XML_H #define GWBUILD_BUILDCTX_XML_H #include #include "gwenbuild/buildctx/buildctx.h" GWB_BUILD_CONTEXT *GWB_BuildCtx_ReadFromXmlFile(const char *fileName); int GWB_BuildCtx_WriteToXmlFile(const GWB_BUILD_CONTEXT *buildCtx, const char *fileName); #endif gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildsubcmd.c0000664000175000017500000001363414460564441020322 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/buildctx/buildsubcmd_p.h" #include #include GWEN_LIST_FUNCTIONS(GWB_BUILD_SUBCMD, GWB_BuildSubCmd); GWB_BUILD_SUBCMD *GWB_BuildSubCmd_new(void) { GWB_BUILD_SUBCMD *cmd; GWEN_NEW_OBJECT(GWB_BUILD_SUBCMD, cmd); GWEN_LIST_INIT(GWB_BUILD_SUBCMD, cmd); return cmd; } GWB_BUILD_SUBCMD *GWB_BuildSubCmd_dup(const GWB_BUILD_SUBCMD *origCmd) { if (origCmd==NULL) return NULL; else { GWB_BUILD_SUBCMD *cmd; cmd=GWB_BuildSubCmd_new(); cmd->flags=origCmd->flags; cmd->command=(origCmd->command)?strdup(origCmd->command):NULL; cmd->arguments=(origCmd->arguments)?strdup(origCmd->arguments):NULL; cmd->buildMessage=(origCmd->buildMessage)?strdup(origCmd->buildMessage):NULL; cmd->depFilePath=(origCmd->depFilePath)?strdup(origCmd->depFilePath):NULL; return cmd; } } void GWB_BuildSubCmd_free(GWB_BUILD_SUBCMD *cmd) { if (cmd) { GWEN_LIST_FINI(GWB_BUILD_SUBCMD, cmd); free(cmd->command); free(cmd->arguments); free(cmd->buildMessage); free(cmd->logFilename); GWEN_FREE_OBJECT(cmd); } } const char *GWB_BuildSubCmd_GetLogFilename(const GWB_BUILD_SUBCMD *cmd) { return cmd->logFilename; } void GWB_BuildSubCmd_SetLogFilename(GWB_BUILD_SUBCMD *cmd, const char *s) { free(cmd->logFilename); cmd->logFilename=s?strdup(s):NULL; } uint32_t GWB_BuildSubCmd_GetFlags(const GWB_BUILD_SUBCMD *cmd) { return cmd->flags; } void GWB_BuildSubCmd_SetFlags(GWB_BUILD_SUBCMD *cmd, uint32_t f) { cmd->flags=f; } void GWB_BuildSubCmd_AddFlags(GWB_BUILD_SUBCMD *cmd, uint32_t f) { cmd->flags|=f; } void GWB_BuildSubCmd_DelFlags(GWB_BUILD_SUBCMD *cmd, uint32_t f) { cmd->flags&=~f; } const char *GWB_BuildSubCmd_GetCommand(const GWB_BUILD_SUBCMD *cmd) { return cmd->command; } void GWB_BuildSubCmd_SetCommand(GWB_BUILD_SUBCMD *cmd, const char *s) { free(cmd->command); cmd->command=s?strdup(s):NULL; } const char *GWB_BuildSubCmd_GetArguments(const GWB_BUILD_SUBCMD *cmd) { return cmd->arguments; } void GWB_BuildSubCmd_SetArguments(GWB_BUILD_SUBCMD *cmd, const char *s) { free(cmd->arguments); cmd->arguments=s?strdup(s):NULL; } const char *GWB_BuildSubCmd_GetBuildMessage(const GWB_BUILD_SUBCMD *cmd) { return cmd->buildMessage; } void GWB_BuildSubCmd_SetBuildMessage(GWB_BUILD_SUBCMD *cmd, const char *s) { free(cmd->buildMessage); cmd->buildMessage=s?strdup(s):NULL; } const char *GWB_BuildSubCmd_GetDepFilePath(const GWB_BUILD_SUBCMD *cmd) { return cmd->depFilePath; } void GWB_BuildSubCmd_SetDepFilePath(GWB_BUILD_SUBCMD *cmd, const char *s) { free(cmd->depFilePath); cmd->depFilePath=s?strdup(s):NULL; } void GWB_BuildSubCmd_toXml(const GWB_BUILD_SUBCMD *cmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLNode_SetIntValue(xmlNode, "flags", cmd->flags); if (cmd->command) GWEN_XMLNode_SetCharValue(xmlNode, "command", cmd->command); if (cmd->arguments) GWEN_XMLNode_SetCharValue(xmlNode, "arguments", cmd->arguments); if (cmd->buildMessage) GWEN_XMLNode_SetCharValue(xmlNode, "buildMessage", cmd->buildMessage); if (cmd->depFilePath) GWEN_XMLNode_SetCharValue(xmlNode, "depFilePath", cmd->depFilePath); } GWB_BUILD_SUBCMD *GWB_BuildSubCmd_fromXml(GWEN_XMLNODE *xmlNode) { GWB_BUILD_SUBCMD *cmd; const char *s; cmd=GWB_BuildSubCmd_new(); cmd->flags=GWEN_XMLNode_GetIntValue(xmlNode, "flags", 0); s=GWEN_XMLNode_GetCharValue(xmlNode, "command", NULL); GWB_BuildSubCmd_SetCommand(cmd, s); s=GWEN_XMLNode_GetCharValue(xmlNode, "arguments", NULL); GWB_BuildSubCmd_SetArguments(cmd, s); s=GWEN_XMLNode_GetCharValue(xmlNode, "buildMessage", NULL); GWB_BuildSubCmd_SetBuildMessage(cmd, s); s=GWEN_XMLNode_GetCharValue(xmlNode, "depFilePath", NULL); GWB_BuildSubCmd_SetDepFilePath(cmd, s); return cmd; } GWB_BUILD_SUBCMD_LIST *GWB_BuildSubCmd_List_dup(const GWB_BUILD_SUBCMD_LIST *cmdList) { GWB_BUILD_SUBCMD_LIST *newList; GWB_BUILD_SUBCMD *cmd; newList=GWB_BuildSubCmd_List_new(); cmd=GWB_BuildSubCmd_List_First(cmdList); while(cmd) { GWB_BuildSubCmd_List_Add(GWB_BuildSubCmd_dup(cmd), newList); cmd=GWB_BuildSubCmd_List_Next(cmd); } return newList; } void GWB_BuildSubCmd_Dump(const GWB_BUILD_SUBCMD *cmd, int indent) { if (cmd) { int i; for(i=0; icommand)?(cmd->command):""); for(i=0; iarguments)?(cmd->arguments):""); for(i=0; ibuildMessage)?(cmd->buildMessage):""); for(i=0; idepFilePath)?(cmd->depFilePath):""); } } void GWB_BuildSubCmd_List_Dump(const GWB_BUILD_SUBCMD_LIST *cmdList, int indent, const char *text) { int i; if (text) { for(i=0; i\n"); } } gwenhywfar-5.12.1/tools/gwenbuild/buildctx/buildcmd.h0000664000175000017500000000705514116666046017617 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDCMD_H #define GWBUILD_BUILDCMD_H #include #include #include #include typedef struct GWB_BUILD_CMD GWB_BUILD_CMD; GWEN_LIST_FUNCTION_DEFS(GWB_BUILD_CMD, GWB_BuildCmd); GWEN_LIST2_FUNCTION_DEFS(GWB_BUILD_CMD, GWB_BuildCmd); #define GWB_BUILD_CMD_FLAGS_CHECK_DATES 0x0002 #define GWB_BUILD_CMD_FLAGS_DEL_OUTFILES 0x0008 #define GWB_BUILD_CMD_FLAGS_AUTO 0x0010 #include "gwenbuild/types/file.h" #include "gwenbuild/types/keyvaluepair.h" #include "gwenbuild/buildctx/buildsubcmd.h" GWB_BUILD_CMD *GWB_BuildCmd_new(void); GWB_BUILD_CMD *GWB_BuildCmd_dup(GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_free(GWB_BUILD_CMD *bcmd); uint32_t GWB_BuildCmd_GetFlags(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetFlags(GWB_BUILD_CMD *bcmd, uint32_t i); void GWB_BuildCmd_AddFlags(GWB_BUILD_CMD *bcmd, uint32_t i); void GWB_BuildCmd_DelFlags(GWB_BUILD_CMD *bcmd, uint32_t i); const char *GWB_BuildCmd_GetBuilderName(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetBuilderName(GWB_BUILD_CMD *bcmd, const char *s); const char *GWB_BuildCmd_GetFolder(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetFolder(GWB_BUILD_CMD *bcmd, const char *s); const char *GWB_BuildCmd_GetBuildMessage(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetBuildMessage(GWB_BUILD_CMD *bcmd, const char *s); GWB_BUILD_SUBCMD_LIST *GWB_BuildCmd_GetPrepareCommandList(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_AddPrepareCommand(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *cmd); GWB_BUILD_SUBCMD_LIST *GWB_BuildCmd_GetBuildCommandList(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_AddBuildCommand(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *cmd); int GWB_BuildCmd_GetBlockingFiles(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetBlockingFiles(GWB_BUILD_CMD *bcmd, int i); int GWB_BuildCmd_IncBlockingFiles(GWB_BUILD_CMD *bcmd); int GWB_BuildCmd_DecBlockingFiles(GWB_BUILD_CMD *bcmd); GWB_FILE_LIST2 *GWB_BuildCmd_GetInFileList2(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_AddInFile(GWB_BUILD_CMD *bcmd, GWB_FILE *file); GWB_FILE_LIST2 *GWB_BuildCmd_GetOutFileList2(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_AddOutFile(GWB_BUILD_CMD *bcmd, GWB_FILE *file); GWEN_PROCESS *GWB_BuildCmd_GetCurrentProcess(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetCurrentProcess(GWB_BUILD_CMD *bcmd, GWEN_PROCESS *process); GWB_BUILD_SUBCMD *GWB_BuildCmd_GetCurrentCommand(const GWB_BUILD_CMD *bcmd); void GWB_BuildCmd_SetCurrentCommand(GWB_BUILD_CMD *bcmd, GWB_BUILD_SUBCMD *cmd); void GWB_BuildCmd_toXml(const GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode); GWB_BUILD_CMD *GWB_BuildCmd_fromXml(GWEN_XMLNODE *xmlNode, GWB_FILE_LIST2 *fileList); void GWB_BuildCmd_List_WriteXml(const GWB_BUILD_CMD_LIST *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName); void GWB_BuildCmd_List2_WriteXml(const GWB_BUILD_CMD_LIST2 *cmdList, GWEN_XMLNODE *xmlNode, const char *groupName); void GWB_BuildCmd_List2_FreeAll(GWB_BUILD_CMD_LIST2 *cmdList); void GWB_BuildCmd_Dump(const GWB_BUILD_CMD *bcmd, int indent); void GWB_BuildCmd_PrintDescriptionWithText(const GWB_BUILD_CMD *bcmd, int indent, const char *text); #endif gwenhywfar-5.12.1/tools/gwenbuild/c_prepare.h0000664000175000017500000000110214116666046016141 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_PREPARE_H #define GWBUILD_C_PREPARE_H #include int GWB_Prepare(GWEN_UNUSED GWEN_DB_NODE *dbArgs); #endif gwenhywfar-5.12.1/tools/gwenbuild/c_build.h0000664000175000017500000000106014116666046015605 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_BUILD_H #define GWBUILD_C_BUILD_H #include int GWB_Build(GWEN_DB_NODE *dbArgs); #endif gwenhywfar-5.12.1/tools/gwenbuild/builders/0000755000175000017500000000000015032533715015717 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/builders/genericbuilder.h0000664000175000017500000000143414116666046021005 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDERS_GENERIC_H #define GWBUILD_BUILDERS_GENERIC_H #include "gwenbuild/types/builder.h" #include GWB_BUILDER *GWB_GenericBuilder_Factory(GWENBUILD *gwenbuild, GWB_CONTEXT *context, const char *builderName); GWB_BUILDER *GWB_GenericBuilder_new(GWENBUILD *gwenbuild, GWB_CONTEXT *context, GWEN_XMLNODE *xmlDescr); #endif gwenhywfar-5.12.1/tools/gwenbuild/builders/gbuilderdescr.c0000664000175000017500000001161114460564441020627 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/builders/gbuilderdescr_p.h" #include "gwenbuild/parser/parser.h" #include #include #include #include GWEN_LIST_FUNCTIONS(GWB_GBUILDER_DESCR, GWB_GBuilderDescr) static void _readSettingsFromXml(GWB_GBUILDER_DESCR *descr); GWB_GBUILDER_DESCR *_readFromFile(const char *fileName); GWB_GBUILDER_DESCR *GWB_GBuilderDescr_new(GWEN_XMLNODE *xmlNode) { GWB_GBUILDER_DESCR *descr; const char *s; s=GWEN_XMLNode_GetProperty(xmlNode, "name", NULL); if (!(s && *s)) { DBG_ERROR(NULL, "No builder name in XML builder description"); return NULL; } GWEN_NEW_OBJECT(GWB_GBUILDER_DESCR, descr); GWEN_LIST_INIT(GWB_GBUILDER_DESCR, descr); descr->builderName=strdup(s); descr->xmlDescr=xmlNode; _readSettingsFromXml(descr); return descr; } void _readSettingsFromXml(GWB_GBUILDER_DESCR *descr) { GWEN_XMLNODE *nInputFiles; nInputFiles=GWEN_XMLNode_FindFirstTag(descr->xmlDescr, "inputFiles", NULL, NULL); if (nInputFiles) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(nInputFiles, "acceptedInputTypes", NULL, NULL); if (n) descr->acceptedInputTypes=GWB_Parser_ReadXmlDataIntoStringList(NULL, n, 1); n=GWEN_XMLNode_FindFirstTag(nInputFiles, "acceptedInputFiles", NULL, NULL); if (n) descr->acceptedInputExt=GWB_Parser_ReadXmlDataIntoStringList(NULL, n, 1); } } void GWB_GBuilderDescr_free(GWB_GBUILDER_DESCR *descr) { if (descr) { GWEN_LIST_FINI(GWB_GBUILDER_DESCR, descr); free(descr->builderName); GWEN_XMLNode_free(descr->xmlDescr); GWEN_StringList_free(descr->acceptedInputTypes); GWEN_StringList_free(descr->acceptedInputExt); GWEN_FREE_OBJECT(descr); } } const char *GWB_GBuilderDescr_GetBuilderName(const GWB_GBUILDER_DESCR *descr) { return descr->builderName; } GWEN_XMLNODE *GWB_GBuilderDescr_GetXmlDescr(const GWB_GBUILDER_DESCR *descr) { return descr->xmlDescr; } GWEN_STRINGLIST *GWB_GBuilderDescr_GetAcceptedInputTypes(const GWB_GBUILDER_DESCR *descr) { return descr->acceptedInputTypes; } GWEN_STRINGLIST *GWB_GBuilderDescr_GetAcceptedInputExt(const GWB_GBUILDER_DESCR *descr) { return descr->acceptedInputExt; } GWB_GBUILDER_DESCR *_readFromFile(const char *fileName) { GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlDescr; GWB_GBUILDER_DESCR *descr; int rv; xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlRoot, fileName, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "No builder description found in file \"%s\" (%d)", fileName, rv); return NULL; } xmlDescr=GWEN_XMLNode_FindFirstTag(xmlRoot, "GwenBuilder", NULL, NULL); if (xmlDescr==NULL) { DBG_ERROR(NULL, "No element found in file \"%s\"", fileName); GWEN_XMLNode_free(xmlRoot); return NULL; } GWEN_XMLNode_UnlinkChild(xmlRoot, xmlDescr); GWEN_XMLNode_free(xmlRoot); descr=GWB_GBuilderDescr_new(xmlDescr); if (descr==NULL) { DBG_ERROR(NULL, "Error in file \"%s\"", fileName); GWEN_XMLNode_free(xmlDescr); return NULL; } return descr; } GWB_GBUILDER_DESCR_LIST *GWB_GBuilderDescr_ReadAll(const char *folder) { GWEN_STRINGLIST *sl; GWEN_STRINGLISTENTRY *se; GWB_GBUILDER_DESCR_LIST *descrList; int rv; sl=GWEN_StringList_new(); rv=GWEN_Directory_GetMatchingFilesRecursively(folder, sl, "*.gwb"); if (rv<0) { DBG_ERROR(NULL, "here (%d)", rv); GWEN_StringList_free(sl); return NULL; } descrList=GWB_GBuilderDescr_List_new(); se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { GWB_GBUILDER_DESCR *descr; DBG_INFO(NULL, "Reading builder descr file \"%s\"", s); descr=_readFromFile(s); if (descr==NULL) { DBG_ERROR(NULL, "Error reading description from file \"%s\", ignoring", s); } else GWB_GBuilderDescr_List_Add(descr, descrList); } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); return descrList; } GWB_GBUILDER_DESCR *GWB_GBuilderDescr_List_GetByName(const GWB_GBUILDER_DESCR_LIST *descrList, const char *name) { GWB_GBUILDER_DESCR *descr; descr=GWB_GBuilderDescr_List_First(descrList); while(descr) { if (descr->builderName && strcasecmp(descr->builderName, name)==0) return descr; descr=GWB_GBuilderDescr_List_Next(descr); } return NULL; } gwenhywfar-5.12.1/tools/gwenbuild/builders/genericbuilder.c0000664000175000017500000006657514460564441021017 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gwenbuild/builders/genericbuilder_p.h" #include "gwenbuild/types/builder_be.h" #include "gwenbuild/parser/parser.h" #include #include #include #include GWEN_INHERIT(GWB_BUILDER, GWB_BUILDER_GENERIC); static void GWENHYWFAR_CB _freeData(void *bp, void *p); static void _readMainSettingsFromXml(GWB_BUILDER *builder); static void _setupVariables(GWB_BUILDER *builder); static void _setupAfterAddingFirstInputFile(GWB_BUILDER *builder); static void _setupOutFiles(GWB_BUILDER *builder); static void _setupTargetLinkSpec(GWB_BUILDER *builder); static GWB_FILE *_parseOutFile(GWB_BUILDER *builder, GWB_PROJECT *project, GWB_TARGET *target, GWEN_XMLNODE *nFile, const char *folder); static GWEN_BUFFER *_readXmlDataIntoBufferAndExpand(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode); static int _isAcceptableInput(GWB_BUILDER *builder, const GWB_FILE *file); static void _addSourceFile(GWB_BUILDER *builder, GWB_FILE *f); static int _addBuildCmd(GWB_BUILDER *builder, GWB_BUILD_CONTEXT *bctx); static void _addBuildCommands(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd); static void _addPrepareCommands(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd); static void _addCommands(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, const char *groupName, GWB_BUILD_SUBCMD_LIST *cmdList); static GWB_BUILD_SUBCMD *_readSubCmd(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *n); static void _readDepFile(GWB_BUILDER *builder, GWB_BUILD_SUBCMD *cmd, GWEN_XMLNODE *xmlNode); static GWEN_BUFFER *_readMainFilename(GWB_CONTEXT *context, GWEN_XMLNODE *xmlFile, GWB_FILE_LIST2 *filesList); static void _readBuildMessage(GWB_BUILDER *builder, GWB_BUILD_SUBCMD *cmd, GWEN_XMLNODE *xmlNode); static GWEN_BUFFER *_readArgs(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode); static void _readArgsLoop(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *nArgs, GWEN_BUFFER *argsBuffer); static void _readArgsFixed(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer); static void _readArgsInputFiles(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer); static void _readArgsOutputFiles(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer); static void _readArgsLibraries(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer); static void _readArgsIncludes(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer); static void _readArgsDefines(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer); static void _readArgsUsedSubTargets(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer); static void _readArgsIfHasUsedSubTargets(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer); static void _readArgsIfHasLibraries(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer); static void _readArgsHaveConfigH(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer); static void _addMatchingFiles(GWB_BUILDER *builder, GWB_FILE_LIST2 *filesList, const char *pattern, int addAbs, GWEN_BUFFER *argsBuffer); static void _addStringListToBuffer(GWEN_STRINGLIST *sl, GWEN_BUFFER *argsBuffer); GWB_BUILDER *GWB_GenericBuilder_Factory(GWENBUILD *gwenbuild, GWB_CONTEXT *context, const char *builderName) { GWB_BUILDER *builder; GWEN_BUFFER *nameBuf; GWEN_XMLNODE *xmlRoot; GWEN_XMLNODE *xmlDescr; int rv; nameBuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(nameBuf, BUILDERDATADIR GWEN_DIR_SEPARATOR_S); if (GWBUILD_GetTargetIsWindows(gwenbuild)) GWEN_Buffer_AppendString(nameBuf, "windows"); else GWEN_Buffer_AppendString(nameBuf, "posix"); GWEN_Buffer_AppendString(nameBuf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(nameBuf, builderName); GWEN_Buffer_AppendString(nameBuf, ".gwb"); xmlRoot=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); rv=GWEN_XML_ReadFile(xmlRoot, GWEN_Buffer_GetStart(nameBuf), GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_SIMPLE); if (rv<0) { DBG_ERROR(NULL, "No description for builder type \"%s\" found (%d, tried \"%s\")", builderName, rv, GWEN_Buffer_GetStart(nameBuf)); GWEN_Buffer_free(nameBuf); return NULL; } xmlDescr=GWEN_XMLNode_FindFirstTag(xmlRoot, "GwenBuilder", NULL, NULL); if (xmlDescr==NULL) { DBG_ERROR(NULL, "No element found in file \"%s\"", GWEN_Buffer_GetStart(nameBuf)); GWEN_XMLNode_free(xmlRoot); GWEN_Buffer_free(nameBuf); return NULL; } GWEN_XMLNode_UnlinkChild(xmlRoot, xmlDescr); GWEN_XMLNode_free(xmlRoot); builder=GWB_GenericBuilder_new(gwenbuild, context, xmlDescr); if (builder==NULL) { DBG_ERROR(NULL, "Error in file \"%s\"", GWEN_Buffer_GetStart(nameBuf)); GWEN_XMLNode_free(xmlDescr); GWEN_Buffer_free(nameBuf); return NULL; } GWEN_Buffer_free(nameBuf); return builder; } GWB_BUILDER *GWB_GenericBuilder_new(GWENBUILD *gwenbuild, GWB_CONTEXT *context, GWEN_XMLNODE *xmlDescr) { GWB_BUILDER *builder; GWB_BUILDER_GENERIC *xbuilder; const char *s; s=GWEN_XMLNode_GetProperty(xmlDescr, "name", NULL); if (!(s && *s)) { DBG_ERROR(NULL, "No builder name in XML builder description"); return NULL; } builder=GWB_Builder_new(gwenbuild, context, s); GWEN_NEW_OBJECT(GWB_BUILDER_GENERIC, xbuilder); GWEN_INHERIT_SETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder, xbuilder, _freeData); xbuilder->builderName=strdup(s); xbuilder->dbVars=GWEN_DB_Group_new("vars"); xbuilder->xmlDescr=xmlDescr; GWB_Builder_SetIsAcceptableInputFn(builder, _isAcceptableInput); GWB_Builder_SetAddSourceFileFn(builder, _addSourceFile); GWB_Builder_SetAddBuildCmdFn(builder, _addBuildCmd); _readMainSettingsFromXml(builder); _setupVariables(builder); return builder; } void GWENHYWFAR_CB _freeData(GWEN_UNUSED void *bp, void *p) { GWB_BUILDER_GENERIC *xbuilder; xbuilder=(GWB_BUILDER_GENERIC*) p; GWEN_DB_Group_free(xbuilder->dbVars); GWEN_XMLNode_free(xbuilder->xmlDescr); free(xbuilder->toolName); free(xbuilder->builderName); GWEN_FREE_OBJECT(xbuilder); } void _readMainSettingsFromXml(GWB_BUILDER *builder) { GWB_BUILDER_GENERIC *xbuilder; GWB_CONTEXT *context; GWEN_XMLNODE *nInputFiles; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); context=GWB_Builder_GetContext(builder); xbuilder->maxInputFiles=GWEN_XMLNode_GetIntProperty(xbuilder->xmlDescr, "maxinputfiles", -1); nInputFiles=GWEN_XMLNode_FindFirstTag(xbuilder->xmlDescr, "inputFiles", NULL, NULL); if (nInputFiles) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(nInputFiles, "acceptedInputTypes", NULL, NULL); if (n) xbuilder->acceptedInputTypes=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(context), n, 1); n=GWEN_XMLNode_FindFirstTag(nInputFiles, "acceptedInputFiles", NULL, NULL); if (n) xbuilder->acceptedInputExt=GWB_Parser_ReadXmlDataIntoStringList(GWB_Context_GetVars(context), n, 1); } } void _setupVariables(GWB_BUILDER *builder) { GWB_BUILDER_GENERIC *xbuilder; GWB_CONTEXT *context; const char *s; GWEN_DB_NODE *db; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); db=xbuilder->dbVars; context=GWB_Builder_GetContext(builder); s=GWB_Context_GetCurrentRelativeDir(context); if (s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_DEFAULT, "folder", s); GWEN_DB_AddGroupChildren(db, GWB_Context_GetVars(context)); } void _setToolName(GWB_BUILDER *builder, const char *s) { GWB_BUILDER_GENERIC *xbuilder; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); free(xbuilder->toolName); xbuilder->toolName=s?strdup(s):NULL; } void _addSourceFile(GWB_BUILDER *builder, GWB_FILE *f) { GWB_FILE_LIST2 *fileList; GWB_Builder_AddInputFile(builder, f); fileList=GWB_Builder_GetOutputFileList2(builder); if (!(fileList && GWB_File_List2_GetSize(fileList)>0)) { _setupAfterAddingFirstInputFile(builder); } } void _setupAfterAddingFirstInputFile(GWB_BUILDER *builder) { GWB_BUILDER_GENERIC *xbuilder; GWB_FILE_LIST2 *fileList; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); fileList=GWB_Builder_GetInputFileList2(builder); if (fileList) { GWB_FILE *file; file=GWB_File_List2_GetFront(fileList); if (file) { const char *s; s=GWB_File_GetName(file); if (s) { const char *ptrToPoint; GWEN_DB_SetCharValue(xbuilder->dbVars, GWEN_DB_FLAGS_DEFAULT, "firstInputFile", s); ptrToPoint=strrchr(s, '.'); if (ptrToPoint) { char *copyOfName; copyOfName=GWEN_Text_strndup(s, (ptrToPoint-s)); GWEN_DB_SetCharValue(xbuilder->dbVars, GWEN_DB_FLAGS_DEFAULT, "firstInputFileNoExt", copyOfName); free(copyOfName); } } } } _setupOutFiles(builder); _setupTargetLinkSpec(builder); } void _setupOutFiles(GWB_BUILDER *builder) { GWB_BUILDER_GENERIC *xbuilder; GWB_CONTEXT *context; GWB_TARGET *target; GWB_PROJECT *project; const char *folder; const char *installName; GWEN_XMLNODE *nOutputFiles; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); context=GWB_Builder_GetContext(builder); target=GWB_Context_GetCurrentTarget(context); project=GWB_Target_GetProject(target); folder=GWB_Context_GetCurrentBuildDir(context); installName=GWB_Target_GetInstallName(target); nOutputFiles=GWEN_XMLNode_FindFirstTag(xbuilder->xmlDescr, "outputFiles", NULL, NULL); if (nOutputFiles) { GWEN_XMLNODE *nFile; nFile=GWEN_XMLNode_FindFirstTag(nOutputFiles, "file", NULL, NULL); while (nFile) { GWB_FILE *fileOut; fileOut=_parseOutFile(builder, project, target, nFile, folder); if (fileOut) { if (installName && *installName) GWB_File_SetInstallName(fileOut, installName); GWB_Builder_AddOutputFile(builder, fileOut); } nFile=GWEN_XMLNode_FindNextTag(nFile, "file", NULL, NULL); } /* while nFile */ } /* if nOutputFiles */ } GWB_FILE *_parseOutFile(GWB_BUILDER *builder, GWB_PROJECT *project, GWB_TARGET *target, GWEN_XMLNODE *nFile, const char *folder) { GWB_BUILDER_GENERIC *xbuilder; const char *sFileType; const char *sInstall; GWEN_BUFFER *nbuf; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); sFileType=GWEN_XMLNode_GetProperty(nFile, "type", NULL); sInstall=GWEN_XMLNode_GetProperty(nFile, "install", NULL); nbuf=_readXmlDataIntoBufferAndExpand(xbuilder->dbVars, nFile); if (nbuf) { GWB_FILE *fileOut; const char *sTargetInstallPath=NULL; fileOut=GWB_File_List2_GetOrCreateFile(GWB_Project_GetFileList(project), folder, GWEN_Buffer_GetStart(nbuf)); GWEN_Buffer_free(nbuf); if (sFileType) GWB_File_SetFileType(fileOut, sFileType); if (sInstall && strcasecmp(sInstall, "target")==0) sTargetInstallPath=GWB_Target_GetInstallPath(target); GWB_File_AddFlags(fileOut, GWB_FILE_FLAGS_GENERATED); if (sTargetInstallPath && *sTargetInstallPath) { GWB_File_SetInstallPath(fileOut, sTargetInstallPath); GWB_File_AddFlags(fileOut, GWB_FILE_FLAGS_INSTALL); } return fileOut; } /* if nbuf */ return NULL; } void _setupTargetLinkSpec(GWB_BUILDER *builder) { GWB_BUILDER_GENERIC *xbuilder; GWEN_XMLNODE *nTargetLinkSpec; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); nTargetLinkSpec=GWEN_XMLNode_FindFirstTag(xbuilder->xmlDescr, "targetLinkSpecs", NULL, NULL); if (nTargetLinkSpec) { GWEN_BUFFER *buf; buf=_readXmlDataIntoBufferAndExpand(xbuilder->dbVars, nTargetLinkSpec); if (buf) { GWB_Builder_SetTargetLinkSpec(builder, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } } } GWEN_BUFFER *_readXmlDataIntoBufferAndExpand(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *xmlData; xmlData=GWEN_XMLNode_GetFirstData(xmlNode); if (xmlData) { const char *s; s=GWEN_XMLNode_GetData(xmlData); if (s && *s) { int rv; GWEN_BUFFER *buf; buf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_DB_ReplaceVars(db, s, buf); if(rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(buf); return NULL; } return buf; } } return NULL; } int _isAcceptableInput(GWEN_UNUSED GWB_BUILDER *builder, const GWB_FILE *f) { GWB_BUILDER_GENERIC *xbuilder; const char *sType; const char *sExt; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); sType=GWB_File_GetFileType(f); sExt=GWB_File_GetExt(f); if (sType && xbuilder->acceptedInputTypes && GWEN_StringList_HasString(xbuilder->acceptedInputTypes, sType)) return 1; if (sExt && xbuilder->acceptedInputExt && GWEN_StringList_HasString(xbuilder->acceptedInputExt, sExt)) return 1; return 0; } int _addBuildCmd(GWB_BUILDER *builder, GWB_BUILD_CONTEXT *bctx) { GWB_BUILDER_GENERIC *xbuilder; GWB_CONTEXT *context; GWB_BUILD_CMD *bcmd; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); context=GWB_Builder_GetContext(builder); bcmd=GWB_BuildCmd_new(); GWB_BuildCmd_AddFlags(bcmd, GWB_BUILD_CMD_FLAGS_AUTO); GWB_BuildCmd_SetBuilderName(bcmd, xbuilder->builderName); GWB_BuildCmd_SetFolder(bcmd, GWB_Context_GetCurrentBuildDir(context)); _addBuildCommands(builder, bcmd); _addPrepareCommands(builder, bcmd); GWB_BuildCtx_AddInFilesToCtxAndCmd(bctx, bcmd, GWB_Builder_GetInputFileList2(builder)); GWB_BuildCtx_AddOutFilesToCtxAndCmd(bctx, bcmd, GWB_Builder_GetOutputFileList2(builder)); GWB_BuildCtx_AddCommand(bctx, bcmd); return 0; } void _addBuildCommands(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd) { _addCommands(builder, bcmd, "buildCommands", GWB_BuildCmd_GetBuildCommandList(bcmd)); } void _addPrepareCommands(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd) { _addCommands(builder, bcmd, "prepareCommands", GWB_BuildCmd_GetPrepareCommandList(bcmd)); } void _addCommands(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, const char *groupName, GWB_BUILD_SUBCMD_LIST *cmdList) { GWB_BUILDER_GENERIC *xbuilder; GWEN_XMLNODE *n; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); n=GWEN_XMLNode_FindFirstTag(xbuilder->xmlDescr, groupName, NULL, NULL); if (n) { const char *s; s=GWEN_XMLNode_GetProperty(n, "checkDates", "TRUE"); if (s && strcasecmp(s, "TRUE")==0) GWB_BuildCmd_AddFlags(bcmd, GWB_BUILD_CMD_FLAGS_CHECK_DATES); s=GWEN_XMLNode_GetProperty(n, "deleteOutFileFirst", "FALSE"); if (s && strcasecmp(s, "TRUE")==0) GWB_BuildCmd_AddFlags(bcmd, GWB_BUILD_CMD_FLAGS_DEL_OUTFILES); n=GWEN_XMLNode_FindFirstTag(n, "cmd", NULL, NULL); while(n) { GWB_BUILD_SUBCMD *cmd; cmd=_readSubCmd(builder, bcmd, n); if (cmd) GWB_BuildSubCmd_List_Add(cmd, cmdList); n=GWEN_XMLNode_FindNextTag(n, "cmd", NULL, NULL); } } } GWB_BUILD_SUBCMD *_readSubCmd(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *n) { GWB_BUILDER_GENERIC *xbuilder; const char *sToolName; GWEN_BUFFER *argsBuffer; GWEN_BUFFER *toolNameBuffer; GWB_BUILD_SUBCMD *cmd; const char *s; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); toolNameBuffer=GWEN_Buffer_new(0, 256, 0, 1); sToolName=GWEN_XMLNode_GetProperty(n, "tool", NULL); if (sToolName) { GWEN_DB_ReplaceVars(xbuilder->dbVars, sToolName, toolNameBuffer); sToolName=GWEN_Buffer_GetStart(toolNameBuffer); } cmd=GWB_BuildSubCmd_new(); GWB_BuildSubCmd_SetCommand(cmd, sToolName); s=GWEN_XMLNode_GetProperty(n, "ignoreResult", "FALSE"); if (s && strcasecmp(s, "TRUE")==0) GWB_BuildSubCmd_AddFlags(cmd, GWB_BUILD_SUBCMD_FLAGS_IGNORE_RESULT); s=GWEN_XMLNode_GetProperty(n, "checkDepends", "FALSE"); if (s && strcasecmp(s, "TRUE")==0) GWB_BuildSubCmd_AddFlags(cmd, GWB_BUILD_SUBCMD_FLAGS_CHECK_DEPENDS); argsBuffer=_readArgs(builder, bcmd, n); if (argsBuffer) { GWB_BuildSubCmd_SetArguments(cmd, GWEN_Buffer_GetStart(argsBuffer)); GWEN_Buffer_free(argsBuffer); } _readDepFile(builder, cmd, n); _readBuildMessage(builder, cmd, n); GWEN_Buffer_free(toolNameBuffer); return cmd; } void _readBuildMessage(GWB_BUILDER *builder, GWB_BUILD_SUBCMD *cmd, GWEN_XMLNODE *xmlNode) { GWB_BUILDER_GENERIC *xbuilder; GWEN_XMLNODE *xmlMsg; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); xmlMsg=GWEN_XMLNode_FindFirstTag(xmlNode, "buildMessage", NULL, NULL); if (xmlMsg) { GWEN_BUFFER *buf; buf=_readXmlDataIntoBufferAndExpand(xbuilder->dbVars, xmlMsg); if (buf) { GWB_BuildSubCmd_SetBuildMessage(cmd, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } } } void _readDepFile(GWB_BUILDER *builder, GWB_BUILD_SUBCMD *cmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *xmlFile; xmlFile=GWEN_XMLNode_FindFirstTag(xmlNode, "depFile", NULL, NULL); if (xmlFile) { GWB_CONTEXT *context; GWB_FILE_LIST2 *filesList; GWEN_BUFFER *filenameBuffer; context=GWB_Builder_GetContext(builder); filesList=GWB_Builder_GetOutputFileList2(builder); filenameBuffer=_readMainFilename(context, xmlFile, filesList); if (filenameBuffer) { GWB_BuildSubCmd_SetDepFilePath(cmd, GWEN_Buffer_GetStart(filenameBuffer)); GWEN_Buffer_free(filenameBuffer); } } } GWEN_BUFFER *_readMainFilename(GWB_CONTEXT *context, GWEN_XMLNODE *xmlFile, GWB_FILE_LIST2 *filesList) { if (filesList) { int index; index=GWEN_XMLNode_GetIntProperty(xmlFile, "index", -1); if (index>=0) { GWB_FILE *file; file=GWB_File_List2_GetAt(filesList, index); if (file) { GWEN_BUFFER *filenameBuffer; const char *s; filenameBuffer=GWEN_Buffer_new(0, 256, 0, 1); if (!(GWB_File_GetFlags(file) & GWB_FILE_FLAGS_GENERATED)) { s=GWB_Context_GetInitialSourceDir(context); if (s && *s) { GWEN_Buffer_AppendString(filenameBuffer, s); GWEN_Buffer_AppendString(filenameBuffer, GWEN_DIR_SEPARATOR_S); } } s=GWB_File_GetFolder(file); if (s && *s) { GWEN_Buffer_AppendString(filenameBuffer, s); GWEN_Buffer_AppendString(filenameBuffer, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(filenameBuffer, GWB_File_GetName(file)); return filenameBuffer; } } } return NULL; } GWEN_BUFFER *_readArgs(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode) { GWEN_XMLNODE *nArgs; nArgs=GWEN_XMLNode_FindFirstTag(xmlNode, "args", NULL, NULL); if (nArgs) { GWEN_BUFFER *argsBuffer; argsBuffer=GWEN_Buffer_new(0, 256, 0, 1); _readArgsLoop(builder, bcmd, nArgs, argsBuffer); if (GWEN_Buffer_GetUsedBytes(argsBuffer)) return argsBuffer; GWEN_Buffer_free(argsBuffer); } return NULL; } void _readArgsLoop(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *nArgs, GWEN_BUFFER *argsBuffer) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(nArgs); while(n) { const char *sTagName; sTagName=GWEN_XMLNode_GetData(n); if (sTagName) { if (strcasecmp(sTagName, "fixed")==0) _readArgsFixed(builder, n, argsBuffer); else if (strcasecmp(sTagName, "inputFiles")==0) _readArgsInputFiles(builder, n, argsBuffer); else if (strcasecmp(sTagName, "outputFiles")==0) _readArgsOutputFiles(builder, n, argsBuffer); else if (strcasecmp(sTagName, "ifHasSubTargetLibs")==0) _readArgsIfHasUsedSubTargets(builder, bcmd, n, argsBuffer); else if (strcasecmp(sTagName, "subTargetLibs")==0) _readArgsUsedSubTargets(builder, argsBuffer); else if (strcasecmp(sTagName, "includes")==0) _readArgsIncludes(builder, n, argsBuffer); else if (strcasecmp(sTagName, "defines")==0) _readArgsDefines(builder, argsBuffer); else if (strcasecmp(sTagName, "ifHasLibraries")==0) _readArgsIfHasLibraries(builder, bcmd, n, argsBuffer); else if (strcasecmp(sTagName, "libraries")==0) _readArgsLibraries(builder, argsBuffer); else if (strcasecmp(sTagName, "haveConfigH")==0) _readArgsHaveConfigH(builder, argsBuffer); else if (strcasecmp(sTagName, "blank")==0) { GWEN_Buffer_AppendString(argsBuffer, " "); } else { DBG_ERROR(NULL, "Unhandled tag \"%s\", ignoring", sTagName); } } n=GWEN_XMLNode_GetNextTag(n); } /* while */ } void _readArgsFixed(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer) { GWB_BUILDER_GENERIC *xbuilder; GWEN_BUFFER *buf; xbuilder=GWEN_INHERIT_GETDATA(GWB_BUILDER, GWB_BUILDER_GENERIC, builder); buf=_readXmlDataIntoBufferAndExpand(xbuilder->dbVars, xmlNode); if (buf) { GWEN_Buffer_AppendString(argsBuffer, GWEN_Buffer_GetStart(buf)); GWEN_Buffer_free(buf); } } void _readArgsInputFiles(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_FILE_LIST2 *inFilesList; context=GWB_Builder_GetContext(builder); inFilesList=GWB_Builder_GetInputFileList2(builder); if (inFilesList) { int index; const char *pattern; int useAbsPath; useAbsPath=(strcasecmp(GWEN_XMLNode_GetProperty(xmlNode, "mode", "relpath"), "abspath")==0)?1:0; pattern=GWEN_XMLNode_GetProperty(xmlNode, "match", NULL); index=GWEN_XMLNode_GetIntProperty(xmlNode, "index", -1); if (index>=0) { GWB_FILE *file; file=GWB_File_List2_GetAt(inFilesList, index); if (file) { if (useAbsPath) GWB_Builder_AddAbsFileNameToBuffer(context, file, argsBuffer); else GWB_Builder_AddFileNameToBuffer(context, file, argsBuffer); } } else _addMatchingFiles(builder, inFilesList, pattern, useAbsPath, argsBuffer); } } void _readArgsOutputFiles(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_FILE_LIST2 *filesList; context=GWB_Builder_GetContext(builder); filesList=GWB_Builder_GetOutputFileList2(builder); if (filesList) { int index; const char *pattern; const char *useField; int useAbsPath; useAbsPath=(strcasecmp(GWEN_XMLNode_GetProperty(xmlNode, "mode", "relpath"), "abspath")==0)?1:0; pattern=GWEN_XMLNode_GetProperty(xmlNode, "match", NULL); index=GWEN_XMLNode_GetIntProperty(xmlNode, "index", -1); useField=GWEN_XMLNode_GetProperty(xmlNode, "useFields", NULL); if (index>=0) { GWB_FILE *file; file=GWB_File_List2_GetAt(filesList, index); if (file) { if (useField && strcasecmp(useField, "installPath")==0) { const char *s; s=GWB_File_GetInstallPath(file); if (s) GWEN_Buffer_AppendString(argsBuffer, s); } else { if (useAbsPath) GWB_Builder_AddAbsFileNameToBuffer(context, file, argsBuffer); else GWB_Builder_AddFileNameToBuffer(context, file, argsBuffer); } } } else _addMatchingFiles(builder, filesList, pattern, useAbsPath, argsBuffer); } } void _readArgsLibraries(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_TARGET *target; context=GWB_Builder_GetContext(builder); target=GWB_Context_GetCurrentTarget(context); _addStringListToBuffer(GWB_Target_GetUsedLibraryNameList(target), argsBuffer); } void _readArgsUsedSubTargets(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_TARGET *target; context=GWB_Builder_GetContext(builder); target=GWB_Context_GetCurrentTarget(context); _addStringListToBuffer(GWB_Target_GetUsedTargetLinkSpecList(target), argsBuffer); } void _readArgsIfHasUsedSubTargets(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_TARGET *target; GWEN_STRINGLIST *sl; context=GWB_Builder_GetContext(builder); target=GWB_Context_GetCurrentTarget(context); sl=GWB_Target_GetUsedTargetLinkSpecList(target); if (sl && GWEN_StringList_Count(sl)>0) _readArgsLoop(builder, bcmd, xmlNode, argsBuffer); } void _readArgsIfHasLibraries(GWB_BUILDER *builder, GWB_BUILD_CMD *bcmd, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_TARGET *target; GWEN_STRINGLIST *sl; context=GWB_Builder_GetContext(builder); target=GWB_Context_GetCurrentTarget(context); sl=GWB_Target_GetUsedLibraryNameList(target); if (sl && GWEN_StringList_Count(sl)>0) _readArgsLoop(builder, bcmd, xmlNode, argsBuffer); } void _readArgsIncludes(GWB_BUILDER *builder, GWEN_XMLNODE *xmlNode, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_KEYVALUEPAIR_LIST *kvpList; const char *fileType; fileType=GWEN_XMLNode_GetProperty(xmlNode, "type", "c"); context=GWB_Builder_GetContext(builder); kvpList=GWB_Context_GetIncludeList(context); if (kvpList) { GWEN_Buffer_AppendString(argsBuffer, " "); GWB_KeyValuePair_List_SampleValuesByKey(kvpList, fileType, NULL, " ", argsBuffer); } } void _readArgsDefines(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_KEYVALUEPAIR_LIST *kvpList; context=GWB_Builder_GetContext(builder); kvpList=GWB_Context_GetDefineList(context); if (kvpList) GWB_KeyValuePair_List_WriteAllPairsToBuffer(kvpList, "-D", "=", " ", argsBuffer); } void _readArgsHaveConfigH(GWB_BUILDER *builder, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; GWB_TARGET *target; GWB_PROJECT *project; context=GWB_Builder_GetContext(builder); target=GWB_Context_GetCurrentTarget(context); project=GWB_Target_GetProject(target); if (GWB_Project_GetFlags(project) & GWB_PROJECT_FLAGS_CONFIG_H) { GWEN_Buffer_AppendString(argsBuffer, " -DHAVE_CONFIG_H "); } } void _addMatchingFiles(GWB_BUILDER *builder, GWB_FILE_LIST2 *filesList, const char *pattern, int addAbs, GWEN_BUFFER *argsBuffer) { GWB_CONTEXT *context; context=GWB_Builder_GetContext(builder); if (filesList) { GWB_FILE_LIST2_ITERATOR *it; it=GWB_File_List2_First(filesList); if (it) { GWB_FILE *file; file=GWB_File_List2Iterator_Data(it); while(file) { const char *fname; fname=GWB_File_GetName(file); if (fname) { if (pattern==NULL || -1!=GWEN_Text_ComparePattern(fname, pattern, 0)) { if (GWEN_Buffer_GetUsedBytes(argsBuffer)) GWEN_Buffer_AppendString(argsBuffer, " "); if (addAbs) GWB_Builder_AddAbsFileNameToBuffer(context, file, argsBuffer); else GWB_Builder_AddFileNameToBuffer(context, file, argsBuffer); } } file=GWB_File_List2Iterator_Next(it); } GWB_File_List2Iterator_free(it); } } } void _addStringListToBuffer(GWEN_STRINGLIST *sl, GWEN_BUFFER *argsBuffer) { if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { if (GWEN_Buffer_GetUsedBytes(argsBuffer)) GWEN_Buffer_AppendString(argsBuffer, " "); GWEN_Buffer_AppendString(argsBuffer, s); } se=GWEN_StringListEntry_Next(se); } } } gwenhywfar-5.12.1/tools/gwenbuild/builders/Makefile.am0000664000175000017500000000062414144206312017670 00000000000000SUBDIRS=posix windows INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) DEFS=-DBUILDERDATADIR=\"$(datadir)/gwenhywfar/gwenbuild/builders\" noinst_LTLIBRARIES=libgwb_builders.la libgwb_builders_la_SOURCES=\ genericbuilder.c \ gbuilderdescr.c noinst_HEADERS=\ genericbuilder.h \ genericbuilder_p.h \ gbuilderdescr.h \ gbuilderdescr_p.h gwenhywfar-5.12.1/tools/gwenbuild/builders/README0000664000175000017500000000017614116666046016533 00000000000000 target_so_version_effective target_so_version_age target_so_version_revision target_name cflags ldflags cc ar ranlib ld gwenhywfar-5.12.1/tools/gwenbuild/builders/genericbuilder_p.h0000664000175000017500000000163514116666046021327 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_BUILDERS_GENERIC_P_H #define GWBUILD_BUILDERS_GENERIC_P_H #include "gwenbuild/builders/genericbuilder.h" #include #include typedef struct GWB_BUILDER_GENERIC GWB_BUILDER_GENERIC; struct GWB_BUILDER_GENERIC { char *builderName; char *toolName; GWEN_DB_NODE *dbVars; GWEN_XMLNODE *xmlDescr; int maxInputFiles; GWEN_STRINGLIST *acceptedInputTypes; GWEN_STRINGLIST *acceptedInputExt; char *outFileType; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/builders/gbuilderdescr.h0000664000175000017500000000256614116666046020647 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_GBUILDER_DESCR_H #define GWBUILD_GBUILDER_DESCR_H #include #include #include #include typedef struct GWB_GBUILDER_DESCR GWB_GBUILDER_DESCR; GWEN_LIST_FUNCTION_DEFS(GWB_GBUILDER_DESCR, GWB_GBuilderDescr) GWB_GBUILDER_DESCR *GWB_GBuilderDescr_new(GWEN_XMLNODE *xmlNode); void GWB_GBuilderDescr_free(GWB_GBUILDER_DESCR *descr); const char *GWB_GBuilderDescr_GetBuilderName(const GWB_GBUILDER_DESCR *descr); GWEN_XMLNODE *GWB_GBuilderDescr_GetXmlDescr(const GWB_GBUILDER_DESCR *descr); GWEN_STRINGLIST *GWB_GBuilderDescr_GetAcceptedInputTypes(const GWB_GBUILDER_DESCR *descr); GWEN_STRINGLIST *GWB_GBuilderDescr_GetAcceptedInputExt(const GWB_GBUILDER_DESCR *descr); GWB_GBUILDER_DESCR_LIST *GWB_GBuilderDescr_ReadAll(const char *folder); GWB_GBUILDER_DESCR *GWB_GBuilderDescr_List_GetByName(const GWB_GBUILDER_DESCR_LIST *descrList, const char *name); #endif gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/0000755000175000017500000000000015032533715017061 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/app.gwb0000664000175000017500000000153614116666046020277 00000000000000 object *.o $(target_name)$(exeext) -fPIC $(local/ldflags) -o Linking '$(target_name)$(exeext)' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/module.gwb0000664000175000017500000000236614116666046021006 00000000000000 object *.o $(target_name).so -L$(folder) -l$(target_name) -shared -fPIC -Wl,-no-undefined $(ldflags) $(local/ldflags) -o -Wl,--whole-archive -Wl,--no-whole-archive Linking '$(target_name).so' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/tm2builder.gwb0000664000175000017500000000265114116666046021567 00000000000000 tm2 *.t2d *.xml $(firstInputFileNoExt).c $(firstInputFileNoExt).h $(firstInputFileNoExt)_p.h $(tm2flags) Generating sources from '$(firstInputFile)' $(tm2flags) --defs-only Generating type definitions from '$(firstInputFile)' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/cbuilder.gwb0000664000175000017500000000331114116666046021301 00000000000000 c *.c $(firstInputFileNoExt).o $(firstInputFileNoExt).d -c -fPIC -DPIC $(cflags) $(local/cflags) -MM -o Creating depfile for '$(firstInputFile)' -c -fPIC -DPIC $(cflags) $(local/cflags) -o Compiling '$(firstInputFile)' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/tmplib.gwb0000664000175000017500000000173414127633412020777 00000000000000 object *.o lib$(target_name).a -l$(target_name) Trc Linking 'lib$(target_name).a' Indexing 'lib$(target_name).a' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/staticlib.gwb0000664000175000017500000000234314116666046021472 00000000000000 object *.o lib$(target_name).a -l$(target_name) Trc Linking 'lib$(target_name).a' $(GWBUILD_TOOL_AR) Finally linking 'lib$(target_name).a' Indexing 'lib$(target_name).a' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/sharedlib.gwb0000664000175000017500000000572714633110451021446 00000000000000 object *.o lib$(target_name).so.$(target_so_effective).$(target_so_age).$(target_so_revision) lib$(target_name).so.$(target_so_effective) lib$(target_name).so -L$(folder) -l$(target_name) -shared -fPIC -Wl,-no-undefined -Wl,-soname,lib$(target_name).so.$(target_so_effective) $(ldflags) $(local/ldflags) -o -Wl,--whole-archive -Wl,--no-whole-archive Linking 'lib$(target_name).so.$(target_so_effective).$(target_so_age).$(target_so_revision)' -s lib$(target_name).so.$(target_so_effective).$(target_so_age).$(target_so_revision) lib$(target_name).so.$(target_so_effective) Creating symbolic link 'lib$(target_name).so.$(target_so_effective)' -s lib$(target_name).so.$(target_so_effective).$(target_so_age).$(target_so_revision) lib$(target_name).so Creating symbolic link 'lib$(target_name).so' -d lib$(target_name).so.$(target_so_effective).$(target_so_age).$(target_so_revision) lib$(target_name).so.$(target_so_effective) / gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/cxxbuilder.gwb0000664000175000017500000000334014116666046021663 00000000000000 cxx *.cpp $(firstInputFileNoExt).o $(firstInputFileNoExt).d -c -fPIC -DPIC $(cxxflags) $(local/cxxflags) -MM -o Creating depfile for '$(firstInputFile)' -c -fPIC -DPIC $(cflags) $(local/cflags) -o CXX-Compiling '$(firstInputFile)' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/Makefile.am0000664000175000017500000000041514460564441021043 00000000000000 builderdatadir=$(datadir)/gwenhywfar/gwenbuild/builders/posix dist_builderdata_DATA=\ app.gwb \ avrhexfile.gwb \ cxxapp.gwb \ cbuilder.gwb \ cxxbuilder.gwb \ module.gwb \ msgfmt.gwb \ sharedlib.gwb \ staticlib.gwb \ tmplib.gwb \ tm2builder.gwb gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/msgfmt.gwb0000664000175000017500000000142614144206312020775 00000000000000 po *.po $(firstInputFileNoExt).mo -c -o Generating language catalog '$(firstInputFileNoExt).mo' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/avrhexfile.gwb0000664000175000017500000000176014460564441021651 00000000000000 avrasm *.asm $(target_name).hex $(target_name).list $(target_name).map -o -l -m Assembling '$(target_name).hex' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/cxxapp.gwb0000664000175000017500000000155514116666046021023 00000000000000 object *.o $(target_name)$(exeext) -fPIC $(ldflags) $(local/ldflags) -o Linking '$(target_name)$(exeext)' gwenhywfar-5.12.1/tools/gwenbuild/builders/posix/Makefile.in0000644000175000017500000005127615032533615021060 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/builders/posix ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_builderdata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(builderdatadir)" DATA = $(dist_builderdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ builderdatadir = $(datadir)/gwenhywfar/gwenbuild/builders/posix dist_builderdata_DATA = \ app.gwb \ avrhexfile.gwb \ cxxapp.gwb \ cbuilder.gwb \ cxxbuilder.gwb \ module.gwb \ msgfmt.gwb \ sharedlib.gwb \ staticlib.gwb \ tmplib.gwb \ tm2builder.gwb all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/builders/posix/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/builders/posix/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_builderdataDATA: $(dist_builderdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_builderdata_DATA)'; test -n "$(builderdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(builderdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(builderdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(builderdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(builderdatadir)" || exit $$?; \ done uninstall-dist_builderdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_builderdata_DATA)'; test -n "$(builderdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(builderdatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(builderdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_builderdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_builderdataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_builderdataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_builderdataDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/builders/Makefile.in0000644000175000017500000007113315032533615017710 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/builders ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgwb_builders_la_LIBADD = am_libgwb_builders_la_OBJECTS = genericbuilder.lo gbuilderdescr.lo libgwb_builders_la_OBJECTS = $(am_libgwb_builders_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/gbuilderdescr.Plo \ ./$(DEPDIR)/genericbuilder.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwb_builders_la_SOURCES) DIST_SOURCES = $(libgwb_builders_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DBUILDERDATADIR=\"$(datadir)/gwenhywfar/gwenbuild/builders\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ SUBDIRS = posix windows INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES = libgwb_builders.la libgwb_builders_la_SOURCES = \ genericbuilder.c \ gbuilderdescr.c noinst_HEADERS = \ genericbuilder.h \ genericbuilder_p.h \ gbuilderdescr.h \ gbuilderdescr_p.h all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/builders/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/builders/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwb_builders.la: $(libgwb_builders_la_OBJECTS) $(libgwb_builders_la_DEPENDENCIES) $(EXTRA_libgwb_builders_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgwb_builders_la_OBJECTS) $(libgwb_builders_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbuilderdescr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genericbuilder.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/gbuilderdescr.Plo -rm -f ./$(DEPDIR)/genericbuilder.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/gbuilderdescr.Plo -rm -f ./$(DEPDIR)/genericbuilder.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/0000755000175000017500000000000015032533715017411 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/tm2builder.gwb0000664000175000017500000000265114116666046022117 00000000000000 tm2 *.t2d *.xml $(firstInputFileNoExt).c $(firstInputFileNoExt).h $(firstInputFileNoExt)_p.h $(tm2flags) Generating sources from '$(firstInputFile)' $(tm2flags) --defs-only Generating type definitions from '$(firstInputFile)' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/Makefile.am0000664000175000017500000000035414116666046021377 00000000000000 builderdatadir=$(datadir)/gwenhywfar/gwenbuild/builders/windows dist_builderdata_DATA=\ app.gwb \ cxxapp.gwb \ cbuilder.gwb \ cxxbuilder.gwb \ module.gwb \ sharedlib.gwb \ staticlib.gwb \ tmplib.gwb \ tm2builder.gwb gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/staticlib.gwb0000664000175000017500000000174114116666046022023 00000000000000 object *.o lib$(target_name).a -l$(target_name) Trc Linking 'lib$(target_name).a' Indexing 'lib$(target_name).a' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/cbuilder.gwb0000664000175000017500000000331114116666046021631 00000000000000 c *.c $(firstInputFileNoExt).o $(firstInputFileNoExt).d -c -fPIC -DPIC $(cflags) $(local/cflags) -MM -o Creating depfile for '$(firstInputFile)' -c -fPIC -DPIC $(cflags) $(local/cflags) -o Compiling '$(firstInputFile)' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/sharedlib.gwb0000664000175000017500000000252314116666046022001 00000000000000 object *.o lib$(target_name)-$(target_so_effective).dll -L$(folder) -l$(target_name)-$(target_so_effective) -shared -fPIC -Wl,-no-undefined -Wl,-soname,lib$(target_name)-$(target_so_effective).dll $(local/ldflags) -o -Wl,--whole-archive -Wl,--no-whole-archive Linking 'lib$(target_name)-$(target_so_effective).dll' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/cxxapp.gwb0000664000175000017500000000154214116666046021347 00000000000000 object *.o $(target_name)$(exeext) -fPIC $(local/ldflags) -o Linking '$(target_name)$(exeext)' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/Makefile.in0000644000175000017500000005124415032533615021403 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/builders/windows ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_builderdata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(builderdatadir)" DATA = $(dist_builderdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ builderdatadir = $(datadir)/gwenhywfar/gwenbuild/builders/windows dist_builderdata_DATA = \ app.gwb \ cxxapp.gwb \ cbuilder.gwb \ cxxbuilder.gwb \ module.gwb \ sharedlib.gwb \ staticlib.gwb \ tmplib.gwb \ tm2builder.gwb all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/builders/windows/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/builders/windows/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_builderdataDATA: $(dist_builderdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_builderdata_DATA)'; test -n "$(builderdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(builderdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(builderdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(builderdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(builderdatadir)" || exit $$?; \ done uninstall-dist_builderdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_builderdata_DATA)'; test -n "$(builderdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(builderdatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(builderdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_builderdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_builderdataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_builderdataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_builderdataDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/app.gwb0000664000175000017500000000152414116666046020624 00000000000000 object *.o $(target_name).exe -fPIC $(local/ldflags) -o Linking '$(target_name).exe' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/module.gwb0000664000175000017500000000235314116666046021332 00000000000000 object *.o $(target_name).so -L$(folder) -l$(target_name) -shared -fPIC -Wl,-no-undefined $(local/ldflags) -o -Wl,--whole-archive -Wl,--no-whole-archive Linking '$(target_name).so' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/tmplib.gwb0000664000175000017500000000173414116666046021336 00000000000000 object *.o lib$(target_name).a -l$(target_name) Trc Linking 'lib$(target_name).a' Indexing 'lib$(target_name).a' gwenhywfar-5.12.1/tools/gwenbuild/builders/windows/cxxbuilder.gwb0000664000175000017500000000334014116666046022213 00000000000000 cxx *.cpp $(firstInputFileNoExt).o $(firstInputFileNoExt).d -c -fPIC -DPIC $(cxxflags) $(local/cxxflags) -MM -o Creating depfile for '$(firstInputFile)' -c -fPIC -DPIC $(cflags) $(local/cflags) -o CXX-Compiling '$(firstInputFile)' gwenhywfar-5.12.1/tools/gwenbuild/builders/gbuilderdescr_p.h0000664000175000017500000000155214116666046021160 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_GBUILDER_DESCR_P_H #define GWBUILD_GBUILDER_DESCR_P_H #include "gwenbuild/builders/gbuilderdescr.h" #include #include typedef struct GWB_GBUILDER_DESCR GWB_GBUILDER_DESCR; struct GWB_GBUILDER_DESCR { GWEN_LIST_ELEMENT(GWB_GBUILDER_DESCR) char *builderName; GWEN_XMLNODE *xmlDescr; GWEN_STRINGLIST *acceptedInputTypes; GWEN_STRINGLIST *acceptedInputExt; }; #endif gwenhywfar-5.12.1/tools/gwenbuild/Makefile.am0000664000175000017500000000124214144206312016054 00000000000000SUBDIRS=types parser tools buildctx builders templates INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) bin_PROGRAMS=gwbuild gwbuild_SOURCES=\ main.c \ utils.c \ c_setup.c \ c_prepare.c \ c_build.c \ c_install.c \ c_clean.c \ c_dist.c noinst_HEADERS=\ utils.h \ c_setup.h \ c_prepare.h \ c_build.h \ c_install.h \ c_clean.h \ c_dist.h \ filenames.h gwbuild_LDADD = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ types/libgwb_types.la \ parser/libgwb_parser.la \ tools/libgwb_tools.la \ builders/libgwb_builders.la \ buildctx/libgwb_build.la \ $(PROG_LIBRARIES) gwenhywfar-5.12.1/tools/gwenbuild/c_dist.h0000664000175000017500000000103714116666046015455 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_DIST_H #define GWBUILD_C_DIST_H #include int GWB_MkDist(void); #endif gwenhywfar-5.12.1/tools/gwenbuild/c_clean.h0000664000175000017500000000105514116666046015574 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_CLEAN_H #define GWBUILD_C_CLEAN_H #include int GWB_Clean(const char *fname); #endif gwenhywfar-5.12.1/tools/gwenbuild/templates/0000755000175000017500000000000015032533715016104 500000000000000gwenhywfar-5.12.1/tools/gwenbuild/templates/Makefile.in0000644000175000017500000005106115032533615020073 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/gwenbuild/templates ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_templatedata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(templatedatadir)" DATA = $(dist_templatedata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ templatedatadir = $(datadir)/gwenbuild/templates dist_templatedata_DATA = \ project.tmpl \ convlib.tmpl \ module.tmpl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gwenbuild/templates/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gwenbuild/templates/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_templatedataDATA: $(dist_templatedata_DATA) @$(NORMAL_INSTALL) @list='$(dist_templatedata_DATA)'; test -n "$(templatedatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(templatedatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(templatedatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(templatedatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(templatedatadir)" || exit $$?; \ done uninstall-dist_templatedataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_templatedata_DATA)'; test -n "$(templatedatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(templatedatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(templatedatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_templatedataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_templatedataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_templatedataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_templatedataDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gwenbuild/templates/module.tmpl0000664000175000017500000000254714144206313020213 00000000000000 $(gwenhywfar_cflags) -I$(topsrcdir)/src -I$(topbuilddir)/src -I$(topsrcdir) -I$(topbuilddir) -I$(builddir) --include=$(gwenhywfar_dir)/share/gwenhywfar/typemaker2/c --include=$(builddir) $(visibility_cflags) --api=CHIPCARD_API $(local/built_headers_pub) $(local/built_headers_priv) ddvcard_p.h $(local/typefiles) ddvcard.c ddvcard.xml chipcard $(gwenhywfar_libs) gwenhywfar-5.12.1/tools/gwenbuild/templates/Makefile.am0000664000175000017500000000017314144206313020055 00000000000000 templatedatadir=$(datadir)/gwenbuild/templates dist_templatedata_DATA=\ project.tmpl \ convlib.tmpl \ module.tmpl gwenhywfar-5.12.1/tools/gwenbuild/templates/project.tmpl0000664000175000017500000000762714116666046020414 00000000000000 $(project_name) $(project_vmajor).$(project_vminor).$(project_vpatchlevel) $(project_vmajor).$(project_vminor).$(project_vpatchlevel).$(project_vbuild)$(project_vtag) $(option_prefix) $(option_prefix)/etc $(option_prefix)/bin $(option_prefix)/lib $(option_prefix)/include $(option_prefix)/share $(option_prefix)/share/locale $(libdir)/$(package) $(includedir)/$(package) $(datadir)/$(package) -fvisibility=hidden -fvisibility=hidden locale.h libintl.h iconv.h setlocale memmove memset strcasecmp strdup strerror snprintf src gwenhywfar-5.12.1/tools/gwenbuild/templates/convlib.tmpl0000664000175000017500000000247114116666046020372 00000000000000 $(gmp_cflags) $(gwenhywfar_cflags) -I$(builddir) -I$(srcdir) -I$(builddir)/.. -I$(srcdir)/.. -I$(topsrcdir)/src/libs -I$(topbuilddir)/src/libs -I$(topbuilddir) -I$(topsrcdir) --include=$(topsrcdir)/src/libs/aqbanking/typemaker2/c --include=$(topbuilddir)/src/libs/aqbanking/typemaker2/c --include=$(builddir) --include=$(srcdir) $(visibility_cflags) --api=AQBANKING_API $(local/built_headers_pub) $(local/typefiles) gwenhywfar-5.12.1/tools/gwenbuild/c_install.c0000664000175000017500000000363614144206312016145 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "c_install.h" #include "utils.h" #include "gwenbuild/filenames.h" #include #include int GWB_InstallFiles(const char *fileName, const char *destDir) { GWB_KEYVALUEPAIR_LIST *kvpList; GWB_KEYVALUEPAIR *kvp; GWEN_BUFFER *destPathBuf; kvpList=GWB_Utils_ReadInstallFileList(fileName); if (kvpList==NULL) { DBG_ERROR(NULL, "Error reading install file list (file \"%s\")", fileName); return GWEN_ERROR_GENERIC; } destPathBuf=GWEN_Buffer_new(0, 256, 0, 1); kvp=GWB_KeyValuePair_List_First(kvpList); while(kvp) { const char *sDestPath; const char *sSrcPath; int rv; sDestPath=GWB_KeyValuePair_GetKey(kvp); sSrcPath=GWB_KeyValuePair_GetValue(kvp); if (destDir) { GWEN_Buffer_AppendString(destPathBuf, destDir); GWEN_Buffer_AppendString(destPathBuf, GWEN_DIR_SEPARATOR_S); GWEN_Buffer_AppendString(destPathBuf, sDestPath); sDestPath=GWEN_Buffer_GetStart(destPathBuf); } fprintf(stdout, "Installing file '%s'\n", sSrcPath); rv=GWB_Utils_CopyFile(sSrcPath, sDestPath); if (rv<0) { fprintf(stderr, "ERROR: Error installing file \"%s\"\n", sSrcPath); GWEN_Buffer_free(destPathBuf); GWB_KeyValuePair_List_free(kvpList); return 2; } GWEN_Buffer_Reset(destPathBuf); kvp=GWB_KeyValuePair_List_Next(kvp); } GWEN_Buffer_free(destPathBuf); GWB_KeyValuePair_List_free(kvpList); return 0; } gwenhywfar-5.12.1/tools/gwenbuild/c_setup.h0000664000175000017500000000114014116666046015645 00000000000000/*************************************************************************** begin : Mon Feb 08 2021 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWBUILD_C_SETUP_H #define GWBUILD_C_SETUP_H #include int GWB_Setup(GWEN_DB_NODE *dbArgs); int GWB_RepeatLastSetup(const char *fileName); #endif gwenhywfar-5.12.1/tools/gsa/0000755000175000017500000000000015032533715012700 500000000000000gwenhywfar-5.12.1/tools/gsa/sign.c0000644000175000017500000001205713142134476013732 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int signArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; const char *keyFile; const char *signer; GWEN_DB_NODE *dbKey; GWEN_CRYPT_KEY *key; GWEN_SAR *sr; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "keyfile", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "keyfile", /* long option */ "Specify the keyfile to use", /* short description */ "Specify the keyfile to use" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "signer", /* name */ 0, /* minnum */ 1, /* maxnum */ "s", /* short option */ "signer", /* long option */ "Specify the signer", /* short description */ "Specify the signer" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); keyFile=GWEN_DB_GetCharValue(db, "keyFile", 0, NULL); assert(keyFile); signer=GWEN_DB_GetCharValue(db, "signer", 0, "Signer"); dbKey=GWEN_DB_Group_new("keyfile"); rv=GWEN_DB_ReadFile(dbKey, keyFile, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { fprintf(stderr, "ERROR: Error reading keyfile [%s] (%d)\n", keyFile, rv); return 2; } key=GWEN_Crypt_KeyRsa_fromDb(dbKey); if (key==NULL) { fprintf(stderr, "ERROR: Error decoding keyfile [%s] (%d)\n", keyFile, rv); return 2; } GWEN_Crypt_KeyRsa_AddFlags(key, GWEN_CRYPT_KEYRSA_FLAGS_DIRECTSIGN); sr=GWEN_Sar_new(); rv=GWEN_Sar_OpenArchive(sr, aname, GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ|GWEN_SYNCIO_FILE_FLAGS_WRITE); if (rv<0) { fprintf(stderr, "ERROR: Error opening archive (%d)\n", rv); return 2; } else { GWEN_CRYPTMGR *cm; cm=GWEN_CryptMgrKeys_new(signer, key, NULL, NULL, 1); /* sign */ rv=GWEN_Sar_Sign(sr, cm); if (rv<0) { fprintf(stderr, "ERROR: Error signing archive (%d)\n", rv); GWEN_CryptMgr_free(cm); GWEN_Sar_CloseArchive(sr, 1); GWEN_Sar_free(sr); return 2; } GWEN_CryptMgr_free(cm); /* close archive */ rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); GWEN_Sar_CloseArchive(sr, 1); GWEN_Sar_free(sr); return 2; } return 0; } } gwenhywfar-5.12.1/tools/gsa/add.c0000644000175000017500000001706614633114437013530 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include #include #include #include #include static int addToList(const char *fname, int recursive, GWEN_STRINGLIST *sl) { struct stat st; int rv; /* stat file to be added */ //#if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED #if ((_BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L) && !defined(__MINGW32__)) || defined(OS_DARWIN) rv=lstat(fname, &st); #else rv=stat(fname, &st); #endif if (rv) { DBG_ERROR(GSA_LOGDOMAIN, "stat(%s): %d (%s)", fname, errno, strerror(errno)); fprintf(stderr, "Ignoring file \"%s\"\n", fname); } else { /* always append this entry */ GWEN_StringList_AppendString(sl, fname, 0, 1); if (recursive && S_ISDIR(st.st_mode)) { GWEN_STRINGLIST *sll; GWEN_STRINGLISTENTRY *se; GWEN_DIRECTORY *d; int rv; char buffer[256]; GWEN_BUFFER *tbuf; uint32_t pos; /* add entries */ sll=GWEN_StringList_new(); d=GWEN_Directory_new(); rv=GWEN_Directory_Open(d, fname); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Directory_free(d); GWEN_StringList_free(sll); return rv; } while (0==GWEN_Directory_Read(d, buffer, sizeof(buffer))) { if (strcmp(buffer, ".")!=0 && strcmp(buffer, "..")!=0) GWEN_StringList_AppendString(sll, buffer, 0, 1); } GWEN_Directory_Close(d); GWEN_Directory_free(d); /* recurse */ tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, fname); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); pos=GWEN_Buffer_GetPos(tbuf); se=GWEN_StringList_FirstEntry(sll); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { GWEN_Buffer_AppendString(tbuf, s); rv=addToList(GWEN_Buffer_GetStart(tbuf), recursive, sl); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); GWEN_StringList_free(sll); return rv; } } GWEN_Buffer_Crop(tbuf, 0, pos); se=GWEN_StringListEntry_Next(se); } /* while se */ GWEN_Buffer_free(tbuf); GWEN_StringList_free(sll); } /* if dir and recursive */ } /* if stat was ok */ return 0; } int add2Archive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; GWEN_SAR *sr; int rv; int recursive; int verbosity; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "recursive", /* name */ 0, /* minnum */ 1, /* maxnum */ "r", /* short option */ "recursive", /* long option */ "add folders recursively", /* short description */ "add folders recursively" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "verbosity", /* name */ 0, /* minnum */ 10, /* maxnum */ "v", /* short option */ NULL, /* long option */ "set verbosity", /* short description */ "set verbosity" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); recursive=GWEN_DB_GetIntValue(db, "recursive", 0, 0); verbosity=GWEN_DB_GetIntValue(db, "verbosity", 0, 0); sr=GWEN_Sar_new(); rv=GWEN_Sar_OpenArchive(sr, aname, GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ|GWEN_SYNCIO_FILE_FLAGS_WRITE); if (rv<0) { fprintf(stderr, "ERROR: Error opening archive (%d)\n", rv); return 2; } else { int i; GWEN_STRINGLIST *sl; GWEN_STRINGLISTENTRY *se; sl=GWEN_StringList_new(); for (i=0; ; i++) { const char *fname; fname=GWEN_DB_GetCharValue(db, "params", i, 0); if (fname && *fname) { rv=addToList(fname, recursive, sl); if (rv<0) { fprintf(stderr, "ERROR: Error adding entry \"%s\" to archive \"%s\" (%d)\n", fname, aname, rv); GWEN_StringList_free(sl); return 2; } } else break; } se=GWEN_StringList_FirstEntry(sl); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { rv=GWEN_Sar_AddFile(sr, s); if (rv<0) { fprintf(stderr, "ERROR: Error adding file \"%s\" to archive \"%s\" (%d)\n", s, aname, rv); GWEN_Sar_CloseArchive(sr, 1); GWEN_Sar_free(sr); return 2; } if (verbosity>0) { fprintf(stdout, "added \"%s\"\n", s); } } se=GWEN_StringListEntry_Next(se); } /* while se */ GWEN_StringList_free(sl); rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); return 2; } return 0; } } gwenhywfar-5.12.1/tools/gsa/Makefile.in0000644000175000017500000006751015032533615014675 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gsa$(EXEEXT) @IS_WINDOWS_TRUE@am__append_1 = $(PROG_LIBRARIES) subdir = tools/gsa ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gsa_OBJECTS = add.$(OBJEXT) create.$(OBJEXT) check.$(OBJEXT) \ extract.$(OBJEXT) list.$(OBJEXT) mkkey.$(OBJEXT) rfi.$(OBJEXT) \ sign.$(OBJEXT) verify.$(OBJEXT) main.$(OBJEXT) gsa_OBJECTS = $(am_gsa_OBJECTS) am__DEPENDENCIES_1 = @IS_WINDOWS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) gsa_DEPENDENCIES = $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = gsa_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(gsa_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/add.Po ./$(DEPDIR)/check.Po \ ./$(DEPDIR)/create.Po ./$(DEPDIR)/extract.Po \ ./$(DEPDIR)/list.Po ./$(DEPDIR)/main.Po ./$(DEPDIR)/mkkey.Po \ ./$(DEPDIR)/rfi.Po ./$(DEPDIR)/sign.Po ./$(DEPDIR)/verify.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gsa_SOURCES) DIST_SOURCES = $(gsa_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(gwenhywfar_symlinkdir) -I$(top_srcdir)/src/base noinst_HEADERS = \ globals.h gsa_SOURCES = \ add.c \ create.c \ check.c \ extract.c \ list.c \ mkkey.c \ rfi.c \ sign.c \ verify.c \ main.c gsa_LDADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__append_1) @IS_WINDOWS_TRUE@gsa_LDFLAGS = -mconsole all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gsa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gsa/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list gsa$(EXEEXT): $(gsa_OBJECTS) $(gsa_DEPENDENCIES) $(EXTRA_gsa_DEPENDENCIES) @rm -f gsa$(EXEEXT) $(AM_V_CCLD)$(gsa_LINK) $(gsa_OBJECTS) $(gsa_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkkey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfi.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sign.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/add.Po -rm -f ./$(DEPDIR)/check.Po -rm -f ./$(DEPDIR)/create.Po -rm -f ./$(DEPDIR)/extract.Po -rm -f ./$(DEPDIR)/list.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/mkkey.Po -rm -f ./$(DEPDIR)/rfi.Po -rm -f ./$(DEPDIR)/sign.Po -rm -f ./$(DEPDIR)/verify.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/add.Po -rm -f ./$(DEPDIR)/check.Po -rm -f ./$(DEPDIR)/create.Po -rm -f ./$(DEPDIR)/extract.Po -rm -f ./$(DEPDIR)/list.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/mkkey.Po -rm -f ./$(DEPDIR)/rfi.Po -rm -f ./$(DEPDIR)/sign.Po -rm -f ./$(DEPDIR)/verify.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile sources: for f in $(gsa_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gsa/list.c0000644000175000017500000000634613142134476013751 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include int listArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; GWEN_SAR *sr; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); sr=GWEN_Sar_new(); rv=GWEN_Sar_OpenArchive(sr, aname, GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ); if (rv<0) { fprintf(stderr, "ERROR: Error opening archive (%d)\n", rv); return 2; } else { const GWEN_SAR_FILEHEADER_LIST *fhl; fhl=GWEN_Sar_GetHeaders(sr); if (fhl) { const GWEN_SAR_FILEHEADER *fh; fh=GWEN_SarFileHeader_List_First(fhl); while (fh) { const char *s; s=GWEN_SarFileHeader_GetPath(fh); fprintf(stdout, "%s\n", s?s:"(noname)"); fh=GWEN_SarFileHeader_List_Next(fh); } } rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); return 2; } return 0; } } gwenhywfar-5.12.1/tools/gsa/create.c0000644000175000017500000000534413142134476014236 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include int createArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; GWEN_SAR *sr; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); sr=GWEN_Sar_new(); rv=GWEN_Sar_CreateArchive(sr, aname); if (rv<0) { fprintf(stderr, "ERROR: Error creating archive (%d)\n", rv); return 2; } rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); return 2; } return 0; } gwenhywfar-5.12.1/tools/gsa/extract.c0000644000175000017500000001011413142134476014434 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include int extractArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; GWEN_SAR *sr; int rv; int verbosity; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "verbosity", /* name */ 0, /* minnum */ 10, /* maxnum */ "v", /* short option */ NULL, /* long option */ "set verbosity", /* short description */ "set verbosity" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); verbosity=GWEN_DB_GetIntValue(db, "verbosity", 0, 0); sr=GWEN_Sar_new(); rv=GWEN_Sar_OpenArchive(sr, aname, GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ); if (rv<0) { fprintf(stderr, "ERROR: Error opening archive (%d)\n", rv); return 2; } else { const GWEN_SAR_FILEHEADER_LIST *fhl; fhl=GWEN_Sar_GetHeaders(sr); if (fhl) { const GWEN_SAR_FILEHEADER *fh; fh=GWEN_SarFileHeader_List_First(fhl); while (fh) { const char *s; s=GWEN_SarFileHeader_GetPath(fh); if (s && *s) { rv=GWEN_Sar_ExtractFile(sr, fh); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Sar_CloseArchive(sr, 1); GWEN_Sar_free(sr); return rv; } if (verbosity>0) { fprintf(stdout, "extracted \"%s\"\n", s); } } fh=GWEN_SarFileHeader_List_Next(fh); } } rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); return 2; } return 0; } } gwenhywfar-5.12.1/tools/gsa/main.c0000664000175000017500000001306114460564441013717 00000000000000/*************************************************************************** begin : Tue May 03 2005 copyright : (C) 2005-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #define GSA_IS_EXPERIMENTAL #define DEBUG_GSA_TOOL */ #include #include #include "funcs.h" #include "globals.h" int readFile(const char *fname, GWEN_BUFFER *dbuf) { FILE *f; f=fopen(fname, "rb"); if (f) { while (!feof(f)) { uint32_t l; ssize_t s; char *p; GWEN_Buffer_AllocRoom(dbuf, 1024); l=GWEN_Buffer_GetMaxUnsegmentedWrite(dbuf); p=GWEN_Buffer_GetPosPointer(dbuf); s=fread(p, 1, l, f); if (s==0) break; if (s==(ssize_t)-1) { DBG_INFO(GWEN_LOGDOMAIN, "fread(%s): %s", fname, strerror(errno)); fclose(f); return GWEN_ERROR_IO; } GWEN_Buffer_IncrementPos(dbuf, s); GWEN_Buffer_AdjustUsedBytes(dbuf); } fclose(f); return 0; } else { DBG_INFO(GWEN_LOGDOMAIN, "fopen(%s): %s", fname, strerror(errno)); return GWEN_ERROR_IO; } } int main(int argc, char **argv) { GWEN_DB_NODE *db; const char *cmd; int rv; int err; GWEN_GUI *gui; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; const GWEN_FUNCS funcs[]= { GWEN_FUNCS_ENTRY_DB_NODE_ARGS_HELP("create", createArchive, I18N("This command creates an archive file")), GWEN_FUNCS_ENTRY_DB_NODE_ARGS_HELP("add", add2Archive, I18N("Add files and folders to an archive file")), GWEN_FUNCS_ENTRY_DB_NODE_ARGS_HELP("list", listArchive, I18N("List files and folders in an archive file")), GWEN_FUNCS_ENTRY_DB_NODE_ARGS_HELP("check", checkArchive, I18N("Check integrity of files and folders in an archive file")), GWEN_FUNCS_ENTRY_DB_NODE_ARGS("extract", extractArchive), GWEN_FUNCS_ENTRY_DB_NODE_ARGS("sign", signArchive), GWEN_FUNCS_ENTRY_DB_NODE_ARGS("verify", verifyArchive), GWEN_FUNCS_ENTRY_DB_NODE_ARGS("mkkey", mkArchiveKey), GWEN_FUNCS_ENTRY_DB_NODE_ARGS("rfi", releaseFillIn), GWEN_FUNCS_ENTRY_END(), }; const GWEN_FUNCS *func; err=GWEN_Init(); if (err) { fprintf(stderr, "Could not initialize Gwenhywfar.\n"); return 2; } gui=GWEN_Gui_CGui_new(); GWEN_Gui_SetGui(gui); GWEN_Logger_Open(GSA_LOGDOMAIN, "gsa", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User); GWEN_Logger_SetLevel(GSA_LOGDOMAIN, GWEN_LoggerLevel_Warning); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Warning); #ifdef GSA_IS_EXPERIMENTAL fprintf(stderr, "\n"); fprintf(stderr, "\n"); fprintf(stderr, "=================== WARNING ===================\n"); fprintf(stderr, "This tool is still EXPERIMENTAL !!!\n"); fprintf(stderr, "Please DON'T USE it with your data files !\n"); fprintf(stderr, "===============================================\n"); fprintf(stderr, "\n"); fprintf(stderr, "\n"); #endif db=GWEN_DB_Group_new("arguments"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM | GWEN_ARGS_MODE_STOP_AT_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments main\n"); return -1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); GWEN_Buffer_AppendString(ubuf, I18N("GWEN's Simple Archiver")); GWEN_Buffer_AppendString(ubuf, " (Gwenhywfar v" GWENHYWFAR_VERSION_FULL_STRING ")\n"); GWEN_Buffer_AppendString(ubuf, I18N("Usage: ")); GWEN_Buffer_AppendString(ubuf, argv[0]); GWEN_Buffer_AppendString(ubuf, I18N(" [GLOBAL OPTIONS] COMMAND " "[LOCAL OPTIONS]\n")); GWEN_Buffer_AppendString(ubuf, I18N("\nGlobal Options:\n")); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); fprintf(stderr, "%s\n", I18N("\nCommands:\n\n")); GWEN_Funcs_Usage_With_Help(funcs); return 0; } if (rv) { argc-=rv-1; argv+=rv-1; } cmd=GWEN_DB_GetCharValue(db, "params", 0, 0); if (!cmd) { fprintf(stderr, "ERROR: Command needed.\n"); return 1; } func=GWEN_Funcs_Find(funcs, cmd); if (func!=NULL) { rv=GWEN_Funcs_Call_DB_NODE_Args(func, db, argc, argv); } else { fprintf(stderr, "ERROR: Unknown command \"%s\".\n", cmd); rv=1; } err=GWEN_Fini(); if (err) { fprintf(stderr, "WARNING: Could not deinitialize Gwenhywfar.\n"); } return rv; } gwenhywfar-5.12.1/tools/gsa/Makefile.am0000664000175000017500000000111414460564441014657 00000000000000AM_CPPFLAGS= -I$(top_builddir) -I$(top_srcdir) -I$(gwenhywfar_symlinkdir) -I$(top_srcdir)/src/base #EXTRA_DIST= bin_PROGRAMS=gsa noinst_HEADERS=\ globals.h gsa_SOURCES=\ add.c \ create.c \ check.c \ extract.c \ list.c \ mkkey.c \ rfi.c \ sign.c \ verify.c \ main.c gsa_LDADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) if IS_WINDOWS gsa_LDFLAGS=-mconsole gsa_LDADD+=$(PROG_LIBRARIES) endif sources: for f in $(gsa_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/tools/gsa/verify.c0000644000175000017500000001211013142134476014264 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int verifyArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; const char *keyFile; const char *signer; GWEN_DB_NODE *dbKey; GWEN_CRYPT_KEY *key; GWEN_SAR *sr; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "keyfile", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "keyfile", /* long option */ "Specify the keyfile to use", /* short description */ "Specify the keyfile to use" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "signer", /* name */ 0, /* minnum */ 1, /* maxnum */ "s", /* short option */ "signer", /* long option */ "Specify the signer", /* short description */ "Specify the signer" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); keyFile=GWEN_DB_GetCharValue(db, "keyFile", 0, NULL); assert(keyFile); signer=GWEN_DB_GetCharValue(db, "Signer", 0, "Signer"); dbKey=GWEN_DB_Group_new("keyfile"); rv=GWEN_DB_ReadFile(dbKey, keyFile, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { fprintf(stderr, "ERROR: Error reading keyfile [%s] (%d)\n", keyFile, rv); return 2; } key=GWEN_Crypt_KeyRsa_fromDb(dbKey); if (key==NULL) { fprintf(stderr, "ERROR: Error decoding keyfile [%s] (%d)\n", keyFile, rv); return 2; } GWEN_Crypt_KeyRsa_AddFlags(key, GWEN_CRYPT_KEYRSA_FLAGS_DIRECTSIGN); sr=GWEN_Sar_new(); rv=GWEN_Sar_OpenArchive(sr, aname, GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ); if (rv<0) { fprintf(stderr, "ERROR: Error opening archive (%d)\n", rv); return 2; } else { GWEN_CRYPTMGR *cm; cm=GWEN_CryptMgrKeys_new(NULL, NULL, signer, key, 1); /* verify */ rv=GWEN_Sar_Verify(sr, cm); if (rv<0) { fprintf(stderr, "ERROR: Error verifying archive (%d)\n", rv); GWEN_CryptMgr_free(cm); GWEN_Sar_CloseArchive(sr, 1); GWEN_Sar_free(sr); return 2; } GWEN_CryptMgr_free(cm); /* close archive */ rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); GWEN_Sar_CloseArchive(sr, 1); GWEN_Sar_free(sr); return 2; } fprintf(stdout, "Signature is valid.\n"); return 0; } } gwenhywfar-5.12.1/tools/gsa/rfi.c0000644000175000017500000001455613142134476013560 00000000000000/*************************************************************************** begin : Mon Jun 27 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include int releaseFillIn(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *name; const char *arch; const char *sys; const char *inFile; const char *clFile; const char *outFile; const char *url; int vMajor; int vMinor; int vPatchLevel; int vBuild; int maturityLevel; GWEN_DB_NODE *dbVersion; int rv; GWEN_BUFFER *cbuf; char ubuf[512]; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "infile", /* name */ 1, /* minnum */ 1, /* maxnum */ "i", /* short option */ "infile", /* long option */ "Specify the input version file", /* short description */ "Specify the input version file" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "changeLogFile", /* name */ 1, /* minnum */ 1, /* maxnum */ "c", /* short option */ "changelog", /* long option */ "Specify the changelog file", /* short description */ "Specify the changelog file" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "url", /* name */ 1, /* minnum */ 1, /* maxnum */ "u", /* short option */ "url", /* long option */ "Specify the URL of the update server", /* short description */ "Specify the URL of the update server" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "outfile", /* name */ 1, /* minnum */ 1, /* maxnum */ "o", /* short option */ "outfile", /* long option */ "Specify the output version file", /* short description */ "Specify the output version file" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } inFile=GWEN_DB_GetCharValue(db, "infile", 0, NULL); assert(inFile); clFile=GWEN_DB_GetCharValue(db, "changeLogFile", 0, NULL); assert(clFile); outFile=GWEN_DB_GetCharValue(db, "outfile", 0, NULL); assert(outFile); url=GWEN_DB_GetCharValue(db, "url", 0, NULL); assert(url); /* read changelog file */ cbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=readFile(clFile, cbuf); if (rv<0) { fprintf(stderr, "ERROR: Could not read changelog file [%s] (%d)\n", clFile, rv); return 2; } /* read version file */ dbVersion=GWEN_DB_Group_new("version"); rv=GWEN_DB_ReadFile(dbVersion, inFile, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { fprintf(stderr, "ERROR: Could not read file [%s] (%d)\n", inFile, rv); return 2; } name=GWEN_DB_GetCharValue(dbVersion, "name", 0, NULL); if (!(name && *name)) { fprintf(stderr, "Missing name in version file.\n"); return 2; } arch=GWEN_DB_GetCharValue(dbVersion, "architecture", 0, NULL); if (!(arch && *arch)) { fprintf(stderr, "Missing architecture in version file.\n"); return 2; } sys=GWEN_DB_GetCharValue(dbVersion, "system", 0, NULL); if (!(sys && *sys)) { fprintf(stderr, "Missing system in version file.\n"); return 2; } vMajor=GWEN_DB_GetIntValue(dbVersion, "versionMajor", 0, 0); vMinor=GWEN_DB_GetIntValue(dbVersion, "versionMinor", 0, 0); vPatchLevel=GWEN_DB_GetIntValue(dbVersion, "versionPatchLevel", 0, 0); vBuild=GWEN_DB_GetIntValue(dbVersion, "versionBuild", 0, 0); maturityLevel=GWEN_DB_GetIntValue(dbVersion, "maturityLevel", 0, 0); /* create URL entry */ snprintf(ubuf, sizeof(ubuf)-1, "%s/%s-%s-%s-%d.%d.%d.%d-%d.sar.gz", url, name, sys, arch, vMajor, vMinor, vPatchLevel, vBuild, maturityLevel); ubuf[sizeof(ubuf)-1]=0; GWEN_DB_SetCharValue(dbVersion, GWEN_DB_FLAGS_OVERWRITE_VARS, "url", ubuf); /* create changelog entry */ GWEN_DB_SetCharValue(dbVersion, GWEN_DB_FLAGS_OVERWRITE_VARS, "changeLog", GWEN_Buffer_GetStart(cbuf)); GWEN_Buffer_free(cbuf); /* write version file back */ rv=GWEN_DB_WriteFile(dbVersion, outFile, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { fprintf(stderr, "ERROR: Could not write file [%s] (%d)\n", outFile, rv); return 2; } return 0; } gwenhywfar-5.12.1/tools/gsa/globals.h0000644000175000017500000000273213142134464014416 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GSA_GLOBALS_H #define GSA_GLOBALS_H #include #include #include #include #include #include #include #include #include #include #include #define GSA_LOGDOMAIN "gsa" #include "src/base/i18n_l.h" int readFile(const char *fname, GWEN_BUFFER *dbuf); int createArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int checkArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int listArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int add2Archive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int extractArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int mkArchiveKey(GWEN_DB_NODE *dbArgs, int argc, char **argv); int signArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int verifyArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv); int releaseFillIn(GWEN_DB_NODE *dbArgs, int argc, char **argv); #endif /* GSA_GLOBALS_H */ gwenhywfar-5.12.1/tools/gsa/mkkey.c0000644000175000017500000000632413142134476014112 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int mkArchiveKey(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *keyFile; GWEN_DB_NODE *dbKey; GWEN_CRYPT_KEY *pubKey; GWEN_CRYPT_KEY *privKey; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "keyfile", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "keyfile", /* long option */ "Specify the keyfile to use", /* short description */ "Specify the keyfile to use" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } keyFile=GWEN_DB_GetCharValue(db, "keyFile", 0, NULL); assert(keyFile); /* create key */ rv=GWEN_Crypt_KeyRsa_GeneratePair(512, 1, &pubKey, &privKey); if (rv<0) { fprintf(stderr, "ERROR: Error generating key pair (%d)\n", rv); return rv; } dbKey=GWEN_DB_Group_new("keyfile"); rv=GWEN_Crypt_KeyRsa_toDb(privKey, dbKey, 0); if (rv<0) { fprintf(stderr, "ERROR: Error encoding keyfile [%s] (%d)\n", keyFile, rv); return 2; } rv=GWEN_DB_WriteFile(dbKey, keyFile, GWEN_DB_FLAGS_DEFAULT); if (rv<0) { fprintf(stderr, "ERROR: Error writing keyfile [%s] (%d)\n", keyFile, rv); return 2; } GWEN_DB_Group_free(dbKey); GWEN_Crypt_Key_free(privKey); GWEN_Crypt_Key_free(pubKey); return 0; } gwenhywfar-5.12.1/tools/gsa/check.c0000644000175000017500000000656713142134476014060 00000000000000/*************************************************************************** begin : Sat Jun 25 2011 copyright : (C) 2011 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include int checkArchive(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *aname; GWEN_SAR *sr; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "archive", /* name */ 1, /* minnum */ 1, /* maxnum */ "a", /* short option */ "archive", /* long option */ "Specify the archive file name", /* short description */ "Specify the archive file name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } aname=GWEN_DB_GetCharValue(db, "archive", 0, NULL); assert(aname); sr=GWEN_Sar_new(); rv=GWEN_Sar_OpenArchive(sr, aname, GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ); if (rv<0) { fprintf(stderr, "ERROR: Error opening archive (%d)\n", rv); return 2; } else { const GWEN_SAR_FILEHEADER_LIST *fhl; fhl=GWEN_Sar_GetHeaders(sr); if (fhl) { const GWEN_SAR_FILEHEADER *fh; fh=GWEN_SarFileHeader_List_First(fhl); while (fh) { const char *s; s=GWEN_SarFileHeader_GetPath(fh); rv=GWEN_Sar_CheckFile(sr, fh); if (rv<0) fprintf(stdout, "%s: CRC error (%d)\n", s?s:"(noname)", rv); else fprintf(stdout, "%s: Ok\n", s?s:"(noname)"); fh=GWEN_SarFileHeader_List_Next(fh); } } rv=GWEN_Sar_CloseArchive(sr, 0); if (rv<0) { fprintf(stderr, "ERROR: Error closing archive (%d)\n", rv); return 2; } return 0; } } gwenhywfar-5.12.1/tools/typemaker/0000755000175000017500000000000015032533714014126 500000000000000gwenhywfar-5.12.1/tools/typemaker/args.c0000644000175000017500000001073713606364313015160 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif /* Internationalization */ #ifdef ENABLE_NLS # include # include # define I18N(m) dgettext("gwenhywfar", m) # define I18S(m) m #else # define I18N(m) m # define I18S(m) m #endif #include "args.h" #include #include #include #include ARGUMENTS *Arguments_new() { ARGUMENTS *ar; ar=(ARGUMENTS *)malloc(sizeof(ARGUMENTS)); assert(ar); memset(ar, 0, sizeof(ARGUMENTS)); ar->verbous=0; ar->logLevel=GWEN_LoggerLevel_Notice; ar->logType=GWEN_LoggerType_Console; ar->compact=0; return ar; } FREEPARAM *FreeParam_new(const char *s) { FREEPARAM *fr; fr=(FREEPARAM *)malloc(sizeof(FREEPARAM)); assert(fr); memset(fr, 0, sizeof(FREEPARAM)); fr->param=s; return fr; } void FreeParam_free(FREEPARAM *fr) { if (fr) free(fr); } void Arguments_AddParam(ARGUMENTS *ar, const char *pr) { FREEPARAM *curr; FREEPARAM *nfp; DBG_ENTER; assert(ar); assert(pr); nfp=FreeParam_new(pr); curr=ar->params; if (!curr) { ar->params=nfp; } else { /* find last */ while (curr->next) { curr=curr->next; } /* while */ curr->next=nfp; } DBG_LEAVE; } void Arguments_free(ARGUMENTS *ar) { if (ar) { FREEPARAM *fr; FREEPARAM *next; fr=ar->params; while (fr) { next=fr->next; FreeParam_free(fr); fr=next; } /* while */ free(ar); } } void usage(GWEN_UNUSED const char *prgname) { fprintf(stdout, "%s%s", k_PRG_VERSION_INFO "\n", I18N( "-v verbous\n" "--logfile ARG name of the logfile\n" "--logtype ARG log type\n" "--loglevel ARG log level\n" "-d ARG use ARG as domain prefix macro for function declarations\n" "-o ARG name of output file (stdout if omitted)\n" "--compact write a more compact file\n" "-V | --version print version of this tool and exit\n" ) ); } int checkArgs(ARGUMENTS *args, int argc, char **argv) { int i; i=1; while (i=argc) return RETURNVALUE_PARAM; args->logFile=argv[i]; } else if (strcmp(argv[i], "--logtype")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->logType=GWEN_Logger_Name2Logtype(argv[i]); if (args->logType==GWEN_LoggerType_Unknown) { fprintf(stderr, I18N("Unknown log type \"%s\"\n"), argv[i]); return RETURNVALUE_PARAM; } } else if (strcmp(argv[i], "--loglevel")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->logLevel=GWEN_Logger_Name2Level(argv[i]); if (args->logLevel==GWEN_LoggerLevel_Unknown) { fprintf(stderr, I18N("Unknown log level \"%s\"\n"), argv[i]); return RETURNVALUE_PARAM; } } else if (strcmp(argv[i], "-o")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->outputFile=argv[i]; } else if (strcmp(argv[i], "-d")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->domain=argv[i]; } else if (strcmp(argv[i], "--compact")==0) { args->compact=1; } else if (strcmp(argv[i], "-h")==0 || strcmp(argv[i], "--help")==0) { usage(argv[0]); return -2; } else if (strcmp(argv[i], "-V")==0 || strcmp(argv[i], "--version")==0) { fprintf(stdout, k_PRG_VERSION_INFO); return -2; } else if (strcmp(argv[i], "-v")==0) { args->verbous=1; } else { // otherwise add param if (argv[i][0]=='-') { fprintf(stderr, I18N("Unknown option \"%s\"\n"), argv[i]); return RETURNVALUE_PARAM; } else Arguments_AddParam(args, argv[i]); } i++; } /* while */ /* that's it */ return 0; } gwenhywfar-5.12.1/tools/typemaker/Makefile.in0000644000175000017500000006626315032533615016130 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = typemaker$(EXEEXT) @IS_WINDOWS_TRUE@am__append_1 = -mconsole @IS_WINDOWS_TRUE@am__append_2 = $(PROG_LIBRARIES) subdir = tools/typemaker ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_typemaker_OBJECTS = args.$(OBJEXT) main.$(OBJEXT) phc.$(OBJEXT) \ lhc.$(OBJEXT) ahc.$(OBJEXT) code_c.$(OBJEXT) typemaker_OBJECTS = $(am_typemaker_OBJECTS) am__DEPENDENCIES_1 = @IS_WINDOWS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) typemaker_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = typemaker_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(typemaker_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/ahc.Po ./$(DEPDIR)/args.Po \ ./$(DEPDIR)/code_c.Po ./$(DEPDIR)/lhc.Po ./$(DEPDIR)/main.Po \ ./$(DEPDIR)/phc.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(typemaker_SOURCES) DIST_SOURCES = $(typemaker_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = @all_includes@ -I$(gwenhywfar_symlinkdir) EXTRA_DIST = test.xml noinst_HEADERS = args.h typemaker_p.h typemaker_SOURCES = args.c main.c phc.c lhc.c ahc.c code_c.c typemaker_LDADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__append_2) typemaker_LDFLAGS = @i18n_libs@ $(am__append_1) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/typemaker/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/typemaker/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list typemaker$(EXEEXT): $(typemaker_OBJECTS) $(typemaker_DEPENDENCIES) $(EXTRA_typemaker_DEPENDENCIES) @rm -f typemaker$(EXEEXT) $(AM_V_CCLD)$(typemaker_LINK) $(typemaker_OBJECTS) $(typemaker_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/args.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code_c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lhc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phc.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/ahc.Po -rm -f ./$(DEPDIR)/args.Po -rm -f ./$(DEPDIR)/code_c.Po -rm -f ./$(DEPDIR)/lhc.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/phc.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/ahc.Po -rm -f ./$(DEPDIR)/args.Po -rm -f ./$(DEPDIR)/code_c.Po -rm -f ./$(DEPDIR)/lhc.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/phc.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile sources: for f in $(typemaker_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/typemaker/ahc.c0000644000175000017500000004025013142134476014750 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "args.h" #include "typemaker_p.h" #include #include #include #include #include #include #include #include #include #include #include #include int write_ha_file_c(ARGUMENTS *args, GWEN_XMLNODE *node) { int rv; const char *f; GWEN_BUFFER *fname; GWEN_BUFFER *hbuf; const char *s; const char *nacc; const char *constAcc; const char *constName; const char *fromDbAcc; const char *fromDbName; const char *dupAcc; const char *dupName; GWEN_SYNCIO *sio; int err; GWEN_XMLNODE *n; const char *id; const char *prefix; id=get_struct_property(node, "id", 0); if (!id) { DBG_ERROR(0, "No id for struct"); return -1; } prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix for struct"); return -1; } f=get_struct_property(node, "filename", 0); if (!f) { DBG_ERROR(0, "No filename given"); return -1; } nacc=get_struct_property(node, "access", "public"); constAcc=get_struct_property(node, "constructor-access", nacc); constName=get_struct_property(node, "constructor-name", 0); fromDbAcc=get_struct_property(node, "fromdb-access", nacc); fromDbName=get_struct_property(node, "fromdb-name", 0); dupAcc=get_struct_property(node, "dup-access", nacc); dupName=get_struct_property(node, "fromdb-name", 0); fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, ".h"); sio=GWEN_SyncIo_File_new(GWEN_Buffer_GetStart(fname), GWEN_SyncIo_File_CreationMode_CreateAlways); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE | GWEN_SYNCIO_FILE_FLAGS_GREAD | GWEN_SYNCIO_FILE_FLAGS_GWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_ERROR(0, "open(%s): %s", GWEN_Buffer_GetStart(fname), strerror(errno)); GWEN_Buffer_free(fname); GWEN_SyncIo_free(sio); return -1; } GWEN_Buffer_free(fname); /* Insert the auto-generation warning */ GWEN_SyncIo_WriteString(sio, "/* This file is auto-generated from \""); GWEN_SyncIo_WriteString(sio, f); GWEN_SyncIo_WriteLine(sio, ".xml\" by the typemaker"); GWEN_SyncIo_WriteLine(sio, " tool of Gwenhywfar. "); GWEN_SyncIo_WriteLine(sio, " Do not edit this file -- all changes will be lost! */"); hbuf=GWEN_Buffer_new(0, 256, 0, 1); s=f; while (*s) { GWEN_Buffer_AppendByte(hbuf, toupper(*s)); s++; } GWEN_Buffer_AppendString(hbuf, "_H"); GWEN_SyncIo_WriteString(sio, "#ifndef "); GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteString(sio, "#define "); GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteLine(sio, ""); rv=write_apidoc_c(args, node, sio, "public"); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } if (strcasecmp(nacc, "public")==0) { GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "extern \"C\" {"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "typedef struct "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ";"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "} /* __cplusplus */"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); } GWEN_SyncIo_WriteLine(sio, "#include "); if (strcasecmp(get_struct_property(node, "inherit", ""), "public")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(get_struct_property(node, "list", ""), "public")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(get_struct_property(node, "list2", ""), "public")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } n=GWEN_XMLNode_FindFirstTag(node, "pre-headers", 0, 0); if (n) { GWEN_XMLNODE *nn; GWEN_SyncIo_WriteLine(sio, "/* pre-headers */"); nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=write_hp_group_c(args, nn, sio); if (rv) { GWEN_Buffer_free(hbuf); return -1; } nn=GWEN_XMLNode_GetNextTag(nn); } /* while */ GWEN_SyncIo_WriteLine(sio, ""); } n=GWEN_XMLNode_FindFirstTag(node, "headers", 0, 0); if (n) { GWEN_XMLNODE *nn; GWEN_SyncIo_WriteLine(sio, "/* headers */"); nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=write_hp_group_c(args, nn, sio); if (rv) { GWEN_Buffer_free(hbuf); DBG_INFO(0, "here (%d)", rv); return -1; } nn=GWEN_XMLNode_GetNextTag(nn); } /* while */ GWEN_SyncIo_WriteLine(sio, ""); } GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "extern \"C\" {"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); if (write_h_enums(args, node, sio, "public")) { DBG_ERROR(0, "Error writing enum types"); return -1; } if (write_h_funcs(args, node, sio, "public")) { DBG_ERROR(0, "Error writing function types"); return -1; } if (strcasecmp(get_struct_property(node, "inherit", ""), "public")==0) { if (args->domain) GWEN_SyncIo_WriteString(sio, "GWEN_INHERIT_FUNCTION_LIB_DEFS("); else GWEN_SyncIo_WriteString(sio, "GWEN_INHERIT_FUNCTION_DEFS("); GWEN_SyncIo_WriteString(sio, id); if (args->domain) { GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, args->domain); } GWEN_SyncIo_WriteLine(sio, ")"); } if (strcasecmp(get_struct_property(node, "list", ""), "public")==0) { if (args->domain) GWEN_SyncIo_WriteString(sio, "GWEN_LIST_FUNCTION_LIB_DEFS("); else GWEN_SyncIo_WriteString(sio, "GWEN_LIST_FUNCTION_DEFS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, prefix); if (args->domain) { GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, args->domain); } GWEN_SyncIo_WriteLine(sio, ")"); if (dupAcc && strcasecmp(dupAcc, "none")!=0) { if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, "_LIST *"); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List_dup(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "_LIST *stl);"); GWEN_SyncIo_WriteLine(sio, ""); } } if (strcasecmp(get_struct_property(node, "list2", ""), "public")==0) { if (args->domain) GWEN_SyncIo_WriteString(sio, "GWEN_LIST2_FUNCTION_LIB_DEFS("); else GWEN_SyncIo_WriteString(sio, "GWEN_LIST2_FUNCTION_DEFS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, prefix); if (args->domain) { GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, args->domain); } GWEN_SyncIo_WriteLine(sio, ")"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, "/** Destroys all objects stored in the given " "LIST2 and the list itself"); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List2_freeAll("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "_LIST2 *stl);"); GWEN_SyncIo_WriteLine(sio, ""); } n=GWEN_XMLNode_FindFirstTag(node, "post-headers", 0, 0); if (n) { GWEN_XMLNODE *nn; GWEN_SyncIo_WriteLine(sio, "/* post-headers */"); nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=write_hp_group_c(args, nn, sio); if (rv) { GWEN_Buffer_free(hbuf); DBG_INFO(0, "here (%d)", rv); return -1; } nn=GWEN_XMLNode_GetNextTag(nn); } /* while */ GWEN_SyncIo_WriteLine(sio, ""); } if (strcasecmp(constAcc, "public")==0) { GWEN_SyncIo_WriteLine(sio, "/** Creates a new object."); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (constName) GWEN_SyncIo_WriteString(sio, constName); else GWEN_SyncIo_WriteString(sio, "_new"); GWEN_SyncIo_WriteLine(sio, "(void);"); } /* FromDb */ if (strcasecmp(fromDbAcc, "public")==0) { GWEN_SyncIo_WriteLine(sio, "/** Creates an object from the data in the" " given GWEN_DB_NODE"); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (fromDbName) GWEN_SyncIo_WriteString(sio, fromDbName); else GWEN_SyncIo_WriteString(sio, "_fromDb"); GWEN_SyncIo_WriteLine(sio, "(GWEN_DB_NODE *db);"); } /* dup */ if (strcasecmp(dupAcc, "public")==0) { GWEN_SyncIo_WriteLine(sio, "/** Creates and returns a deep copy of the" "given object."); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (dupName) GWEN_SyncIo_WriteString(sio, dupName); else GWEN_SyncIo_WriteString(sio, "_dup"); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "*st);"); } if (strcasecmp(nacc, "public")==0) { GWEN_SyncIo_WriteLine(sio, "/** Destroys the given object."); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_free("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); GWEN_SyncIo_WriteLine(sio, "/** Increments the usage counter of the " "given object, so an additional free() is" " needed to destroy the object."); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Attach("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); /* ReadDb */ GWEN_SyncIo_WriteLine(sio, "/** Reads data from a GWEN_DB."); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_ReadDb("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st, GWEN_DB_NODE *db);"); /* ToDb */ GWEN_SyncIo_WriteLine(sio, "/** Stores an object in the" " given GWEN_DB_NODE"); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_toDb(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "*st, GWEN_DB_NODE *db);"); GWEN_SyncIo_WriteLine(sio, "/** Returns 0 if this object has not been" " modified, !=0 otherwise"); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_IsModified(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); GWEN_SyncIo_WriteLine(sio, "/** Sets the modified state of the given " "object"); GWEN_SyncIo_WriteLine(sio, "*/"); if (args->domain) { GWEN_SyncIo_WriteString(sio, args->domain); GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_SetModified("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st, int i);"); } rv=write_h_setget_c(args, node, sio, "public"); if (rv) { GWEN_Buffer_free(hbuf); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); DBG_INFO(0, "here (%d)", rv); return rv; } err=GWEN_SyncIo_WriteLine(sio, ""); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteLine(sio, "} /* __cplusplus */"); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteLine(sio, "#endif"); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteLine(sio, ""); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } /* write trailing endif */ err=GWEN_SyncIo_WriteLine(sio, ""); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteString(sio, "#endif /* "); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(hbuf)); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteLine(sio, " */"); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_Disconnect(sio); if (err) { DBG_ERROR_ERR(0, err); GWEN_SyncIo_free(sio); GWEN_Buffer_free(hbuf); return -1; } GWEN_Buffer_free(hbuf); return 0; } int write_ha_files_c(ARGUMENTS *args, GWEN_XMLNODE *node) { GWEN_XMLNODE *n; int rv; n=GWEN_XMLNode_FindFirstTag(node, "type", 0, 0); while (n) { const char *nacc; nacc=get_struct_property(n, "access", "public"); if (strcasecmp(nacc, "public")==0) { rv=write_ha_file_c(args, n); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } } n=GWEN_XMLNode_FindNextTag(n, "type", 0, 0); } return 0; } gwenhywfar-5.12.1/tools/typemaker/code_c.c0000644000175000017500000027144213606364433015445 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "args.h" #include "typemaker_p.h" #include #include #include #include #include #include #include #include #include #include #include #include int write_c_enums(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(node, "subtypes", 0, 0); if (n) n=GWEN_XMLNode_FindFirstTag(n, "type", "mode", "enum"); if (n) { GWEN_BUFFER *tprefix; GWEN_BUFFER *tid; uint32_t ppos; uint32_t tpos; const char *s; tprefix=GWEN_Buffer_new(0, 64, 0, 1); tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_Buffer_AppendString(tprefix, "_"); ppos=GWEN_Buffer_GetPos(tprefix); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); tpos=GWEN_Buffer_GetPos(tid); while (n) { GWEN_XMLNODE *nn; s=GWEN_XMLNode_GetProperty(n, "access", "public"); s=GWEN_XMLNode_GetProperty(n, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); s=GWEN_XMLNode_GetProperty(n, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteLine(sio, "_fromString(const char *s) {"); GWEN_SyncIo_WriteLine(sio, " if (s) {"); nn=GWEN_XMLNode_FindFirstTag(n, "values", 0, 0); if (nn) nn=GWEN_XMLNode_FindFirstTag(nn, "value", 0, 0); if (nn) { uint32_t vpos; int first=1; vpos=GWEN_Buffer_GetPos(tprefix); while (nn) { GWEN_XMLNODE *nnn; nnn=GWEN_XMLNode_GetFirstData(nn); if (!nnn) { DBG_ERROR(0, "No values in enum description for \"%s\"", GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); GWEN_Buffer_free(tprefix); return -1; } if (first) GWEN_SyncIo_WriteString(sio, " if (strcasecmp(s, \""); else GWEN_SyncIo_WriteString(sio, " else if (strcasecmp(s, \""); s=GWEN_XMLNode_GetData(nnn); assert(s); GWEN_SyncIo_WriteString(sio, s); GWEN_SyncIo_WriteLine(sio, "\")==0)"); GWEN_SyncIo_WriteString(sio, " return "); GWEN_Buffer_AppendByte(tprefix, toupper(*s)); GWEN_Buffer_AppendString(tprefix, s+1); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteLine(sio, ";"); GWEN_Buffer_Crop(tprefix, 0, vpos); GWEN_Buffer_SetPos(tprefix, vpos); first=0; nn=GWEN_XMLNode_FindNextTag(nn, "value", 0, 0); } } GWEN_SyncIo_WriteLine(sio, " }"); GWEN_SyncIo_WriteString(sio, " return "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteLine(sio, "Unknown;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "const char *"); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteString(sio, "_toString("); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_SyncIo_WriteLine(sio, " v) {"); GWEN_SyncIo_WriteLine(sio, " switch(v) {"); nn=GWEN_XMLNode_FindFirstTag(n, "values", 0, 0); if (nn) nn=GWEN_XMLNode_FindFirstTag(nn, "value", 0, 0); if (nn) { uint32_t vpos; vpos=GWEN_Buffer_GetPos(tprefix); while (nn) { GWEN_XMLNODE *nnn; nnn=GWEN_XMLNode_GetFirstData(nn); if (!nnn) { DBG_ERROR(0, "No values in enum description for \"%s\"", GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); GWEN_Buffer_free(tprefix); return -1; } s=GWEN_XMLNode_GetData(nnn); assert(s); GWEN_Buffer_AppendByte(tprefix, toupper(*s)); GWEN_Buffer_AppendString(tprefix, s+1); GWEN_SyncIo_WriteString(sio, " case "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteLine(sio, ":"); GWEN_SyncIo_WriteString(sio, " return \""); GWEN_SyncIo_WriteString(sio, s); GWEN_SyncIo_WriteLine(sio, "\";"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_Buffer_Crop(tprefix, 0, vpos); GWEN_Buffer_SetPos(tprefix, vpos); nn=GWEN_XMLNode_FindNextTag(nn, "value", 0, 0); } } GWEN_SyncIo_WriteLine(sio, " default:"); GWEN_SyncIo_WriteLine(sio, " return \"unknown\";"); GWEN_SyncIo_WriteLine(sio, " } /* switch */"); GWEN_SyncIo_WriteLine(sio, "} "); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); GWEN_Buffer_Crop(tprefix, 0, ppos); GWEN_Buffer_Crop(tid, 0, tpos); n=GWEN_XMLNode_FindNextTag(n, "type", "mode", "enum"); } /* while n */ GWEN_Buffer_free(tid); GWEN_Buffer_free(tprefix); } /* if enum types found */ return 0; } int write_code_freeElem_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *typ; const char *name; int doCopy; int takeOver; int err; if (atoi(get_property(node, "ptr", "0"))==0) return 0; doCopy=atoi(GWEN_XMLNode_GetProperty(node, "copy", "1")); takeOver=atoi(GWEN_XMLNode_GetProperty(node, "takeOver", "0")); if (!doCopy && !takeOver) return 0; typ=GWEN_XMLNode_GetProperty(node, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } name=GWEN_XMLNode_GetProperty(node, "name", 0); if (!name) { DBG_ERROR(0, "No type for element"); return -1; } err=GWEN_SyncIo_WriteString(sio, " if (st->"); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, name); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteLine(sio, ")"); if (err) { DBG_ERROR_ERR(0, err); return -1; } if (strcmp(typ, "char")==0) { /* we can handle chars */ err=GWEN_SyncIo_WriteString(sio, " free(st->"); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, name); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteLine(sio, ");"); if (err) { DBG_ERROR_ERR(0, err); return -1; } return 0; } else { const char *fname; fname=get_function_name(node, "free"); if (fname) { err=GWEN_SyncIo_WriteString(sio, " "); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, fname); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, "(st->"); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, name); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteLine(sio, ");"); if (err) { DBG_ERROR_ERR(0, err); return -1; } return 0; } } DBG_ERROR(0, "Unknown \"free\" function for type \"%s\"", typ); return -1; } int write_code_freeElems_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { if (GWEN_XMLNode_GetType(node)==GWEN_XMLNodeTypeTag) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(node); while (n) { int rv; if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) rv=write_code_freeElems_c(args, n, sio); else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { rv=write_code_freeElem_c(args, n, sio); } else { rv=0; } if (rv) return rv; n=GWEN_XMLNode_GetNextTag(n); } /* while */ } return 0; } int write_code_dupArg_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *param) { const char *typ; const char *name; int err; typ=GWEN_XMLNode_GetProperty(node, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } name=GWEN_XMLNode_GetProperty(node, "name", 0); if (!name) { DBG_ERROR(0, "No type for element"); return -1; } if (strcmp(typ, "char")==0) { /* we can handle chars */ err=GWEN_SyncIo_WriteString(sio, "strdup("); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, param); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteLine(sio, ");"); if (err) { DBG_ERROR_ERR(0, err); return -1; } return 0; } else { const char *fname; fname=get_function_name(node, "dup"); if (!fname) { DBG_ERROR(0, "No dup function set for type %s", typ); return -1; } err=GWEN_SyncIo_WriteString(sio, fname); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteString(sio, "("); err=GWEN_SyncIo_WriteString(sio, param); if (err) { DBG_ERROR_ERR(0, err); return -1; } err=GWEN_SyncIo_WriteLine(sio, ");"); if (err) { DBG_ERROR_ERR(0, err); return -1; } return 0; } DBG_ERROR(0, "Unknown \"dup\" function for type \"%s\"", typ); return -1; } int write_code_todbArg_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *btype; const char *typ; const char *name; const char *mode; int isPtr; isPtr=atoi(get_property(node, "ptr", "0")); name=GWEN_XMLNode_GetProperty(node, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } /* "single" as opposed to "list" or "list2" */ mode=GWEN_XMLNode_GetProperty(node, "mode", "single"); if (strcasecmp(mode, "list")==0 || strcasecmp(mode, "list2")==0) /* all list modes operate on pointers */ isPtr=1; typ=GWEN_XMLNode_GetProperty(node, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } if (isPtr) { const char *fname; fname=get_function_name(node, "todb"); if (fname) { GWEN_SyncIo_WriteString(sio, " if ("); GWEN_SyncIo_WriteString(sio, fname); GWEN_SyncIo_WriteString(sio, "(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, ", GWEN_DB_GetGroup(db, " "GWEN_DB_FLAGS_DEFAULT, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\")))"); GWEN_SyncIo_WriteLine(sio, " return -1;"); } else { if (strcasecmp(typ, "char")==0) { GWEN_SyncIo_WriteString(sio, " if (GWEN_DB_SetCharValue(db, " "GWEN_DB_FLAGS_OVERWRITE_VARS, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "))"); GWEN_SyncIo_WriteLine(sio, " return -1;"); } else if (strcasecmp(typ, "GWEN_STRINGLIST")==0) { GWEN_SyncIo_WriteLine(sio, " {"); GWEN_SyncIo_WriteLine(sio, " GWEN_STRINGLISTENTRY *se;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " GWEN_DB_DeleteVar(db, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteString(sio, " se=GWEN_StringList_FirstEntry(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ");"); GWEN_SyncIo_WriteLine(sio, " while(se) {"); GWEN_SyncIo_WriteLine(sio, " const char *s;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, " s=GWEN_StringListEntry_Data(se);"); GWEN_SyncIo_WriteLine(sio, " assert(s);"); GWEN_SyncIo_WriteString(sio, " if (GWEN_DB_SetCharValue(db, " "GWEN_DB_FLAGS_DEFAULT, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\", s))"); GWEN_SyncIo_WriteLine(sio, " return -1;"); GWEN_SyncIo_WriteLine(sio, " se=GWEN_StringListEntry_Next(se);"); GWEN_SyncIo_WriteLine(sio, " } /* while */"); GWEN_SyncIo_WriteLine(sio, " }"); } else if (strcasecmp(mode, "list")==0) { const char *elemType; const char *elemPrefix; GWEN_XMLNODE *elemNode; /* create list code */ elemType=GWEN_XMLNode_GetProperty(node, "elemType", 0); if (!elemType) { DBG_ERROR(0, "No \"type\" for list type \"%s\"", typ); return -1; } elemNode=get_typedef(node, elemType); if (!elemNode) { DBG_ERROR(0, "Undefined type %s", elemType); return -1; } elemPrefix=GWEN_XMLNode_GetProperty(elemNode, "prefix", 0); if (!elemPrefix) { DBG_ERROR(0, "No \"prefix\" for type \"%s\" (within %s)", elemType, typ); return -1; } /* actually generate the code */ GWEN_SyncIo_WriteLine(sio, " if (1) {"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT;"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT=GWEN_DB_GetGroup(db, " "GWEN_PATH_FLAGS_CREATE_GROUP, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteLine(sio, " assert(dbT);"); /* e=ElemType_List_First(st->name) */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List_First(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ");"); /* while (e) */ GWEN_SyncIo_WriteLine(sio, " while(e) {"); /* handle element type */ GWEN_SyncIo_WriteString(sio, " if ("); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_toDb(e, "); GWEN_SyncIo_WriteString(sio, "GWEN_DB_GetGroup(dbT, " "GWEN_PATH_FLAGS_CREATE_GROUP, \""); GWEN_SyncIo_WriteString(sio, "element"); GWEN_SyncIo_WriteLine(sio, "\")))"); GWEN_SyncIo_WriteLine(sio, " return -1;"); /* e=ElemType_List_Next(e) */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List_Next(e);"); GWEN_SyncIo_WriteLine(sio, " } /* while */"); GWEN_SyncIo_WriteLine(sio, " } /* if (1) */"); } else if (strcasecmp(mode, "list2")==0) { const char *elemType; const char *elemPrefix; GWEN_XMLNODE *elemNode; /* create list2 code */ elemType=GWEN_XMLNode_GetProperty(node, "elemType", 0); if (!elemType) { DBG_ERROR(0, "No \"type\" for list type \"%s\"", typ); return -1; } elemNode=get_typedef(node, elemType); if (!elemNode) { DBG_ERROR(0, "Undefined type %s", elemType); return -1; } elemPrefix=GWEN_XMLNode_GetProperty(elemNode, "prefix", 0); if (!elemPrefix) { DBG_ERROR(0, "No \"prefix\" for type \"%s\" (within %s)", elemType, typ); return -1; } /* actually generate the code */ GWEN_SyncIo_WriteLine(sio, " if (1) {"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT;"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, "_LIST2_ITERATOR *it;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT=GWEN_DB_GetGroup(db, " "GWEN_PATH_FLAGS_CREATE_GROUP, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteLine(sio, " assert(dbT);"); /* it=ElemType_List2_First(st->name) */ GWEN_SyncIo_WriteString(sio, " it="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List2_First(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ");"); /* if (it) */ GWEN_SyncIo_WriteLine(sio, " if (it) {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); /* e=ElemType_List2Iterator_Data(it) */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2Iterator_Data(it);"); GWEN_SyncIo_WriteString(sio, " assert(e);"); /* while (e) */ GWEN_SyncIo_WriteLine(sio, " while(e) {"); /* handle element type */ GWEN_SyncIo_WriteString(sio, " if ("); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_toDb(e, "); GWEN_SyncIo_WriteString(sio, "GWEN_DB_GetGroup(dbT, " "GWEN_PATH_FLAGS_CREATE_GROUP, \""); GWEN_SyncIo_WriteString(sio, "element"); GWEN_SyncIo_WriteLine(sio, "\")))"); GWEN_SyncIo_WriteLine(sio, " return -1;"); /* e=ElemType_List2Iterator_Next(it) */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2Iterator_Next(it);"); GWEN_SyncIo_WriteLine(sio, " } /* while */"); /* free iterator */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List2Iterator_free(it);"); GWEN_SyncIo_WriteLine(sio, " } /* if (it) */"); GWEN_SyncIo_WriteLine(sio, " } /* if (1) */"); } else { DBG_ERROR(0, "No toDb function for type \"%s\"", typ); return -1; } } } else { btype=get_property(node, "basetype", 0); if (!btype) { if (strcasecmp(typ, "char")==0) btype="char"; else if (strcasecmp(typ, "uint32_t")==0) btype="int"; else if (strcasecmp(typ, "GWEN_TYPE_UINT64")==0) btype="int"; else { btype=typ; } } if (strcasecmp(btype, "int")==0) { GWEN_SyncIo_WriteString(sio, " if (GWEN_DB_SetIntValue(db, " "GWEN_DB_FLAGS_OVERWRITE_VARS, \""); } else if (strcasecmp(btype, "char")==0) { GWEN_SyncIo_WriteString(sio, " if (GWEN_DB_SetCharValue(db, " "GWEN_DB_FLAGS_OVERWRITE_VARS, \""); } else { GWEN_XMLNODE *tnode; const char *tmode; tnode=get_typedef(node, typ); if (!tnode) { DBG_ERROR(0, "Undefined type %s", typ); return -1; } tmode=GWEN_XMLNode_GetProperty(tnode, "mode", "single"); if (strcasecmp(tmode, "enum")==0) { GWEN_XMLNODE *tnode; const char *tmode; tnode=get_typedef(node, typ); if (!tnode) { DBG_ERROR(0, "Undefined type %s", typ); return -1; } tmode=GWEN_XMLNode_GetProperty(tnode, "mode", "single"); if (strcasecmp(tmode, "enum")==0) { GWEN_BUFFER *tprefix; const char *s; tprefix=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_Buffer_AppendString(tprefix, "_"); s=GWEN_XMLNode_GetProperty(tnode, "prefix", 0); assert(s); GWEN_SyncIo_WriteString(sio, " if (GWEN_DB_SetCharValue(db, "); GWEN_SyncIo_WriteString(sio, "GWEN_DB_FLAGS_OVERWRITE_VARS, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", "); GWEN_Buffer_AppendString(tprefix, s); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteString(sio, "_toString(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, ")"); GWEN_SyncIo_WriteString(sio, ")"); GWEN_SyncIo_WriteLine(sio, ") "); GWEN_SyncIo_WriteLine(sio, " return -1;"); GWEN_Buffer_free(tprefix); return 0; } /* if enum */ else { DBG_ERROR(0, "Bad non-pointer type \"%s\" (not a base type)", typ); return -1; } } else { DBG_ERROR(0, "Bad non-pointer type \"%s\" (not a base type)", typ); return -1; } } GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "))"); GWEN_SyncIo_WriteLine(sio, " return -1;"); } return 0; } int write_code_fromdbArg_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *btype; const char *typ; const char *name; const char *mode; int isPtr; const char *defval; int isVolatile; isVolatile=atoi(GWEN_XMLNode_GetProperty(node, "volatile", "0")); if (isVolatile) /* don't save volatile data */ return 0; isPtr=atoi(get_property(node, "ptr", "0")); name=GWEN_XMLNode_GetProperty(node, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } mode=GWEN_XMLNode_GetProperty(node, "mode", "single"); if (strcasecmp(mode, "single")!=0) /* all list modes operate on pointers */ isPtr=1; typ=GWEN_XMLNode_GetProperty(node, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } defval=get_property(node, "default", 0); if (isPtr) { const char *fname; fname=get_function_name(node, "fromdb"); if (fname) { GWEN_SyncIo_WriteString(sio, fname); GWEN_SyncIo_WriteString(sio, "(dbT)"); } else { if (strcasecmp(typ, "char")==0) { GWEN_SyncIo_WriteString(sio, "GWEN_DB_GetCharValue(db, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", 0, "); if (defval) { GWEN_SyncIo_WriteString(sio, "\""); GWEN_SyncIo_WriteString(sio, defval); GWEN_SyncIo_WriteString(sio, "\""); } else { GWEN_SyncIo_WriteString(sio, "0"); } GWEN_SyncIo_WriteString(sio, ")"); } else { DBG_ERROR(0, "No fromDb function for type \"%s\"", typ); return -1; } } } else { btype=get_property(node, "basetype", 0); if (!btype) { if (strcasecmp(typ, "char")==0) btype="char"; else if (strcasecmp(typ, "uint32_t")==0) btype="int"; else if (strcasecmp(typ, "GWEN_TYPE_UINT64")==0) btype="int"; else { btype=typ; } } if (strcasecmp(btype, "int")==0) { GWEN_SyncIo_WriteString(sio, "GWEN_DB_GetIntValue(db, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", 0, "); if (defval) { GWEN_SyncIo_WriteString(sio, defval); } else { GWEN_SyncIo_WriteString(sio, "0"); } GWEN_SyncIo_WriteString(sio, ")"); } else if (strcasecmp(btype, "char")==0) { GWEN_SyncIo_WriteString(sio, "GWEN_DB_GetCharValue(db, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", 0, "); if (defval) { GWEN_SyncIo_WriteString(sio, "\""); GWEN_SyncIo_WriteString(sio, defval); GWEN_SyncIo_WriteString(sio, "\""); } else { GWEN_SyncIo_WriteString(sio, "0"); } GWEN_SyncIo_WriteString(sio, ")"); } else { GWEN_XMLNODE *tnode; const char *tmode; tnode=get_typedef(node, typ); if (!tnode) { DBG_ERROR(0, "Undefined type %s", typ); return -1; } tmode=GWEN_XMLNode_GetProperty(tnode, "mode", "single"); if (strcasecmp(tmode, "enum")==0) { GWEN_BUFFER *tprefix; const char *s; tprefix=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_Buffer_AppendString(tprefix, "_"); s=GWEN_XMLNode_GetProperty(tnode, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteString(sio, "_fromString("); GWEN_SyncIo_WriteString(sio, "GWEN_DB_GetCharValue(db, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "\", 0, "); if (defval) { GWEN_SyncIo_WriteString(sio, "\""); GWEN_SyncIo_WriteString(sio, defval); GWEN_SyncIo_WriteString(sio, "\""); } else { GWEN_SyncIo_WriteString(sio, "0"); } GWEN_SyncIo_WriteString(sio, ")"); GWEN_SyncIo_WriteString(sio, ")"); GWEN_Buffer_free(tprefix); } /* if enum */ else { DBG_ERROR(0, "Bad non-pointer type \"%s\" (not a base type)", typ); return -1; } } } return 0; } int write_code_constrec_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { rv=write_code_constrec_c(args, n, sio); if (rv) { DBG_ERROR(0, "Error in dup"); return rv; } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { int isPtr; const char *typ; const char *name; const char *setval; const char *mode; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } setval=GWEN_XMLNode_GetProperty(n, "preset", 0); isPtr=atoi(get_property(n, "ptr", "0")); mode=GWEN_XMLNode_GetProperty(n, "mode", "single"); if (strcasecmp(mode, "single")!=0) /* lists always use pointers */ isPtr=1; if (isPtr) { if (strcasecmp(typ, "GWEN_STRINGLIST")==0) { GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "=GWEN_StringList_new();"); } else if (strcasecmp(mode, "single")!=0) { int initVar; initVar=atoi(get_property(n, "init", "0")); if (initVar) { const char *fname; fname=get_function_name(n, "new"); if (!fname) { DBG_ERROR(0, "No new-function set for type %s", typ); return -1; } GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, fname); GWEN_SyncIo_WriteLine(sio, "();"); } /* if init requested */ } /* if !single */ else { if (setval) { GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, setval); GWEN_SyncIo_WriteLine(sio, ";"); } } } else { if (setval) { /* TODO: check for enum values */ GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, setval); GWEN_SyncIo_WriteLine(sio, ";"); } } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "func")==0) { } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_code_const_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *prefix; const char *styp; const char *constName; int rv; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } constName=get_struct_property(node, "constructor-name", 0); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (constName && *constName) GWEN_SyncIo_WriteString(sio, constName); else GWEN_SyncIo_WriteString(sio, "_new"); GWEN_SyncIo_WriteLine(sio, "(void) {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " GWEN_NEW_OBJECT("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, ", st)"); GWEN_SyncIo_WriteLine(sio, " st->_usage=1;"); // add inherit functions if (get_struct_property(node, "inherit", 0)) { GWEN_SyncIo_WriteString(sio, " GWEN_INHERIT_INIT("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, ", st)"); } // add list functions if (get_struct_property(node, "list", 0)) { GWEN_SyncIo_WriteString(sio, " GWEN_LIST_INIT("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, ", st)"); } rv=write_code_constrec_c(args, node, sio); if (rv) return rv; GWEN_SyncIo_WriteLine(sio, " return st;"); GWEN_SyncIo_WriteLine(sio, "}"); return 0; } int write_code_dest_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *prefix; const char *styp; int rv; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_free("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st) {"); GWEN_SyncIo_WriteLine(sio, " if (st) {"); GWEN_SyncIo_WriteLine(sio, " assert(st->_usage);"); GWEN_SyncIo_WriteLine(sio, " if (--(st->_usage)==0) {"); // add inherit functions if (get_struct_property(node, "inherit", 0)) { GWEN_SyncIo_WriteString(sio, " GWEN_INHERIT_FINI("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, ", st)"); } rv=write_code_freeElems_c(args, node, sio); if (rv) { DBG_ERROR(0, "Error in freeElems"); return rv; } // add list functions if (get_struct_property(node, "list", 0)) { GWEN_SyncIo_WriteString(sio, " GWEN_LIST_FINI("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, ", st)"); } GWEN_SyncIo_WriteLine(sio, " GWEN_FREE_OBJECT(st);"); GWEN_SyncIo_WriteLine(sio, " }"); GWEN_SyncIo_WriteLine(sio, " }"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, "}"); return 0; } int write_code_setget_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { rv=write_code_setget_c(args, n, sio); if (rv) { DBG_ERROR(0, "Error in setget"); return rv; } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { int isPtr; const char *typ; const char *name; const char *mode; GWEN_XMLNODE *tnode; const char *tmode; int isConst; int doCopy; GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); isConst=atoi(get_property(n, "const", "1")); doCopy=atoi(get_property(n, "copy", "1")); mode=GWEN_XMLNode_GetProperty(n, "mode", "single"); tnode=get_typedef(node, typ); if (tnode) tmode=GWEN_XMLNode_GetProperty(tnode, "mode", "single"); else tmode=mode; if (isPtr && (/*strcasecmp(mode, "single")==0 ||*/ isConst)) { GWEN_SyncIo_WriteString(sio, "const "); } if (strcasecmp(tmode, "enum")!=0) GWEN_SyncIo_WriteString(sio, typ); else { GWEN_BUFFER *tid; const char *s; tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); GWEN_Buffer_AppendString(tid, typ); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); } if (isPtr) { GWEN_SyncIo_WriteString(sio, " *"); } else { GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Get"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteString(sio, " return st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ";"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* write setter */ GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Set"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *st, "); if (isPtr && isConst) { GWEN_SyncIo_WriteString(sio, "const "); } if (strcasecmp(tmode, "enum")!=0) GWEN_SyncIo_WriteString(sio, typ); else { GWEN_BUFFER *tid; const char *s; tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); GWEN_Buffer_AppendString(tid, typ); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); } if (isPtr) { GWEN_SyncIo_WriteString(sio, " *"); } else { GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteLine(sio, "d) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); if (isPtr) { /* free old pointer if any */ rv=write_code_freeElem_c(args, n, sio); if (rv) return rv; /* copy argument if any */ if (strcasecmp(mode, "single")==0) { if (strcasecmp(typ, "char")==0) GWEN_SyncIo_WriteLine(sio, " if (d && *d)"); else GWEN_SyncIo_WriteLine(sio, " if (d)"); GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); if (doCopy) { rv=write_code_dupArg_c(args, n, sio, "d"); if (rv) return rv; } else { GWEN_SyncIo_WriteLine(sio, "d;"); } } else { if (doCopy) { rv=write_code_dupList_c(args, n, sio, "d"); if (rv) return rv; } else { if (isConst) { DBG_ERROR(0, "Properties: CONST but not COPY"); return -1; } GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "=d;"); } } GWEN_SyncIo_WriteLine(sio, " else"); GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "=0;"); } else { GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "=d;"); } GWEN_SyncIo_WriteLine(sio, " st->_modified=1;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); if (strcasecmp(typ, "GWEN_STRINGLIST")==0) { /* special functions for string lists */ GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Add"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, const char *d, int chk){"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteLine(sio, " assert(d);"); GWEN_SyncIo_WriteString(sio, " if (GWEN_StringList_AppendString(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ", d, 0, chk))"); GWEN_SyncIo_WriteLine(sio, " st->_modified=1;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* remove */ GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Remove"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, const char *d) {"); GWEN_SyncIo_WriteString(sio, " if (GWEN_StringList_RemoveString(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ", d))"); GWEN_SyncIo_WriteLine(sio, " st->_modified=1;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* clear */ GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Clear"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st) {"); GWEN_SyncIo_WriteString(sio, " if (GWEN_StringList_Count(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ")) {"); GWEN_SyncIo_WriteString(sio, " GWEN_StringList_Clear(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ");"); GWEN_SyncIo_WriteLine(sio, " st->_modified=1;"); GWEN_SyncIo_WriteLine(sio, " }"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* has */ GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Has"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, const char *d) {"); GWEN_SyncIo_WriteString(sio, " return GWEN_StringList_HasString(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ", d);"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "func")==0) { const char *typ; const char *name; const char *rettype; const char *defret; GWEN_XMLNODE *anode; int isPtr; int isVoid; int idx; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } rettype=GWEN_XMLNode_GetProperty(n, "return", 0); if (!rettype) { DBG_ERROR(0, "No return type for function"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); isVoid=(!isPtr && strcasecmp(rettype, "void")==0); defret=GWEN_XMLNode_GetProperty(n, "default", 0); if (!defret && !isVoid) { DBG_ERROR(0, "No default return value for function %s", name); return -1; } /* getter */ GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteString(sio, typ); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Get"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteString(sio, " return st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ";"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* setter */ GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Set"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *st, "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteString(sio, typ); GWEN_SyncIo_WriteLine(sio, " d) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "=d;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* function call */ GWEN_SyncIo_WriteString(sio, rettype); if (isPtr) GWEN_SyncIo_WriteString(sio, "*"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *st"); anode=GWEN_XMLNode_FindFirstTag(n, "arg", 0, 0); idx=0; while (anode) { const char *aname; const char *atype; int aisPtr; GWEN_SyncIo_WriteString(sio, ", "); aisPtr=atoi(GWEN_XMLNode_GetProperty(anode, "ptr", "0")); aname=GWEN_XMLNode_GetProperty(anode, "name", 0); if (!aname || !*aname) { DBG_ERROR(0, "No name for argument %d in function %s", idx, name); return -1; } atype=GWEN_XMLNode_GetProperty(anode, "type", 0); if (!atype || !*atype) { DBG_ERROR(0, "No type for argument %d in function %s", idx, name); return -1; } GWEN_SyncIo_WriteString(sio, atype); if (aisPtr) GWEN_SyncIo_WriteString(sio, "*"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, aname); idx++; anode=GWEN_XMLNode_FindNextTag(anode, "arg", 0, 0); } GWEN_SyncIo_WriteLine(sio, ") {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteString(sio, " if (st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ")"); GWEN_SyncIo_WriteString(sio, " "); if (!isVoid) GWEN_SyncIo_WriteString(sio, "return "); GWEN_SyncIo_WriteString(sio, "st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(st"); anode=GWEN_XMLNode_FindFirstTag(n, "arg", 0, 0); while (anode) { const char *aname; GWEN_SyncIo_WriteString(sio, ", "); aname=GWEN_XMLNode_GetProperty(anode, "name", 0); GWEN_SyncIo_WriteString(sio, aname); anode=GWEN_XMLNode_FindNextTag(anode, "arg", 0, 0); } GWEN_SyncIo_WriteLine(sio, ");"); if (!isVoid) { GWEN_SyncIo_WriteString(sio, "return "); GWEN_SyncIo_WriteString(sio, defret); GWEN_SyncIo_WriteLine(sio, ";"); } GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_code_dupList_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *n, GWEN_SYNCIO *sio, const char *listName) { int isPtr; const char *typ; const char *name; const char *mode; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); mode=GWEN_XMLNode_GetProperty(n, "mode", "single"); if (strcasecmp(mode, "single")!=0) /* lists are always pointers */ isPtr=1; if (isPtr) { if (strcasecmp(mode, "list")==0) { const char *prefix; const char *elemType; const char *elemPrefix; GWEN_XMLNODE *elemNode; prefix=get_struct_property(n, "prefix", 0); assert(prefix); /* create list code */ elemType=GWEN_XMLNode_GetProperty(n, "elemType", 0); if (!elemType) { DBG_ERROR(0, "No \"type\" for list type \"%s\"", typ); return -1; } elemNode=get_typedef(n, elemType); if (!elemNode) { DBG_ERROR(0, "Undefined type %s", elemType); return -1; } elemPrefix=GWEN_XMLNode_GetProperty(elemNode, "prefix", 0); if (!elemPrefix) { DBG_ERROR(0, "No \"prefix\" for type \"%s\" (within %s)", elemType, typ); return -1; } /* actually generate the code */ GWEN_SyncIo_WriteString(sio, " if ("); GWEN_SyncIo_WriteString(sio, listName); GWEN_SyncIo_WriteLine(sio, ") {"); /* ELEMTYPE *e; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); /* st->LIST=LIST_new() */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, "st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List_new();"); /* e=ElemType_List_First */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List_First("); GWEN_SyncIo_WriteString(sio, listName); GWEN_SyncIo_WriteLine(sio, ");"); /* while (e) ; */ GWEN_SyncIo_WriteLine(sio, " while(e) {"); /* ELEMTYPE *ne; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *ne;"); GWEN_SyncIo_WriteLine(sio, ""); /* ne=ElemType_dup; assert(ne); */ GWEN_SyncIo_WriteString(sio, " ne="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_dup(e);"); GWEN_SyncIo_WriteLine(sio, " assert(ne);"); /* ElemType_List_Add(ne, st->NAME); */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List_Add(ne, st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ");"); /* e=ElemType_List_Next */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List_Next(e);"); GWEN_SyncIo_WriteLine(sio, " } /* while (e) */"); GWEN_SyncIo_WriteLine(sio, " } /* if LIST */"); } else if (strcasecmp(mode, "list2")==0) { const char *prefix; const char *elemType; const char *elemPrefix; GWEN_XMLNODE *elemNode; prefix=get_struct_property(n, "prefix", 0); assert(prefix); /* create list code */ elemType=GWEN_XMLNode_GetProperty(n, "elemType", 0); if (!elemType) { DBG_ERROR(0, "No \"type\" for list type \"%s\"", typ); return -1; } elemNode=get_typedef(n, elemType); if (!elemNode) { DBG_ERROR(0, "Undefined type %s", elemType); return -1; } elemPrefix=GWEN_XMLNode_GetProperty(elemNode, "prefix", 0); if (!elemPrefix) { DBG_ERROR(0, "No \"prefix\" for type \"%s\" (within %s)", elemType, typ); return -1; } /* actually generate the code */ GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2_new();"); GWEN_SyncIo_WriteString(sio, " if ("); GWEN_SyncIo_WriteString(sio, listName); GWEN_SyncIo_WriteLine(sio, ") {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, "_LIST2_ITERATOR *it;"); GWEN_SyncIo_WriteLine(sio, ""); /* it=ElemType_List2_First */ GWEN_SyncIo_WriteString(sio, " it="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List2_First("); GWEN_SyncIo_WriteString(sio, listName); GWEN_SyncIo_WriteLine(sio, ");"); /* if (it) */ GWEN_SyncIo_WriteLine(sio, " if (it) {"); /* ELEMTYPE *e; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); /* e=ElemType_List2Iterator_Data */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2Iterator_Data(it);"); GWEN_SyncIo_WriteLine(sio, " assert(e);"); /* while (e) ; */ GWEN_SyncIo_WriteLine(sio, " while(e) {"); /* ELEMTYPE *ne; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *ne;"); GWEN_SyncIo_WriteLine(sio, ""); /* ne=ElemType_dup; assert(ne); */ GWEN_SyncIo_WriteString(sio, " ne="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_dup(e);"); GWEN_SyncIo_WriteLine(sio, " assert(ne);"); /* ElemType_List2_PushBack(st->NAME, ne); */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List2_PushBack(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ", ne);"); /* e=ElemType_List2Iterator_Next */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2Iterator_Next(it);"); GWEN_SyncIo_WriteLine(sio, " } /* while (e) */"); /* ElemType_List2Iterator_free */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2Iterator_free(it);"); GWEN_SyncIo_WriteLine(sio, " } /* if (it) */"); GWEN_SyncIo_WriteLine(sio, " } /* LIST */"); } } return 0; } int write_code_duprec_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { rv=write_code_duprec_c(args, n, sio); if (rv) { DBG_ERROR(0, "Error in dup"); return rv; } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { int isPtr; const char *typ; const char *name; const char *mode; int doCopy; int takeOver; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); doCopy=atoi(get_property(n, "copy", "1")); takeOver=atoi(get_property(n, "takeOver", "0")); mode=GWEN_XMLNode_GetProperty(n, "mode", "single"); if (strcasecmp(mode, "single")!=0) /* lists are always pointers */ isPtr=1; if (isPtr) { GWEN_BUFFER *pbuf; const char *fname; fname=get_function_name(n, "dup"); pbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(pbuf, "d->"); GWEN_Buffer_AppendByte(pbuf, tolower(*name)); GWEN_Buffer_AppendString(pbuf, name+1); if (strcasecmp(mode, "single")!=0 && !fname) { rv=write_code_dupList_c(args, n, sio, GWEN_Buffer_GetStart(pbuf)); GWEN_Buffer_free(pbuf); if (rv) return rv; } else { /* copy argument if any */ GWEN_SyncIo_WriteString(sio, " if (d->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ")"); GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); if (doCopy || takeOver) { rv=write_code_dupArg_c(args, n, sio, GWEN_Buffer_GetStart(pbuf)); GWEN_Buffer_free(pbuf); if (rv) return rv; } else { GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(pbuf)); GWEN_Buffer_free(pbuf); GWEN_SyncIo_WriteString(sio, ";"); } } } else { GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "=d->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ";"); } } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_code_dup_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { int rv; const char *prefix; const char *styp; const char *dupAcc; const char *dupName; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } dupAcc=get_struct_property(node, "dup-access", get_struct_property(node, "access", 0)); dupName=get_struct_property(node, "dup-name", 0); if (dupAcc && strcasecmp(dupAcc, "none")!=0) { GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (dupName) GWEN_SyncIo_WriteString(sio, dupName); else GWEN_SyncIo_WriteString(sio, "_dup"); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *d) {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, " assert(d);"); GWEN_SyncIo_WriteString(sio, " st="); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_new();"); rv=write_code_duprec_c(args, node, sio); if (rv) { DBG_ERROR(0, "Error in dup"); return rv; } GWEN_SyncIo_WriteLine(sio, " return st;"); GWEN_SyncIo_WriteLine(sio, "}"); } return 0; } int write_code_todbrec_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { rv=write_code_todbrec_c(args, n, sio); if (rv) { DBG_ERROR(0, "Error in todb"); return rv; } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { int isVolatile; isVolatile=atoi(GWEN_XMLNode_GetProperty(n, "volatile", "0")); if (isVolatile==0) { int isPtr; const char *typ; const char *name; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); if (isPtr) { GWEN_SyncIo_WriteString(sio, " if (st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ")"); } rv=write_code_todbArg_c(args, n, sio); if (rv) { DBG_ERROR(0, "Error in toDb function"); return rv; } } } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_code_todb_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_toDb(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, GWEN_DB_NODE *db) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteLine(sio, " assert(db);"); rv=write_code_todbrec_c(args, node, sio); if (rv) { DBG_ERROR(0, "Error in todb"); return rv; } GWEN_SyncIo_WriteLine(sio, " return 0;"); GWEN_SyncIo_WriteLine(sio, "}"); return 0; } int write_code_fromdbrec_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; int isVolatile; isVolatile=atoi(GWEN_XMLNode_GetProperty(node, "volatile", "0")); if (isVolatile) /* don't save volatile data */ return 0; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { rv=write_code_fromdbrec_c(args, n, sio); if (rv) { DBG_ERROR(0, "Error in fromdb"); return rv; } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { int isVolatile; isVolatile=atoi(GWEN_XMLNode_GetProperty(n, "volatile", "0")); if (isVolatile==0) { int isPtr; const char *typ; const char *name; const char *mode; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } mode=GWEN_XMLNode_GetProperty(n, "mode", "single"); typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } if (strcasecmp(mode, "list")==0) { const char *prefix; const char *elemType; const char *elemPrefix; GWEN_XMLNODE *elemNode; prefix=get_struct_property(node, "prefix", 0); assert(prefix); /* create list code */ elemType=GWEN_XMLNode_GetProperty(n, "elemType", 0); if (!elemType) { DBG_ERROR(0, "No \"type\" for list type \"%s\"", typ); return -1; } elemNode=get_typedef(n, elemType); if (!elemNode) { DBG_ERROR(0, "Undefined type %s", elemType); return -1; } elemPrefix=GWEN_XMLNode_GetProperty(elemNode, "prefix", 0); if (!elemPrefix) { DBG_ERROR(0, "No \"prefix\" for type \"%s\" (within %s)", elemType, typ); return -1; } /* actually generate the code */ GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List_new();"); GWEN_SyncIo_WriteLine(sio, " if (1) {/* just for local vars */"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT;"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT=GWEN_DB_GetGroup(db, " "GWEN_PATH_FLAGS_NAMEMUSTEXIST, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteLine(sio, " if (dbT) {"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT2;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT2=GWEN_DB_FindFirstGroup(dbT, \""); GWEN_SyncIo_WriteString(sio, "element"); GWEN_SyncIo_WriteLine(sio, "\");"); /* while (e) */ GWEN_SyncIo_WriteLine(sio, " while(dbT2) {"); /* e=ElemType_fromDb(e) */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_fromDb(dbT2);"); /* if (!e) */ GWEN_SyncIo_WriteLine(sio, " if (!e) {"); GWEN_SyncIo_WriteString(sio, " " "DBG_ERROR(0, \"Bad element for type \\\""); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, "\\\"\");"); GWEN_SyncIo_WriteLine(sio, " " "if (GWEN_Logger_GetLevel(0)>=" "GWEN_LoggerLevel_Debug)"); GWEN_SyncIo_WriteLine(sio, " " "GWEN_DB_Dump(dbT2, 2);"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_free(st);"); GWEN_SyncIo_WriteLine(sio, " return 0;"); GWEN_SyncIo_WriteLine(sio, " }"); /* ElemType_List_Add(e, st->NAME); */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List_Add(e, st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, ");"); GWEN_SyncIo_WriteString(sio, " dbT2=GWEN_DB_FindNextGroup(dbT2, \""); GWEN_SyncIo_WriteString(sio, "element"); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteLine(sio, " } /* while */"); GWEN_SyncIo_WriteLine(sio, " } /* if (dbT) */"); GWEN_SyncIo_WriteLine(sio, " } /* if (1) */"); } else if (strcasecmp(mode, "list2")==0) { const char *prefix; const char *elemType; const char *elemPrefix; GWEN_XMLNODE *elemNode; prefix=get_struct_property(node, "prefix", 0); assert(prefix); /* create list code */ elemType=GWEN_XMLNode_GetProperty(n, "elemType", 0); if (!elemType) { DBG_ERROR(0, "No \"type\" for list type \"%s\"", typ); return -1; } elemNode=get_typedef(node, elemType); if (!elemNode) { DBG_ERROR(0, "Undefined type %s", elemType); return -1; } elemPrefix=GWEN_XMLNode_GetProperty(elemNode, "prefix", 0); if (!elemPrefix) { DBG_ERROR(0, "No \"prefix\" for type \"%s\" (within %s)", elemType, typ); return -1; } /* actually generate the code */ GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_List2_new();"); GWEN_SyncIo_WriteLine(sio, " if (1) {"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT;"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT=GWEN_DB_GetGroup(db, " "GWEN_PATH_FLAGS_NAMEMUSTEXIST, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteLine(sio, " if (dbT) {"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT2;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT2=GWEN_DB_FindFirstGroup(dbT, \""); GWEN_SyncIo_WriteString(sio, "element"); GWEN_SyncIo_WriteLine(sio, "\");"); /* while (e) */ GWEN_SyncIo_WriteLine(sio, " while(dbT2) {"); /* e=ElemType_fromDb(e) */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteLine(sio, "_fromDb(dbT2);"); /* if (!e) */ GWEN_SyncIo_WriteLine(sio, " if (!e) {"); GWEN_SyncIo_WriteString(sio, " " "DBG_ERROR(0, \"Bad element for type \\\""); GWEN_SyncIo_WriteString(sio, elemType); GWEN_SyncIo_WriteLine(sio, "\\\"\");"); GWEN_SyncIo_WriteLine(sio, " " "if (GWEN_Logger_GetLevel(0)>=" "GWEN_LoggerLevel_Debug)"); GWEN_SyncIo_WriteLine(sio, " " "GWEN_DB_Dump(dbT2, 2);"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_free(st);"); GWEN_SyncIo_WriteLine(sio, " return 0;"); GWEN_SyncIo_WriteLine(sio, " } /* if !e */"); /* ElemType_List_Add(e, st->NAME); */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, elemPrefix); GWEN_SyncIo_WriteString(sio, "_List2_PushBack(st->"); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ", e);"); GWEN_SyncIo_WriteString(sio, " " "dbT2=GWEN_DB_FindNextGroup(dbT2, \""); GWEN_SyncIo_WriteString(sio, "element"); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteLine(sio, " } /* while */"); GWEN_SyncIo_WriteLine(sio, " } /* if (dbT) */"); GWEN_SyncIo_WriteLine(sio, " } /* if (1) */"); } else if (strcasecmp(typ, "GWEN_STRINGLIST")==0) { GWEN_SyncIo_WriteLine(sio, " if (1) {"); GWEN_SyncIo_WriteLine(sio, " int i;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, " for (i=0; ; i++) {"); GWEN_SyncIo_WriteLine(sio, " const char *s;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " s=GWEN_DB_GetCharValue(db, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\", i, 0);"); GWEN_SyncIo_WriteLine(sio, " if (!s)"); GWEN_SyncIo_WriteLine(sio, " break;"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Add"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "(st, s, 0);"); GWEN_SyncIo_WriteLine(sio, " } /* for */"); GWEN_SyncIo_WriteLine(sio, " }"); } else { isPtr=atoi(get_property(n, "ptr", "0")); if (isPtr) { if (strcasecmp(typ, "char")!=0) { GWEN_SyncIo_WriteLine(sio, " if (1) { /* for local vars */"); GWEN_SyncIo_WriteLine(sio, " GWEN_DB_NODE *dbT;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, " dbT=GWEN_DB_GetGroup(db, " "GWEN_PATH_FLAGS_NAMEMUSTEXIST, \""); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, "\");"); GWEN_SyncIo_WriteString(sio, " if (dbT)"); } } if (isPtr && strcasecmp(typ, "char")!=0) { GWEN_SyncIo_WriteLine(sio, " {"); rv=write_code_freeElem_c(args, n, sio); if (rv) return rv; GWEN_SyncIo_WriteString(sio, " st->"); GWEN_SyncIo_WriteString(sio, name); GWEN_SyncIo_WriteString(sio, "="); rv=write_code_fromdbArg_c(args, n, sio); if (rv) return rv; GWEN_SyncIo_WriteLine(sio, ";"); GWEN_SyncIo_WriteLine(sio, "}"); } else { GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Set"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(st, "); rv=write_code_fromdbArg_c(args, n, sio); if (rv) return rv; GWEN_SyncIo_WriteLine(sio, ");"); } if (isPtr && strcasecmp(typ, "char")!=0) { GWEN_SyncIo_WriteLine(sio, " }"); } } } } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_code_readdb_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_ReadDb("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, GWEN_DB_NODE *db) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteLine(sio, " assert(db);"); rv=write_code_fromdbrec_c(args, node, sio); if (rv) { DBG_ERROR(0, "Error in fromdb"); return rv; } GWEN_SyncIo_WriteLine(sio, " return 0;"); GWEN_SyncIo_WriteLine(sio, "}"); return 0; } int write_code_fromdb_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *prefix; const char *styp; const char *fromDbName; const char *fromDbAcc; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } fromDbAcc=get_struct_property(node, "dup-access", get_struct_property(node, "access", 0)); fromDbName=get_struct_property(node, "fromdb-name", 0); if (fromDbAcc && strcasecmp(fromDbAcc, "none")!=0) { GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (fromDbName) GWEN_SyncIo_WriteString(sio, fromDbName); else GWEN_SyncIo_WriteString(sio, "_fromDb"); GWEN_SyncIo_WriteLine(sio, "(GWEN_DB_NODE *db) {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st;"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, " assert(db);"); GWEN_SyncIo_WriteString(sio, " st="); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_new();"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_ReadDb(st, db);"); GWEN_SyncIo_WriteLine(sio, " st->_modified=0;"); GWEN_SyncIo_WriteLine(sio, " return st;"); GWEN_SyncIo_WriteLine(sio, "}"); } /* if fromDb wanted */ return 0; } int write_code_builtin_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *prefix; const char *styp; const char *dupAcc; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } dupAcc=get_struct_property(node, "dup-access", get_struct_property(node, "access", 0)); /* IsModified */ GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_IsModified(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteLine(sio, " return st->_modified;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* SetModified */ GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_SetModified("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, int i) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteLine(sio, " st->_modified=i;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* Attach */ GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Attach("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st) {"); GWEN_SyncIo_WriteLine(sio, " assert(st);"); GWEN_SyncIo_WriteLine(sio, " st->_usage++;"); GWEN_SyncIo_WriteLine(sio, "}"); /* list2 functions */ if (get_struct_property(node, "list2", 0)) { /* List2_freeAll */ GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List2__freeAll_cb("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteLine(sio, "st, void *user_data) {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_free(st);"); GWEN_SyncIo_WriteLine(sio, "return 0;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List2_freeAll("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, "_LIST2 *stl) {"); GWEN_SyncIo_WriteLine(sio, " if (stl) {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List2_ForEach(stl, "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_List2__freeAll_cb, 0);"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_List2_free(stl); "); GWEN_SyncIo_WriteLine(sio, " }"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } /* list functions */ if (get_struct_property(node, "list", 0)) { /* LIST_dup functions */ if (dupAcc && strcasecmp(dupAcc, "none")!=0) { const char *dupName; dupName=get_struct_property(node, "dup-name", 0); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_LIST *"); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List_dup(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, "_LIST *stl) {"); GWEN_SyncIo_WriteLine(sio, " if (stl) {"); /* ELEMTYPE_LIST *nl; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, "_LIST *nl;"); /* ELEMTYPE *e; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *e;"); GWEN_SyncIo_WriteLine(sio, ""); /* nl=ElemType_List */ GWEN_SyncIo_WriteString(sio, " nl="); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_List_new();"); /* e=ElemType_List_First */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_List_First(stl);"); /* while (e) ; */ GWEN_SyncIo_WriteLine(sio, " while(e) {"); /* ELEMTYPE *ne; */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *ne;"); GWEN_SyncIo_WriteLine(sio, ""); /* ne=ElemType_dup; assert(ne); */ GWEN_SyncIo_WriteString(sio, " ne="); GWEN_SyncIo_WriteString(sio, prefix); if (dupName) GWEN_SyncIo_WriteString(sio, dupName); else GWEN_SyncIo_WriteString(sio, "_dup"); GWEN_SyncIo_WriteLine(sio, "(e);"); GWEN_SyncIo_WriteLine(sio, " assert(ne);"); /* ElemType_List_Add(ne, st->NAME); */ GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_List_Add(ne, nl);"); /* e=ElemType_List_Next */ GWEN_SyncIo_WriteString(sio, " e="); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, "_List_Next(e);"); GWEN_SyncIo_WriteLine(sio, " } /* while (e) */"); GWEN_SyncIo_WriteLine(sio, " return nl;"); GWEN_SyncIo_WriteLine(sio, " }"); GWEN_SyncIo_WriteLine(sio, " else"); GWEN_SyncIo_WriteLine(sio, " return 0;"); GWEN_SyncIo_WriteLine(sio, "}"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } /* if we have a dup function */ } return 0; } int write_code_file_c(ARGUMENTS *args, GWEN_XMLNODE *node) { int rv; const char *f; GWEN_BUFFER *fname; /*const char *nacc;*/ GWEN_SYNCIO *sio; int err; const char *id; const char *prefix; GWEN_XMLNODE *n; id=get_struct_property(node, "id", 0); if (!id) { DBG_ERROR(0, "No id for struct"); return -1; } f=get_struct_property(node, "filename", 0); if (!f) { DBG_ERROR(0, "No filename given"); return -1; } prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } /*nacc=get_struct_property(node, "access", "public");*/ fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, ".c"); sio=GWEN_SyncIo_File_new(GWEN_Buffer_GetStart(fname), GWEN_SyncIo_File_CreationMode_CreateAlways); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE | GWEN_SYNCIO_FILE_FLAGS_GREAD | GWEN_SYNCIO_FILE_FLAGS_GWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_ERROR(0, "open(%s): %s", GWEN_Buffer_GetStart(fname), strerror(errno)); GWEN_Buffer_free(fname); GWEN_SyncIo_free(sio); return -1; } GWEN_Buffer_free(fname); /* Insert the auto-generation warning */ GWEN_SyncIo_WriteString(sio, "/* This file is auto-generated from \""); GWEN_SyncIo_WriteString(sio, f); GWEN_SyncIo_WriteLine(sio, ".xml\" by the typemaker"); GWEN_SyncIo_WriteLine(sio, " tool of Gwenhywfar. "); GWEN_SyncIo_WriteLine(sio, " Do not edit this file -- all changes will be lost! */"); GWEN_SyncIo_WriteLine(sio, "#ifdef HAVE_CONFIG_H"); GWEN_SyncIo_WriteLine(sio, "# include \"config.h\""); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, "_p.h"); GWEN_SyncIo_WriteString(sio, "#include \""); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(fname)); GWEN_SyncIo_WriteLine(sio, "\""); GWEN_Buffer_free(fname); GWEN_SyncIo_WriteLine(sio, "#include "); GWEN_SyncIo_WriteLine(sio, "#include "); GWEN_SyncIo_WriteLine(sio, "#include "); GWEN_SyncIo_WriteLine(sio, "#include "); GWEN_SyncIo_WriteLine(sio, "#include "); GWEN_SyncIo_WriteLine(sio, "#include "); GWEN_SyncIo_WriteLine(sio, ""); /* write headers */ n=GWEN_XMLNode_FindFirstTag(node, "headers", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "header", 0, 0); while (n) { write_h_header(args, n, sio, "source"); n=GWEN_XMLNode_FindNextTag(n, "header", 0, 0); } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } /* write c-headers */ n=GWEN_XMLNode_FindFirstTag(node, "c-headers", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "header", 0, 0); while (n) { write_h_header(args, n, sio, "source"); n=GWEN_XMLNode_FindNextTag(n, "header", 0, 0); } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } if (get_struct_property(node, "inherit", 0)) { GWEN_SyncIo_WriteString(sio, "GWEN_INHERIT_FUNCTIONS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ")"); } if (get_struct_property(node, "list", 0)) { GWEN_SyncIo_WriteString(sio, "GWEN_LIST_FUNCTIONS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, ")"); } if (get_struct_property(node, "list2", 0)) { GWEN_SyncIo_WriteString(sio, "GWEN_LIST2_FUNCTIONS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, ")"); } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_c_enums(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_const_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_dest_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_dup_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_todb_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_readdb_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_fromdb_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_setget_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); rv=write_code_builtin_c(args, node, sio); if (rv) { GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); /* close stream */ err=GWEN_SyncIo_Disconnect(sio); if (err) { DBG_ERROR_ERR(0, err); GWEN_SyncIo_free(sio); return -1; } GWEN_SyncIo_free(sio); return 0; } int write_code_files_c(ARGUMENTS *args, GWEN_XMLNODE *node) { GWEN_XMLNODE *n; int rv; n=GWEN_XMLNode_FindFirstTag(node, "type", 0, 0); while (n) { rv=write_code_file_c(args, n); if (rv) return rv; n=GWEN_XMLNode_FindNextTag(n, "type", 0, 0); } return 0; } gwenhywfar-5.12.1/tools/typemaker/Makefile.am0000664000175000017500000000104414170115332016075 00000000000000AM_CPPFLAGS=@all_includes@ -I$(gwenhywfar_symlinkdir) EXTRA_DIST=test.xml bin_PROGRAMS=typemaker noinst_HEADERS=args.h typemaker_p.h typemaker_SOURCES=args.c main.c phc.c lhc.c ahc.c code_c.c typemaker_LDADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) typemaker_LDFLAGS=@i18n_libs@ if IS_WINDOWS typemaker_LDFLAGS+=-mconsole typemaker_LDADD+= $(PROG_LIBRARIES) endif sources: for f in $(typemaker_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/tools/typemaker/typemaker_p.h0000644000175000017500000001014113142134476016536 00000000000000 #ifndef TYPEMAKER_P_H #define TYPEMAKER_P_H #include int write_xml_to_bio(GWEN_XMLNODE *n, GWEN_SYNCIO *sio, uint32_t flags); int write_hp_group_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_hp_file_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_h_setget_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc); int write_h_header(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *where); int write_h_enums(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc); int write_h_funcs(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc); int write_c_enums(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_h_elem_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_h_func_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_h_struct_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_hp_group_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_hp_file_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_hp_files_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_hl_file_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_hl_files_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_ha_file_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_ha_files_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_code_const_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_setget_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_file_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_code_files_c(ARGUMENTS *args, GWEN_XMLNODE *node); int write_code_freeElem_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_freeElems_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_dupArg_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *param); int write_code_dupList_c(ARGUMENTS *args, GWEN_XMLNODE *n, GWEN_SYNCIO *sio, const char *listName); int write_code_dup_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_todb_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_todbArg_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_fromdbArg_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_fromdb_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); int write_code_readdb_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); const char *get_function_name(GWEN_XMLNODE *node, const char *ftype); const char *get_function_name2(GWEN_XMLNODE *node, const char *ftype, const char *name); GWEN_XMLNODE *get_typedef(GWEN_XMLNODE *node, const char *name); int write_code_builtin_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio); const char *get_property(GWEN_XMLNODE *node, const char *pname, const char *defval); const char *get_struct_property(GWEN_XMLNODE *node, const char *pname, const char *defval); GWEN_XMLNODE *get_struct_node(GWEN_XMLNODE *node); int write_apidoc_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc); #endif gwenhywfar-5.12.1/tools/typemaker/main.c0000644000175000017500000010436613606364337015160 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif /* Internationalization */ #ifdef ENABLE_NLS # include # include # define I18N(m) dgettext("gwenhywfar", m) # define I18S(m) m #else # define I18N(m) m # define I18S(m) m #endif #include "args.h" #include "typemaker_p.h" #include #include #include #include #include #include #include #include #include #include #include int write_xml_to_bio(GWEN_XMLNODE *n, GWEN_SYNCIO *sio, uint32_t flags) { GWEN_BUFFER *buf; int rv; buf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_XMLNode_toBuffer(n, buf, flags); if (rv) { GWEN_Buffer_free(buf); return rv; } rv=GWEN_SyncIo_WriteForced(sio, (const uint8_t *) GWEN_Buffer_GetStart(buf), GWEN_Buffer_GetUsedBytes(buf)); GWEN_Buffer_free(buf); if (rv<0) { DBG_INFO(0, "here (%d)", rv); return rv; } return 0; } int write_h_header(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, GWEN_UNUSED const char *where) { int isSys; int err; const char *d; GWEN_XMLNODE *dn; /*const char *nwhere;*/ /*nwhere=GWEN_XMLNode_GetProperty(node, "out", "header"); if (strcasecmp(nwhere, where)==0) {*/ dn=GWEN_XMLNode_GetFirstData(node); if (!dn) { DBG_ERROR(0, "Empty
"); return -1; } d=GWEN_XMLNode_GetData(dn); if (!d) { DBG_ERROR(0, "Empty
"); return -1; } isSys=(strcasecmp(GWEN_XMLNode_GetProperty(node, "type", ""), "sys")==0); err=GWEN_SyncIo_WriteString(sio, "#include "); if (err) { DBG_ERROR_ERR(0, err); return -1; } if (isSys) { err=GWEN_SyncIo_WriteString(sio, "<"); if (err) { DBG_ERROR_ERR(0, err); return -1; } } else { err=GWEN_SyncIo_WriteString(sio, "\""); if (err) { DBG_ERROR_ERR(0, err); return -1; } } err=GWEN_SyncIo_WriteString(sio, d); if (err) { DBG_ERROR_ERR(0, err); return -1; } if (isSys) { err=GWEN_SyncIo_WriteLine(sio, ">"); if (err) { DBG_ERROR_ERR(0, err); return -1; } } else { err=GWEN_SyncIo_WriteLine(sio, "\""); if (err) { DBG_ERROR_ERR(0, err); return -1; } } /*} */ return 0; } void write_if_nonnull(GWEN_SYNCIO *sio, const char *str) { if (str) { GWEN_SyncIo_WriteString(sio, str); GWEN_SyncIo_WriteString(sio, " "); } } int write_h_setget_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; const char *sacc; sacc=get_struct_property(node, "access", "public"); prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { const char *name; int hasDoc; GWEN_XMLNODE *dn; hasDoc=0; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (name) { hasDoc=1; GWEN_SyncIo_WriteString(sio, "/** @name "); GWEN_SyncIo_WriteLine(sio, name); dn=GWEN_XMLNode_FindFirstTag(n, "descr", 0, 0); if (dn) { GWEN_SyncIo_WriteLine(sio, " *"); if (write_xml_to_bio(dn, sio, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_INDENT)) return -1; } GWEN_SyncIo_WriteLine(sio, "*/"); GWEN_SyncIo_WriteLine(sio, "/*@{*/"); } rv=write_h_setget_c(args, n, sio, acc); if (rv) return rv; if (hasDoc) { GWEN_SyncIo_WriteLine(sio, "/*@}*/"); } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { if (strcasecmp(GWEN_XMLNode_GetProperty(n, "access", sacc), acc)==0) { int isPtr; const char *typ; const char *name; const char *mode; const char *tmode; int isConst; /*int doCopy;*/ GWEN_XMLNODE *tnode; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); isConst=atoi(get_property(n, "const", "1")); /*doCopy=atoi(get_property(n, "copy", "1"));*/ mode=GWEN_XMLNode_GetProperty(n, "mode", "single"); if (strcasecmp(mode, "single")!=0) isPtr=1; tnode=get_typedef(node, typ); if (tnode) tmode=GWEN_XMLNode_GetProperty(tnode, "mode", "single"); else tmode=mode; /* getter */ GWEN_SyncIo_WriteLine(sio, "/**"); GWEN_SyncIo_WriteString(sio, "* Returns the property @ref "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteLine(sio, name+1); GWEN_SyncIo_WriteLine(sio, "*/"); write_if_nonnull(sio, args->domain); if (isPtr && (/*strcasecmp(mode, "single")==0 ||*/ isConst)) { GWEN_SyncIo_WriteString(sio, "const "); } if (strcasecmp(tmode, "enum")!=0) GWEN_SyncIo_WriteString(sio, typ); else { GWEN_BUFFER *tid; const char *s; tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); GWEN_Buffer_AppendString(tid, typ); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); } if (isPtr) { GWEN_SyncIo_WriteString(sio, " *"); } else { GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Get"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *el);"); /* setter */ GWEN_SyncIo_WriteLine(sio, "/**"); GWEN_SyncIo_WriteString(sio, "* Set the property @ref "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteLine(sio, name+1); GWEN_SyncIo_WriteLine(sio, "*/"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Set"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *el, "); if (isPtr && isConst) { GWEN_SyncIo_WriteString(sio, "const "); } if (strcasecmp(tmode, "enum")!=0) GWEN_SyncIo_WriteString(sio, typ); else { GWEN_BUFFER *tid; const char *s; tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); GWEN_Buffer_AppendString(tid, typ); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); } if (isPtr) { GWEN_SyncIo_WriteString(sio, " *"); } else { GWEN_SyncIo_WriteString(sio, " "); } GWEN_SyncIo_WriteLine(sio, "d);"); if (strcasecmp(typ, "GWEN_STRINGLIST")==0) { /* special functions for string lists */ write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Add"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, const char *d, int chk);"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Remove"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, const char *d);"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Clear"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st);"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Has"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st, const char *d);"); } } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "func")==0) { if (strcasecmp(GWEN_XMLNode_GetProperty(n, "access", sacc), acc)==0) { const char *typ; const char *name; const char *rettype; GWEN_XMLNODE *anode; int isPtr; /*int isVoid;*/ int idx; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } rettype=GWEN_XMLNode_GetProperty(n, "return", 0); if (!rettype) { DBG_ERROR(0, "No return type for function"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); /*isVoid=(!isPtr && strcasecmp(rettype, "void")==0);*/ /* getter */ GWEN_SyncIo_WriteLine(sio, "/**"); GWEN_SyncIo_WriteString(sio, "* Returns the property @ref "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteLine(sio, name+1); GWEN_SyncIo_WriteLine(sio, "*/"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteString(sio, typ); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Get"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteLine(sio, " *st);"); /* setter */ GWEN_SyncIo_WriteLine(sio, "/**"); GWEN_SyncIo_WriteString(sio, "* Set the property @ref "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteLine(sio, name+1); GWEN_SyncIo_WriteLine(sio, "*/"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Set"); GWEN_SyncIo_WriteChar(sio, toupper(*name));; GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *st, "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteString(sio, typ); GWEN_SyncIo_WriteLine(sio, " d);"); /* function call */ GWEN_SyncIo_WriteLine(sio, "/**"); /* TODO: Write API doc for this function */ GWEN_SyncIo_WriteLine(sio, "*/"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, rettype); if (isPtr) GWEN_SyncIo_WriteString(sio, "*"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, "("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *st"); anode=GWEN_XMLNode_FindFirstTag(n, "arg", 0, 0); idx=0; while (anode) { const char *aname; const char *atype; int aisPtr; GWEN_SyncIo_WriteString(sio, ", "); aisPtr=atoi(GWEN_XMLNode_GetProperty(anode, "ptr", "0")); aname=GWEN_XMLNode_GetProperty(anode, "name", 0); if (!aname || !*aname) { DBG_ERROR(0, "No name for argument %d in function %s", idx, name); return -1; } atype=GWEN_XMLNode_GetProperty(anode, "type", 0); if (!atype || !*atype) { DBG_ERROR(0, "No type for argument %d in function %s", idx, name); return -1; } GWEN_SyncIo_WriteString(sio, atype); if (aisPtr) GWEN_SyncIo_WriteString(sio, "*"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, aname); idx++; anode=GWEN_XMLNode_FindNextTag(anode, "arg", 0, 0); } GWEN_SyncIo_WriteLine(sio, ");"); } } } GWEN_SyncIo_WriteLine(sio, ""); n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_h_enums(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(node, "subtypes", 0, 0); if (n) n=GWEN_XMLNode_FindFirstTag(n, "type", "mode", "enum"); if (n) { GWEN_BUFFER *tprefix; GWEN_BUFFER *tid; uint32_t ppos; uint32_t tpos; const char *s; tprefix=GWEN_Buffer_new(0, 64, 0, 1); tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_Buffer_AppendString(tprefix, "_"); ppos=GWEN_Buffer_GetPos(tprefix); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); tpos=GWEN_Buffer_GetPos(tid); while (n) { s=GWEN_XMLNode_GetProperty(n, "access", "public"); if (strcasecmp(s, acc)==0) { GWEN_XMLNODE *nn; s=GWEN_XMLNode_GetProperty(n, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); s=GWEN_XMLNode_GetProperty(n, "prefix", 0); assert(s); GWEN_Buffer_AppendString(tprefix, s); GWEN_SyncIo_WriteLine(sio, "typedef enum {"); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteString(sio, "Unknown=-1"); nn=GWEN_XMLNode_FindFirstTag(n, "values", 0, 0); if (nn) nn=GWEN_XMLNode_FindFirstTag(nn, "value", 0, 0); if (nn) { uint32_t vpos; vpos=GWEN_Buffer_GetPos(tprefix); while (nn) { GWEN_XMLNODE *nnn; GWEN_XMLNODE *dn; nnn=GWEN_XMLNode_GetFirstData(nn); if (!nnn) { DBG_ERROR(0, "No values in enum description for \"%s\"", GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); GWEN_Buffer_free(tprefix); return -1; } GWEN_SyncIo_WriteLine(sio, ","); dn=GWEN_XMLNode_FindFirstTag(nn, "descr", 0, 0); if (dn) { GWEN_SyncIo_WriteString(sio, " /** "); if (write_xml_to_bio(dn, sio, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_INDENT)) return -1; GWEN_SyncIo_WriteLine(sio, " */"); } GWEN_SyncIo_WriteString(sio, " "); s=GWEN_XMLNode_GetData(nnn); assert(s); GWEN_Buffer_AppendByte(tprefix, toupper(*s)); GWEN_Buffer_AppendString(tprefix, s+1); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); s=GWEN_XMLNode_GetProperty(nn, "value", 0); if (s) { GWEN_SyncIo_WriteString(sio, "="); GWEN_SyncIo_WriteString(sio, s); } GWEN_Buffer_Crop(tprefix, 0, vpos); nn=GWEN_XMLNode_FindNextTag(nn, "value", 0, 0); } } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "} "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_SyncIo_WriteLine(sio, ";"); GWEN_SyncIo_WriteLine(sio, ""); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteLine(sio, "_fromString(const char *s);"); write_if_nonnull(sio, args->domain); GWEN_SyncIo_WriteString(sio, "const char *"); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tprefix)); GWEN_SyncIo_WriteString(sio, "_toString("); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_SyncIo_WriteLine(sio, " v);"); GWEN_Buffer_Crop(tprefix, 0, ppos); GWEN_Buffer_Crop(tid, 0, tpos); GWEN_SyncIo_WriteLine(sio, ""); } /* if access type matches */ n=GWEN_XMLNode_FindNextTag(n, "type", "mode", "enum"); } /* while n */ GWEN_Buffer_free(tid); GWEN_Buffer_free(tprefix); } /* if enum types found */ return 0; } int write_h_funcs(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc) { GWEN_XMLNODE *n; const char *styp; styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_FindFirstTag(node, "func", 0, 0); while (n) { const char *sacc; sacc=get_struct_property(n, "access", "public"); assert(sacc); if (strcasecmp(sacc, acc)==0) { const char *prefix; const char *name; const char *rettype; const char *typ; GWEN_XMLNODE *anode; int isPtr; int idx; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for function"); return -1; } rettype=GWEN_XMLNode_GetProperty(n, "return", 0); if (!rettype) { DBG_ERROR(0, "No return type for function"); return -1; } prefix=get_struct_property(n, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } isPtr=atoi(get_property(n, "ptr", "0")); typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for function"); return -1; } /* typdef rettype (*typ)(args) */ GWEN_SyncIo_WriteString(sio, "typedef "); GWEN_SyncIo_WriteString(sio, rettype); if (isPtr) GWEN_SyncIo_WriteString(sio, "*"); GWEN_SyncIo_WriteString(sio, " (*"); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteString(sio, typ); GWEN_SyncIo_WriteString(sio, ")("); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, " *st"); anode=GWEN_XMLNode_FindFirstTag(n, "arg", 0, 0); idx=0; while (anode) { const char *aname; const char *atype; int aisPtr; GWEN_SyncIo_WriteString(sio, ", "); aisPtr=atoi(GWEN_XMLNode_GetProperty(anode, "ptr", "0")); aname=GWEN_XMLNode_GetProperty(anode, "name", 0); if (!aname || !*aname) { DBG_ERROR(0, "No name for argument %d in function %s", idx, name); return -1; } atype=GWEN_XMLNode_GetProperty(anode, "type", 0); if (!atype || !*atype) { DBG_ERROR(0, "No type for argument %d in function %s", idx, name); return -1; } GWEN_SyncIo_WriteString(sio, atype); GWEN_SyncIo_WriteString(sio, " "); if (aisPtr) GWEN_SyncIo_WriteString(sio, "*"); GWEN_SyncIo_WriteString(sio, aname); idx++; anode=GWEN_XMLNode_FindNextTag(anode, "arg", 0, 0); } GWEN_SyncIo_WriteLine(sio, ");"); } n=GWEN_XMLNode_FindNextTag(n, "func", 0, 0); } /* while functions */ GWEN_SyncIo_WriteLine(sio, ""); return 0; } int write_apidocrec_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc, int level) { GWEN_XMLNODE *n; int rv; const char *prefix; const char *styp; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } n=GWEN_XMLNode_GetFirstTag(node); while (n) { if (GWEN_XMLNode_GetType(n)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(n), "group")==0) { const char *name; GWEN_XMLNODE *dn; char numbuf[16]; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } snprintf(numbuf, sizeof(numbuf), "%d", level); GWEN_SyncIo_WriteString(sio, ""); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, ""); GWEN_SyncIo_WriteLine(sio, "

"); dn=GWEN_XMLNode_FindFirstTag(n, "descr", 0, 0); if (dn) { if (write_xml_to_bio(dn, sio, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_INDENT)) { DBG_INFO(0, "here"); return -1; } } GWEN_SyncIo_WriteLine(sio, "

"); rv=write_apidocrec_c(args, n, sio, acc, level+1); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } } else if (strcasecmp(GWEN_XMLNode_GetData(n), "elem")==0) { if (strcasecmp(GWEN_XMLNode_GetProperty(n, "access", "public"), acc)==0) { const char *typ; const char *name; GWEN_XMLNODE *dn; char numbuf[16]; name=GWEN_XMLNode_GetProperty(n, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(n, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } snprintf(numbuf, sizeof(numbuf), "%d", level); GWEN_SyncIo_WriteString(sio, "@anchor "); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteLine(sio, name+1); GWEN_SyncIo_WriteString(sio, ""); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteString(sio, ""); dn=GWEN_XMLNode_FindFirstTag(n, "brief", 0, 0); if (dn) { GWEN_SyncIo_WriteString(sio, "@short "); if (write_xml_to_bio(dn, sio, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_INDENT)) { DBG_INFO(0, "here"); return -1; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, ""); } GWEN_SyncIo_WriteLine(sio, "

"); dn=GWEN_XMLNode_FindFirstTag(n, "descr", 0, 0); if (dn) { rv=write_xml_to_bio(dn, sio, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_INDENT); if (rv) { DBG_INFO(0, "here (%d)", rv); return -1; } } GWEN_SyncIo_WriteLine(sio, "

"); GWEN_SyncIo_WriteLine(sio, "

"); GWEN_SyncIo_WriteString(sio, "Set this property with @ref "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Set"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ", "); GWEN_SyncIo_WriteString(sio, "get it with @ref "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Get"); GWEN_SyncIo_WriteChar(sio, toupper(*name)); GWEN_SyncIo_WriteLine(sio, name+1); GWEN_SyncIo_WriteLine(sio, "

"); GWEN_SyncIo_WriteLine(sio, ""); } } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int write_apidoc_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc) { const char *prefix; const char *styp; GWEN_XMLNODE *dn; const char *brief; const char *s; int rv; prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix in struct"); return -1; } styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } GWEN_SyncIo_WriteString(sio, "/** @page P_"); GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); s=acc; while (*s) { GWEN_SyncIo_WriteChar(sio, toupper(*s)); s++; } brief=GWEN_XMLNode_GetProperty(node, "name", prefix); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, brief); GWEN_SyncIo_WriteString(sio, " ("); GWEN_SyncIo_WriteString(sio, acc); GWEN_SyncIo_WriteLine(sio, ")"); GWEN_SyncIo_WriteString(sio, "This page describes the properties of "); GWEN_SyncIo_WriteLine(sio, styp); dn=GWEN_XMLNode_FindFirstTag(node, "descr", 0, 0); if (dn) { if (write_xml_to_bio(dn, sio, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_INDENT)) { DBG_INFO(0, "here"); return -1; } } rv=write_apidocrec_c(args, node, sio, acc, 3); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } GWEN_SyncIo_WriteLine(sio, "*/"); return 0; } int write_files(ARGUMENTS *args, GWEN_XMLNODE *node) { int rv; GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(node, "types", 0, 0); if (!n) { DBG_WARN(0, "Empty file"); return 0; } rv=write_hp_files_c(args, n); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } rv=write_hl_files_c(args, n); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } rv=write_ha_files_c(args, n); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } rv=write_code_files_c(args, n); if (rv) { DBG_INFO(0, "here (%d)", rv); return rv; } return 0; } const char *get_function_name2(GWEN_XMLNODE *node, const char *ftype, const char *name) { GWEN_XMLNODE *n; /* find typedef for this type */ n=node; /* get root */ while (GWEN_XMLNode_GetParent(n)) n=GWEN_XMLNode_GetParent(n); n=GWEN_XMLNode_FindFirstTag(n, "typedefs", 0, 0); if (!n) return 0; n=GWEN_XMLNode_FindFirstTag(n, "type", "id", name); if (!n) return 0; n=GWEN_XMLNode_FindFirstTag(n, "functions", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "function", "type", ftype); if (n) return GWEN_XMLNode_GetProperty(n, "name", 0); } return 0; } const char *get_function_name(GWEN_XMLNODE *node, const char *ftype) { GWEN_XMLNODE *n; const char *name; n=GWEN_XMLNode_FindFirstTag(node, "functions", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "function", "type", ftype); if (n) return GWEN_XMLNode_GetProperty(n, "name", 0); } name=GWEN_XMLNode_GetProperty(node, "type", 0); if (!name) { DBG_ERROR(0, "no type for element"); return 0; } /* find typedef for this type */ n=node; /* get root */ while (GWEN_XMLNode_GetParent(n)) n=GWEN_XMLNode_GetParent(n); n=GWEN_XMLNode_FindFirstTag(n, "typedefs", 0, 0); if (!n) return 0; n=GWEN_XMLNode_FindFirstTag(n, "type", "id", name); if (!n) return 0; n=GWEN_XMLNode_FindFirstTag(n, "functions", 0, 0); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "function", "type", ftype); if (n) return GWEN_XMLNode_GetProperty(n, "name", 0); } return 0; } GWEN_XMLNODE *get_typedef(GWEN_XMLNODE *node, const char *name) { GWEN_XMLNODE *n; GWEN_XMLNODE *n2; assert(name); /* find typedef for this type */ n=node; /* get root */ while (GWEN_XMLNode_GetParent(n)) n=GWEN_XMLNode_GetParent(n); n2=GWEN_XMLNode_FindFirstTag(n, "typedefs", 0, 0); if (n2) n2=GWEN_XMLNode_FindFirstTag(n2, "type", "id", name); if (n2) return n2; n2=GWEN_XMLNode_FindFirstTag(n, "types", 0, 0); if (n2) n2=GWEN_XMLNode_FindFirstTag(n2, "type", "id", name); if (n2) return n2; n2=get_struct_node(node); assert(n2); n2=GWEN_XMLNode_FindFirstTag(n2, "subtypes", 0, 0); if (n2) n2=GWEN_XMLNode_FindFirstTag(n2, "type", "id", name); if (n2) return n2; return 0; } const char *get_property(GWEN_XMLNODE *node, const char *pname, const char *defval) { GWEN_XMLNODE *n; const char *name; const char *r; r=GWEN_XMLNode_GetProperty(node, pname, 0); if (r) return r; name=GWEN_XMLNode_GetProperty(node, "type", 0); if (!name) { DBG_ERROR(0, "no type for element"); return defval; } /* find typedef for this type */ n=node; /* get root */ while (GWEN_XMLNode_GetParent(n)) n=GWEN_XMLNode_GetParent(n); n=GWEN_XMLNode_FindFirstTag(n, "typedefs", 0, 0); if (!n) return defval; n=GWEN_XMLNode_FindFirstTag(n, "type", "id", name); if (!n) return defval; return GWEN_XMLNode_GetProperty(n, pname, defval); } const char *get_struct_property(GWEN_XMLNODE *node, const char *pname, const char *defval) { GWEN_XMLNODE *n; if (GWEN_XMLNode_GetType(node)==GWEN_XMLNodeTypeTag) if (strcasecmp(GWEN_XMLNode_GetData(node), "type")==0) { return GWEN_XMLNode_GetProperty(node, pname, defval); } /* find typedef for this type */ n=GWEN_XMLNode_GetParent(node); if (n) return get_struct_property(n, pname, defval); return defval; } GWEN_XMLNODE *get_struct_node(GWEN_XMLNODE *node) { while (node) { if (GWEN_XMLNode_GetType(node)==GWEN_XMLNodeTypeTag) if (strcasecmp(GWEN_XMLNode_GetData(node), "type")==0) { return node; } node=GWEN_XMLNode_GetParent(node); } return 0; } int main(int argc, char **argv) { ARGUMENTS *args; int rv; FREEPARAM *inFile; args=Arguments_new(); rv=checkArgs(args, argc, argv); if (rv==-1) { fprintf(stderr, "Parameter error\n"); return rv; } else if (rv==-2) { return 0; } GWEN_Logger_Open(0, "typemaker", args->logFile, args->logType, GWEN_LoggerFacility_User); GWEN_Logger_SetLevel(0, args->logLevel); inFile=args->params; if (!inFile) { fprintf(stderr, "No input file given.\n"); Arguments_free(args); return 1; } /* read all files */ while (inFile) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "inFile"); if (GWEN_XML_ReadFile(n, inFile->param, GWEN_XML_FLAGS_DEFAULT)) { fprintf(stderr, "ERROR: Error reading file \"%s\"\n", inFile->param); GWEN_XMLNode_free(n); return 2; } /* write file(s) */ rv=write_files(args, n); if (rv) { DBG_ERROR(0, "Error in file \"%s\"", inFile->param); GWEN_XMLNode_free(n); return 2; } GWEN_XMLNode_free(n); inFile=inFile->next; } /* while */ Arguments_free(args); return 0; } gwenhywfar-5.12.1/tools/typemaker/args.h0000644000175000017500000000313613142134464015155 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef XMLMERGE_ARGS_H #define XMLMERGE_ARGS_H #include #define k_PRG "xmlmerge" #define k_PRG_VERSION_INFO \ "xmlmerge v0.1\n"\ "(c) 2004 Martin Preuss\n"\ "This program is free software licensed under GPL.\n"\ "See COPYING for details.\n" #define RETURNVALUE_PARAM 1 #define RETURNVALUE_SETUP 2 #define RETURNVALUE_NOSTART 3 #define RETURNVALUE_DEINIT 4 #define RETURNVALUE_HANGUP 9 typedef struct _S_PARAM FREEPARAM; typedef struct _S_ARGS ARGUMENTS; struct _S_PARAM { FREEPARAM *next; const char *param; }; struct _S_ARGS { FREEPARAM *params; int verbous; /* -v */ char *logFile; /* --logfile ARG */ GWEN_LOGGER_LOGTYPE logType; /* --logtype ARG */ GWEN_LOGGER_LEVEL logLevel; /* --loglevel ARG */ const char *outputFile; /* -o ARG */ const char *domain; /* -d ARG */ int compact; /* --compact */ }; ARGUMENTS *Arguments_new(); void Arguments_free(ARGUMENTS *ar); int checkArgs(ARGUMENTS *args, int argc, char **argv); #endif /* XMLMERGE_ARGS_H */ gwenhywfar-5.12.1/tools/typemaker/lhc.c0000644000175000017500000002734213142134476014772 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "args.h" #include "typemaker_p.h" #include #include #include #include #include #include #include #include #include #include #include #include int write_hl_file_c(ARGUMENTS *args, GWEN_XMLNODE *node) { int rv; const char *f; GWEN_BUFFER *fname; GWEN_BUFFER *hbuf; const char *s; const char *nacc; const char *constAcc; const char *constName; const char *fromDbAcc; const char *fromDbName; const char *dupAcc; const char *dupName; GWEN_SYNCIO *sio; int err; GWEN_XMLNODE *n; const char *id; const char *prefix; id=get_struct_property(node, "id", 0); if (!id) { DBG_ERROR(0, "No id for struct"); return -1; } prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix for struct"); return -1; } f=get_struct_property(node, "filename", 0); if (!f) { DBG_ERROR(0, "No filename given"); return -1; } nacc=get_struct_property(node, "access", "public"); constAcc=get_struct_property(node, "constructor-access", nacc); constName=get_struct_property(node, "constructor-name", 0); fromDbAcc=get_struct_property(node, "fromdb-access", nacc); fromDbName=get_struct_property(node, "fromdb-name", 0); dupAcc=get_struct_property(node, "dup-access", nacc); dupName=get_struct_property(node, "fromdb-name", 0); fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, "_l.h"); sio=GWEN_SyncIo_File_new(GWEN_Buffer_GetStart(fname), GWEN_SyncIo_File_CreationMode_CreateAlways); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE | GWEN_SYNCIO_FILE_FLAGS_GREAD | GWEN_SYNCIO_FILE_FLAGS_GWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_ERROR(0, "open(%s): %s", GWEN_Buffer_GetStart(fname), strerror(errno)); GWEN_Buffer_free(fname); GWEN_SyncIo_free(sio); return -1; } GWEN_Buffer_free(fname); /* Insert the auto-generation warning */ GWEN_SyncIo_WriteString(sio, "/* This file is auto-generated from \""); GWEN_SyncIo_WriteString(sio, f); GWEN_SyncIo_WriteLine(sio, ".xml\" by the typemaker"); GWEN_SyncIo_WriteLine(sio, " tool of Gwenhywfar. "); GWEN_SyncIo_WriteLine(sio, " Do not edit this file -- all changes will be lost! */"); hbuf=GWEN_Buffer_new(0, 256, 0, 1); s=f; while (*s) { GWEN_Buffer_AppendByte(hbuf, toupper(*s)); s++; } GWEN_Buffer_AppendString(hbuf, "_L_H"); GWEN_SyncIo_WriteString(sio, "#ifndef "); GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteString(sio, "#define "); GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteLine(sio, ""); rv=write_apidoc_c(args, node, sio, "lib"); if (rv) return rv; if (strcasecmp(nacc, "lib")==0) { GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "extern \"C\" {"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "typedef struct "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ";"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "} /* __cplusplus */"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); } if (strcasecmp(get_struct_property(node, "inherit", ""), "lib")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(get_struct_property(node, "list", ""), "lib")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(get_struct_property(node, "list2", ""), "lib")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(nacc, "public")==0) { fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, ".h"); GWEN_SyncIo_WriteString(sio, "#include \""); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(fname)); GWEN_SyncIo_WriteLine(sio, "\""); GWEN_Buffer_free(fname); } if (strcasecmp(get_struct_property(node, "list", ""), "lib")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(nacc, "lib")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); n=GWEN_XMLNode_FindFirstTag(node, "pre-headers", 0, 0); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=write_hp_group_c(args, nn, sio); if (rv) { GWEN_Buffer_free(hbuf); return -1; } nn=GWEN_XMLNode_GetNextTag(nn); } /* while */ } n=GWEN_XMLNode_FindFirstTag(node, "headers", 0, 0); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=write_hp_group_c(args, nn, sio); if (rv) { GWEN_Buffer_free(hbuf); return -1; } nn=GWEN_XMLNode_GetNextTag(nn); } /* while */ } n=GWEN_XMLNode_FindFirstTag(node, "post-headers", 0, 0); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_GetFirstTag(n); while (nn) { rv=write_hp_group_c(args, nn, sio); if (rv) { GWEN_Buffer_free(hbuf); return -1; } nn=GWEN_XMLNode_GetNextTag(nn); } /* while */ } } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "extern \"C\" {"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); if (write_h_enums(args, node, sio, "lib")) { DBG_ERROR(0, "Error writing enum types"); return -1; } if (write_h_funcs(args, node, sio, "lib")) { DBG_ERROR(0, "Error writing function types"); return -1; } if (strcasecmp(get_struct_property(node, "inherit", ""), "lib")==0) { GWEN_SyncIo_WriteString(sio, "GWEN_INHERIT_FUNCTION_DEFS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ")"); } if (strcasecmp(get_struct_property(node, "list", ""), "lib")==0) { GWEN_SyncIo_WriteString(sio, "GWEN_LIST_FUNCTION_DEFS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, ")"); if (dupAcc && strcasecmp(dupAcc, "none")!=0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, "_LIST *"); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List_dup(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "_LIST *stl);"); GWEN_SyncIo_WriteLine(sio, ""); } } if (strcasecmp(get_struct_property(node, "list2", ""), "lib")==0) { GWEN_SyncIo_WriteString(sio, "GWEN_LIST2_FUNCTION_DEFS("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, ", "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteLine(sio, ")"); GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_List2_freeAll("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "_LIST2 *stl);"); GWEN_SyncIo_WriteLine(sio, ""); } if (strcasecmp(constAcc, "lib")==0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (constName) GWEN_SyncIo_WriteString(sio, constName); else GWEN_SyncIo_WriteString(sio, "_new"); GWEN_SyncIo_WriteLine(sio, "(void);"); } /* FromDb */ if (strcasecmp(fromDbAcc, "lib")==0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (fromDbName) GWEN_SyncIo_WriteString(sio, fromDbName); else GWEN_SyncIo_WriteString(sio, "_fromDb"); GWEN_SyncIo_WriteLine(sio, "(GWEN_DB_NODE *db);"); } /* dup */ if (strcasecmp(dupAcc, "lib")==0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (dupName) GWEN_SyncIo_WriteString(sio, dupName); else GWEN_SyncIo_WriteString(sio, "_dup"); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "*st);"); } if (strcasecmp(nacc, "lib")==0) { GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_free("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Attach("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); /* ReadDb */ GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_ReadDb("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st, GWEN_DB_NODE *db);"); /* ToDb */ GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_toDb(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "*st, GWEN_DB_NODE *db);"); GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_IsModified(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_SetModified("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st, int i);"); } rv=write_h_setget_c(args, node, sio, "lib"); if (rv) { GWEN_Buffer_free(hbuf); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteLine(sio, "#ifdef __cplusplus"); GWEN_SyncIo_WriteLine(sio, "} /* __cplusplus */"); GWEN_SyncIo_WriteLine(sio, "#endif"); GWEN_SyncIo_WriteLine(sio, ""); /* write trailing endif */ GWEN_SyncIo_WriteLine(sio, ""); GWEN_SyncIo_WriteString(sio, "#endif /* "); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteLine(sio, " */"); err=GWEN_SyncIo_Disconnect(sio); if (err) { DBG_ERROR_ERR(0, err); GWEN_SyncIo_free(sio); GWEN_Buffer_free(hbuf); return -1; } GWEN_Buffer_free(hbuf); return 0; } int write_hl_files_c(ARGUMENTS *args, GWEN_XMLNODE *node) { GWEN_XMLNODE *n; int rv; n=GWEN_XMLNode_FindFirstTag(node, "type", 0, 0); while (n) { rv=write_hl_file_c(args, n); if (rv) return rv; n=GWEN_XMLNode_FindNextTag(n, "type", 0, 0); } return 0; } gwenhywfar-5.12.1/tools/typemaker/test.xml0000644000175000017500000000631113142134464015547 00000000000000
gwenhywfar/types.h
gwenhywfar/gwentime.h
gwenhywfar/stringlist.h
aqbanking/value.h
This group contains information about the local account. This is the code of the local bank (i.e. your bank). This group contains information about the remote account.

This group contains information which differ between backends.

Some of this information might not even be supported by every backends.

gwenhywfar-5.12.1/tools/typemaker/phc.c0000644000175000017500000003231213606364356014776 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "args.h" #include "typemaker_p.h" #include #include #include #include #include #include #include #include #include #include #include #include #include int write_h_elem_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *name; const char *typ; const char *mode; GWEN_XMLNODE *tnode; const char *tmode; int err; int isPtr; name=GWEN_XMLNode_GetProperty(node, "name", 0); if (!name) { DBG_ERROR(0, "No name for element"); return -1; } typ=GWEN_XMLNode_GetProperty(node, "type", 0); if (!typ) { DBG_ERROR(0, "No type for element"); return -1; } mode=GWEN_XMLNode_GetProperty(node, "mode", "single"); tnode=get_typedef(node, typ); if (tnode) tmode=GWEN_XMLNode_GetProperty(tnode, "mode", "single"); else tmode=mode; isPtr=atoi(get_property(node, "ptr", "0")); err=GWEN_SyncIo_WriteString(sio, " "); if (err) { DBG_ERROR_ERR(0, err); return -1; } if (strcasecmp(tmode, "enum")!=0) GWEN_SyncIo_WriteString(sio, typ); else { GWEN_BUFFER *tid; const char *s; tid=GWEN_Buffer_new(0, 64, 0, 1); s=get_struct_property(node, "id", 0); assert(s); GWEN_Buffer_AppendString(tid, s); GWEN_Buffer_AppendString(tid, "_"); GWEN_Buffer_AppendString(tid, typ); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(tid)); GWEN_Buffer_free(tid); } GWEN_SyncIo_WriteString(sio, " "); if (isPtr) { GWEN_SyncIo_WriteString(sio, "*"); } GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ";"); return 0; } int write_h_func_c(GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *name; const char *typ; const char *styp; styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } name=GWEN_XMLNode_GetProperty(node, "name", 0); if (!name) { DBG_ERROR(0, "No name for function"); return -1; } typ=GWEN_XMLNode_GetProperty(node, "type", 0); if (!typ) { DBG_ERROR(0, "No type for function"); return -1; } GWEN_SyncIo_WriteString(sio, " "); /* rettype name; */ GWEN_SyncIo_WriteString(sio, styp); GWEN_SyncIo_WriteString(sio, "_"); GWEN_SyncIo_WriteString(sio, typ); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteChar(sio, tolower(*name)); GWEN_SyncIo_WriteString(sio, name+1); GWEN_SyncIo_WriteLine(sio, ";"); return 0; } int write_h_struct_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { GWEN_XMLNODE *n; const char *id; const char *acc; const char *prefix; id=get_struct_property(node, "id", 0); if (!id) { DBG_ERROR(0, "No id for struct"); return -1; } prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix for struct"); return -1; } if (write_h_enums(args, node, sio, "private")) { DBG_ERROR(0, "Error writing enum types"); return -1; } if (write_h_funcs(args, node, sio, "private")) { DBG_ERROR(0, "Error writing function types"); return -1; } acc=get_struct_property(node, "access", "public"); if (strcasecmp(acc, "private")==0) { GWEN_SyncIo_WriteString(sio, "typedef struct "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ";"); } GWEN_SyncIo_WriteString(sio, "struct "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " {"); if (get_struct_property(node, "inherit", 0)) { GWEN_SyncIo_WriteString(sio, " GWEN_INHERIT_ELEMENT("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ")"); } if (get_struct_property(node, "list", 0)) { GWEN_SyncIo_WriteString(sio, " GWEN_LIST_ELEMENT("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, ")"); } GWEN_SyncIo_WriteLine(sio, " int _usage;"); GWEN_SyncIo_WriteLine(sio, " int _modified;"); GWEN_SyncIo_WriteLine(sio, ""); n=GWEN_XMLNode_GetFirstTag(node); while (n) { int rv; rv=write_hp_group_c(args, n, sio); if (rv) return rv; n=GWEN_XMLNode_GetNextTag(n); } /* while */ GWEN_SyncIo_WriteLine(sio, "};"); return 0; } int write_hp_group_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { int rv; if (GWEN_XMLNode_GetType(node)==GWEN_XMLNodeTypeTag) { if (strcasecmp(GWEN_XMLNode_GetData(node), "type")==0) return write_h_struct_c(args, node, sio); else if (strcasecmp(GWEN_XMLNode_GetData(node), "elem")==0) { return write_h_elem_c(args, node, sio); } else if (strcasecmp(GWEN_XMLNode_GetData(node), "func")==0) { return write_h_func_c(args, node, sio); } else if (strcasecmp(GWEN_XMLNode_GetData(node), "header")==0) { return write_h_header(args, node, sio, "header"); } else if (strcasecmp(GWEN_XMLNode_GetData(node), "group")==0) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag(node); while (n) { rv=write_hp_group_c(args, n, sio); if (rv) return rv; n=GWEN_XMLNode_GetNextTag(n); } /* while */ } /* if group */ } return 0; } int write_hp_file_c(ARGUMENTS *args, GWEN_XMLNODE *node) { int rv; const char *f; GWEN_BUFFER *fname; GWEN_BUFFER *hbuf; const char *s; GWEN_SYNCIO *sio; int err; const char *nacc; const char *constAcc; const char *constName; const char *fromDbAcc; const char *fromDbName; const char *dupAcc; const char *dupName; const char *id; const char *prefix; id=get_struct_property(node, "id", 0); if (!id) { DBG_ERROR(0, "No id for struct"); return -1; } prefix=get_struct_property(node, "prefix", 0); if (!prefix) { DBG_ERROR(0, "No prefix for struct"); return -1; } f=get_struct_property(node, "filename", 0); if (!f) { DBG_ERROR(0, "No filename given"); return -1; } nacc=get_struct_property(node, "access", "public"); constAcc=get_struct_property(node, "constructor-access", nacc); constName=get_struct_property(node, "constructor-name", 0); fromDbAcc=get_struct_property(node, "fromdb-access", nacc); fromDbName=get_struct_property(node, "fromdb-name", 0); dupAcc=get_struct_property(node, "dup-access", nacc); dupName=get_struct_property(node, "fromdb-name", 0); fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, "_p.h"); sio=GWEN_SyncIo_File_new(GWEN_Buffer_GetStart(fname), GWEN_SyncIo_File_CreationMode_CreateAlways); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE | GWEN_SYNCIO_FILE_FLAGS_GREAD | GWEN_SYNCIO_FILE_FLAGS_GWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { DBG_ERROR(0, "open(%s): %s", GWEN_Buffer_GetStart(fname), strerror(errno)); GWEN_Buffer_free(fname); GWEN_SyncIo_free(sio); return -1; } GWEN_Buffer_free(fname); /* Insert the auto-generation warning */ GWEN_SyncIo_WriteString(sio, "/* This file is auto-generated from \""); GWEN_SyncIo_WriteString(sio, f); GWEN_SyncIo_WriteLine(sio, ".xml\" by the typemaker"); GWEN_SyncIo_WriteLine(sio, " tool of Gwenhywfar. "); GWEN_SyncIo_WriteLine(sio, " Do not edit this file -- all changes will be lost! */"); hbuf=GWEN_Buffer_new(0, 256, 0, 1); s=f; while (*s) { GWEN_Buffer_AppendByte(hbuf, toupper(*s)); s++; } GWEN_Buffer_AppendString(hbuf, "_P_H"); GWEN_SyncIo_WriteString(sio, "#ifndef "); GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteString(sio, "#define "); GWEN_SyncIo_WriteLine(sio, GWEN_Buffer_GetStart(hbuf)); GWEN_SyncIo_WriteLine(sio, ""); if (strcasecmp(get_struct_property(node, "inherit", ""), "private")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(get_struct_property(node, "list", ""), "private")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } if (strcasecmp(get_struct_property(node, "list2", ""), "private")==0) { GWEN_SyncIo_WriteLine(sio, "#include "); } fname=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(fname, f); GWEN_Buffer_AppendString(fname, "_l.h"); GWEN_SyncIo_WriteString(sio, "#include \""); GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(fname)); GWEN_SyncIo_WriteLine(sio, "\""); GWEN_Buffer_free(fname); GWEN_SyncIo_WriteLine(sio, ""); rv=write_h_struct_c(args, node, sio); if (rv) { GWEN_Buffer_free(hbuf); GWEN_SyncIo_free(sio); return rv; } GWEN_SyncIo_WriteLine(sio, ""); /* include private functions */ if (strcasecmp(constAcc, "private")==0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (constName) GWEN_SyncIo_WriteString(sio, constName); else GWEN_SyncIo_WriteString(sio, "_new"); GWEN_SyncIo_WriteLine(sio, "(void);"); } /* FromDb */ if (strcasecmp(fromDbAcc, "private")==0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (fromDbName) GWEN_SyncIo_WriteString(sio, fromDbName); else GWEN_SyncIo_WriteString(sio, "_fromDb"); GWEN_SyncIo_WriteLine(sio, "(GWEN_DB_NODE *db);"); } /* dup */ if (strcasecmp(dupAcc, "private")==0) { GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, " *"); GWEN_SyncIo_WriteString(sio, prefix); if (dupName) GWEN_SyncIo_WriteString(sio, dupName); else GWEN_SyncIo_WriteString(sio, "_dup"); GWEN_SyncIo_WriteString(sio, "(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, "*st);"); } if (strcasecmp(nacc, "private")==0) { GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_free("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_Attach("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); /* ReadDb */ GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_ReadDb("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st, GWEN_DB_NODE *db);"); /* ToDb */ GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_toDb(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteString(sio, "*st, GWEN_DB_NODE *db);"); GWEN_SyncIo_WriteString(sio, "int "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_IsModified(const "); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st);"); GWEN_SyncIo_WriteString(sio, "void "); GWEN_SyncIo_WriteString(sio, prefix); GWEN_SyncIo_WriteString(sio, "_SetModified("); GWEN_SyncIo_WriteString(sio, id); GWEN_SyncIo_WriteLine(sio, " *st, int i);"); } rv=write_h_setget_c(args, node, sio, "private"); if (rv) { GWEN_Buffer_free(hbuf); GWEN_SyncIo_free(sio); return rv; } /* write trailing endif */ err=GWEN_SyncIo_WriteLine(sio, ""); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteString(sio, "#endif /* "); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteString(sio, GWEN_Buffer_GetStart(hbuf)); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_WriteLine(sio, " */"); if (err) { DBG_ERROR_ERR(0, err); GWEN_Buffer_free(hbuf); return -1; } err=GWEN_SyncIo_Disconnect(sio); if (err) { DBG_ERROR_ERR(0, err); GWEN_SyncIo_free(sio); GWEN_Buffer_free(hbuf); return -1; } GWEN_Buffer_free(hbuf); return 0; } int write_hp_files_c(ARGUMENTS *args, GWEN_XMLNODE *node) { GWEN_XMLNODE *n; int rv; n=GWEN_XMLNode_FindFirstTag(node, "type", 0, 0); while (n) { rv=write_hp_file_c(args, n); if (rv) return rv; n=GWEN_XMLNode_FindNextTag(n, "type", 0, 0); } return 0; } gwenhywfar-5.12.1/tools/typemaker/README0000644000175000017500000000160213142134464014724 00000000000000 This tool generates source and header files for simple data containers from XML files. It creates fromDb and toDb functions for structs and getters and setters for any member. This makes it easier to maintain data containers with many members (as in AB_TRANSACTION). A member you add to the XML file will immidiately be loaded, saved, destroyed and copied with the rest of the struct upon request (e.g. _fromDb() will load all members from a GWEN_DB). The current version creates a C file and headers for it. Maybe I will later write code to create C++ files as well. It also creates appropriate API documentation if provided with the source XML file. Usage: typemaker [-d DOMAIN] infile1 infile2 [...] infileN Domain is the name of the API, e.g. for AqBanking you would choose AQBANKING_API, for Gwen GWENHYWFAR_API etc. This is used with the list and heritage macros. Martin Preuss gwenhywfar-5.12.1/tools/gcttool/0000755000175000017500000000000015032533715013601 500000000000000gwenhywfar-5.12.1/tools/gcttool/activatekey.c0000644000175000017500000001103413142134476016176 00000000000000/*************************************************************************** begin : Thu Jun 24 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int activateKey(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; unsigned int keyId; int rv; const char *s; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyId", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "key", /* long option */ "Key id", /* short description */ "Key id" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } keyId=GWEN_DB_GetIntValue(db, "keyId", 0, 0); if (keyId==0) { DBG_ERROR(0, "Key Id must not be zero"); return 1; } s=GWEN_DB_GetCharValue(db, "algo", 0, "rsa"); if (!s) { DBG_ERROR(0, "Algo id missing"); return 1; } ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 1, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { /* activate key */ rv=GWEN_Crypt_Token_ActivateKey(ct, keyId, 0); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Error activating key (%d)", rv); return 3; } } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } fprintf(stderr, "Key %d successfully activated.\n", keyId); return 0; } gwenhywfar-5.12.1/tools/gcttool/setkey.c0000644000175000017500000001576713142134476015212 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int setKey(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; unsigned int keyId; int seq; int keyNum; int keyVer; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyId", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "key", /* long option */ "Key id (0 for any)", /* short description */ "Key id (0 for any)" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyNum", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "keynum", /* long option */ "Key number", /* short description */ "Key number" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyVer", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "keyver", /* long option */ "Key version", /* short description */ "Key version" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "seq", /* name */ 0, /* minnum */ 1, /* maxnum */ "s", /* short option */ "seq", /* long option */ "New sequence counter value", /* short description */ "New sequence counter value" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } keyId=GWEN_DB_GetIntValue(db, "keyId", 0, 0); seq=GWEN_DB_GetIntValue(db, "seq", 0, -1); keyNum=GWEN_DB_GetIntValue(db, "keyNum", 0, -1); keyVer=GWEN_DB_GetIntValue(db, "keyVer", 0, -1); ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { const GWEN_CRYPT_TOKEN_KEYINFO *ki; ki=GWEN_Crypt_Token_GetKeyInfo(ct, keyId, GWEN_CRYPT_TOKEN_KEYFLAGS_HASSIGNCOUNTER, 0); if (ki) { GWEN_CRYPT_TOKEN_KEYINFO *nki; nki=GWEN_Crypt_Token_KeyInfo_dup(ki); if (seq!=-1) { GWEN_Crypt_Token_KeyInfo_SetSignCounter(nki, seq); fprintf(stderr, "Setting signature counter\n"); } if (keyNum!=-1) { fprintf(stderr, "Setting key number\n"); GWEN_Crypt_Token_KeyInfo_AddFlags(nki, GWEN_CRYPT_TOKEN_KEYFLAGS_HASKEYNUMBER); GWEN_Crypt_Token_KeyInfo_SetKeyNumber(nki, keyNum); } if (keyVer!=-1) { fprintf(stderr, "Setting key version\n"); GWEN_Crypt_Token_KeyInfo_AddFlags(nki, GWEN_CRYPT_TOKEN_KEYFLAGS_HASKEYVERSION); GWEN_Crypt_Token_KeyInfo_SetKeyVersion(nki, keyVer); } /* store key info */ rv=GWEN_Crypt_Token_SetKeyInfo(ct, keyId, nki, 0); GWEN_Crypt_Token_KeyInfo_free(nki); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Unable to set modify key information (%d)", rv); return 4; } } } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } return 0; } gwenhywfar-5.12.1/tools/gcttool/create.c0000644000175000017500000000760213142134476015136 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include int createToken(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_PLUGIN_MANAGER *pm; GWEN_PLUGIN *pl; GWEN_CRYPT_TOKEN *ct; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ pm=GWEN_PluginManager_FindPluginManager(GWEN_CRYPT_TOKEN_PLUGIN_TYPENAME); if (pm==0) { DBG_ERROR(0, "Plugin manager not found"); return 3; } pl=GWEN_PluginManager_GetPlugin(pm, ttype); if (pl==0) { DBG_ERROR(0, "Plugin not found"); return 3; } DBG_ERROR(0, "Plugin found"); ct=GWEN_Crypt_Token_Plugin_CreateToken(pl, tname); if (ct==0) { DBG_ERROR(0, "Could not create crypt token"); return 3; } /* create crypt token */ rv=GWEN_Crypt_Token_Create(ct, 0); if (rv) { DBG_ERROR(0, "Could not create token"); return 3; } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } return 0; } gwenhywfar-5.12.1/tools/gcttool/globals.h0000644000175000017500000000323713142134464015320 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GCTTOOL_GLOBALS_H #define GCTTOOL_GLOBALS_H #include #include #include #include #include #include #include #include #include #include #include #define GCT_LOGDOMAIN "gcttool" #include "src/base/i18n_l.h" GWEN_CRYPT_TOKEN *getCryptToken(const char *ttype, const char *tname); int createToken(GWEN_DB_NODE *dbArgs, int argc, char **argv); int showUser(GWEN_DB_NODE *dbArgs, int argc, char **argv); int showKey(GWEN_DB_NODE *dbArgs, int argc, char **argv); int genKey(GWEN_DB_NODE *dbArgs, int argc, char **argv); int activateKey(GWEN_DB_NODE *dbArgs, int argc, char **argv); int updateToken(GWEN_DB_NODE *dbArgs, int argc, char **argv); int setSignSeq(GWEN_DB_NODE *dbArgs, int argc, char **argv); int setKey(GWEN_DB_NODE *dbArgs, int argc, char **argv); int changePin(GWEN_DB_NODE *dbArgs, int argc, char **argv); int hashTree(GWEN_DB_NODE *dbArgs, int argc, char **argv); int checkTree(GWEN_DB_NODE *dbArgs, int argc, char **argv); int showPasswords(GWEN_DB_NODE *dbArgs, int argc, char **argv); #endif /* GCTTOOL_GLOBALS_H */ gwenhywfar-5.12.1/tools/gcttool/main.c0000664000175000017500000001712614274772135014632 00000000000000/*************************************************************************** begin : Tue May 03 2005 copyright : (C) 2005-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif /*#define GCT_IS_EXPERIMENTAL #define DEBUG_GCT_TOOL */ #include #include #include #include "funcs.h" #include "globals.h" #ifdef OS_WIN32 # define DIRSEP "\\" #else # define DIRSEP "/" #endif #ifdef HAVE_I18N # include # include #endif #ifdef HAVE_OPENSSL # include # include # include # include #endif #ifdef HAVE_OPENSSL int getKeyDataFromTextOpenSSL(GWEN_UNUSED GWEN_GUI *gui, const char *password, unsigned char *buffer, unsigned int bsize) { DES_cblock left, right; int i; if (bsize!=16) { DBG_ERROR(GWEN_LOGDOMAIN, "Buffer must be exact 16 bytes in length"); return -1; } DES_string_to_2keys(password, &left, &right); for (i=0; i<8; i++) *(buffer++)=left[i]; for (i=0; i<8; i++) *(buffer++)=right[i]; return 0; } #endif GWEN_CRYPT_TOKEN *getCryptToken(const char *ttype, const char *tname) { GWEN_PLUGIN_MANAGER *pm; GWEN_PLUGIN *pl; GWEN_CRYPT_TOKEN *ct; /* get crypt token */ pm=GWEN_PluginManager_FindPluginManager("ct"); if (pm==0) { DBG_ERROR(0, "Plugin manager not found"); return NULL; } pl=GWEN_PluginManager_GetPlugin(pm, ttype); if (pl==0) { DBG_ERROR(0, "Plugin not found"); fprintf(stderr, "%s", I18N("The plugin could not be found.\n" "Please make sure that you have the following " "packages installed (at least on Debian/Ubuntu):\n" "- libchipcard-plugins-libgwenhywfar (for chipcards)\n" "- libaqbanking-plugins-libgwenhywfar\n")); return NULL; } DBG_INFO(0, "Plugin found"); ct=GWEN_Crypt_Token_Plugin_CreateToken(pl, tname); if (ct==0) { DBG_ERROR(0, "Could not create crypt token"); return NULL; } return ct; } int main(int argc, char **argv) { GWEN_DB_NODE *db; const char *cmd; int rv; int err; GWEN_GUI *gui; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "cfgfile", /* name */ 0, /* minnum */ 1, /* maxnum */ "C", /* short option */ "cfgfile", /* long option */ "Specify the configuration file", /* short description */ "Specify the configuration file" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "forcePin", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "forcepin", /* long option */ "force pin entry", /* short description */ "force pin entry even if the error counter is not zero" }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; const GWEN_FUNCS funcs[]= { GWEN_FE_DAH("create", createToken, I18N("This command creates a crypt token")), GWEN_FE_DAH("showuser", showUser, I18N("Display user data stored on the token")), GWEN_FE_DAH("showkey", showKey, I18N("Display key info stored on the token")), GWEN_FE_DAH("genkey", genKey, I18N("Generate keys on crypt token")), GWEN_FE_DAH("activateKey", activateKey, I18N("Activate keys on crypt token")), GWEN_FE_DAH("update", updateToken, I18N("Update Crypt Token to newer version (e.g. OpenHBCI key files")), GWEN_FE_DAH("setsignseq", setSignSeq, I18N("Set signature counter")), GWEN_FE_DAH("changepin", changePin, I18N("Change pin of the crypt token")), GWEN_FE_DA("setkey", setKey), GWEN_FE_DA("hashTree", hashTree), GWEN_FE_DA("checkTree", checkTree), GWEN_FE_DAH("showpasswords", showPasswords, I18N("Display passwords store in a GWEN_PASSWD_STORE file")), GWEN_FE_END(), }; const GWEN_FUNCS *func; err=GWEN_Init(); if (err) { fprintf(stderr, "Could not initialize Gwenhywfar.\n"); return 2; } gui=GWEN_Gui_CGui_new(); GWEN_Gui_SetGui(gui); #ifdef HAVE_OPENSSL /* for conversion purposes */ SSL_load_error_strings(); SSL_library_init(); GWEN_Gui_SetKeyDataFromTextOpenSslFn(gui, getKeyDataFromTextOpenSSL); #endif GWEN_Logger_Open(GCT_LOGDOMAIN, "gct-tool", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User); GWEN_Logger_SetLevel(GCT_LOGDOMAIN, GWEN_LoggerLevel_Warning); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Warning); #ifdef GCT_IS_EXPERIMENTAL fprintf(stderr, "\n"); fprintf(stderr, "\n"); fprintf(stderr, "=================== WARNING ===================\n"); fprintf(stderr, "This tool is still EXPERIMENTAL !!!\n"); fprintf(stderr, "Please DON'T USE it with your daily key files !\n"); fprintf(stderr, "===============================================\n"); fprintf(stderr, "\n"); fprintf(stderr, "\n"); #endif db=GWEN_DB_Group_new("arguments"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM | GWEN_ARGS_MODE_STOP_AT_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments main\n"); return -1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); GWEN_Buffer_AppendString(ubuf, I18N("Usage: ")); GWEN_Buffer_AppendString(ubuf, argv[0]); GWEN_Buffer_AppendString(ubuf, I18N(" [GLOBAL OPTIONS] COMMAND " "[LOCAL OPTIONS]\n")); GWEN_Buffer_AppendString(ubuf, I18N("\nGlobal Options:\n")); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); fprintf(stderr, "%s\n", I18N("\nCommands:\n\n")); GWEN_Funcs_Usage_With_Help(funcs); return 0; } if (rv) { argc-=rv-1; argv+=rv-1; } cmd=GWEN_DB_GetCharValue(db, "params", 0, 0); if (!cmd) { fprintf(stderr, "ERROR: Command needed.\n"); return 1; } func=GWEN_Funcs_Find(funcs, cmd); if (func!=NULL) { rv=GWEN_Funcs_Call_DB_NODE_Args(func, db, argc, argv); } else { fprintf(stderr, "ERROR: Unknown command \"%s\".\n", cmd); rv=1; } err=GWEN_Fini(); if (err) { fprintf(stderr, "WARNING: Could not deinitialize Gwenhywfar.\n"); } return rv; } gwenhywfar-5.12.1/tools/gcttool/setsignseq.c0000644000175000017500000001243713142134476016062 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int setSignSeq(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; unsigned int keyId; unsigned int seq; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyId", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "key", /* long option */ "Key id (0 for any)", /* short description */ "Key id (0 for any)" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "seq", /* name */ 1, /* minnum */ 1, /* maxnum */ "s", /* short option */ "seq", /* long option */ "New sequence counter value", /* short description */ "New sequence counter value" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } keyId=GWEN_DB_GetIntValue(db, "keyId", 0, 0); seq=GWEN_DB_GetIntValue(db, "seq", 0, 0); ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { const GWEN_CRYPT_TOKEN_KEYINFO *ki; ki=GWEN_Crypt_Token_GetKeyInfo(ct, keyId, GWEN_CRYPT_TOKEN_KEYFLAGS_HASSIGNCOUNTER, 0); if (ki) { GWEN_CRYPT_TOKEN_KEYINFO *nki; nki=GWEN_Crypt_Token_KeyInfo_dup(ki); GWEN_Crypt_Token_KeyInfo_SetSignCounter(nki, seq); rv=GWEN_Crypt_Token_SetKeyInfo(ct, keyId, nki, 0); GWEN_Crypt_Token_KeyInfo_free(nki); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Unable to set sign counter (%d)", rv); return 4; } } } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } return 0; } gwenhywfar-5.12.1/tools/gcttool/genkey.c0000644000175000017500000001526313142134476015157 00000000000000/*************************************************************************** begin : Tue May 03 2005 copyright : (C) 2005-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int genKey(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; unsigned int keyId; unsigned int keySize; GWEN_CRYPT_CRYPTALGOID algoId; int rv; const char *s; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyId", /* name */ 1, /* minnum */ 1, /* maxnum */ "k", /* short option */ "key", /* long option */ "Key id", /* short description */ "Key id" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "algo", /* name */ 0, /* minnum */ 1, /* maxnum */ "a", /* short option */ "algo", /* long option */ "Specify the algorithm", /* short description */ "Specify the algorithm" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keysize", /* name */ 0, /* minnum */ 1, /* maxnum */ "s", /* short option */ "keysize", /* long option */ "Key size in bytes", /* short description */ "Key size in bytes" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "exp65537", /* name */ 0, /* minnum */ 1, /* maxnum */ "e", /* short option */ "exp65537", /* long option */ "Use default exponent of 65537", /* short description */ "Use default exponent of 65537" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } keyId=GWEN_DB_GetIntValue(db, "keyId", 0, 0); if (keyId==0) { DBG_ERROR(0, "Key Id must not be zero"); return 1; } s=GWEN_DB_GetCharValue(db, "algo", 0, "rsa"); if (!s) { DBG_ERROR(0, "Algo id missing"); return 1; } algoId=GWEN_Crypt_CryptAlgoId_fromString(s); if (algoId==GWEN_Crypt_CryptAlgoId_Unknown) { DBG_ERROR(0, "Bad algo id [%s]", s); return 1; } keySize=GWEN_DB_GetIntValue(db, "keySize", 0, 96); if (keySize==0) { DBG_ERROR(0, "Invalid key size %d", keySize); return 1; } ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); if (GWEN_DB_GetIntValue(db, "exp65537", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_EXP_65537); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 1, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { GWEN_CRYPT_CRYPTALGO *algo; algo=GWEN_Crypt_CryptAlgo_new(algoId, GWEN_Crypt_CryptMode_None); GWEN_Crypt_CryptAlgo_SetChunkSize(algo, keySize); /* generate key */ rv=GWEN_Crypt_Token_GenerateKey(ct, keyId, algo, 0); if (rv) { DBG_ERROR(GWEN_LOGDOMAIN, "Error generating key (%d)", rv); GWEN_Crypt_CryptAlgo_free(algo); return 3; } } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } fprintf(stderr, "Key %d (%s, %d bytes) successfully generated.\n", keyId, GWEN_Crypt_CryptAlgoId_toString(algoId), keySize); return 0; } gwenhywfar-5.12.1/tools/gcttool/Makefile.in0000644000175000017500000007400015032533615015566 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @IF_HAVE_OPENSSL_TRUE@am__append_1 = $(OPENSSL_CFLAGS) bin_PROGRAMS = gct-tool$(EXEEXT) @IS_WINDOWS_TRUE@am__append_2 = $(PROG_LIBRARIES) noinst_PROGRAMS = cttest$(EXEEXT) @IF_HAVE_OPENSSL_TRUE@am__append_3 = $(OPENSSL_LIBS) subdir = tools/gcttool ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_cttest_OBJECTS = cttest.$(OBJEXT) cttest_OBJECTS = $(am_cttest_OBJECTS) cttest_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_gct_tool_OBJECTS = activatekey.$(OBJEXT) changepin.$(OBJEXT) \ create.$(OBJEXT) genkey.$(OBJEXT) showkey.$(OBJEXT) \ showuser.$(OBJEXT) update.$(OBJEXT) setsignseq.$(OBJEXT) \ setkey.$(OBJEXT) hashtree.$(OBJEXT) checktree.$(OBJEXT) \ showpasswords.$(OBJEXT) main.$(OBJEXT) gct_tool_OBJECTS = $(am_gct_tool_OBJECTS) am__DEPENDENCIES_1 = @IS_WINDOWS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @IF_HAVE_OPENSSL_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) gct_tool_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) gct_tool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(gct_tool_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/activatekey.Po \ ./$(DEPDIR)/changepin.Po ./$(DEPDIR)/checktree.Po \ ./$(DEPDIR)/create.Po ./$(DEPDIR)/cttest.Po \ ./$(DEPDIR)/genkey.Po ./$(DEPDIR)/hashtree.Po \ ./$(DEPDIR)/main.Po ./$(DEPDIR)/setkey.Po \ ./$(DEPDIR)/setsignseq.Po ./$(DEPDIR)/showkey.Po \ ./$(DEPDIR)/showpasswords.Po ./$(DEPDIR)/showuser.Po \ ./$(DEPDIR)/update.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(cttest_SOURCES) $(gct_tool_SOURCES) DIST_SOURCES = $(cttest_SOURCES) $(gct_tool_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \ -I$(gwenhywfar_symlinkdir) -I$(top_srcdir)/src/base \ $(am__append_1) noinst_HEADERS = \ globals.h gct_tool_SOURCES = \ activatekey.c \ changepin.c \ create.c \ genkey.c \ showkey.c \ showuser.c \ update.c \ setsignseq.c \ setkey.c \ hashtree.c \ checktree.c \ showpasswords.c \ main.c gct_tool_LDADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__append_2) $(am__append_3) @IS_WINDOWS_TRUE@gct_tool_LDFLAGS = -mconsole cttest_SOURCES = cttest.c cttest_LDADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) @i18n_libs@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/gcttool/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/gcttool/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cttest$(EXEEXT): $(cttest_OBJECTS) $(cttest_DEPENDENCIES) $(EXTRA_cttest_DEPENDENCIES) @rm -f cttest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cttest_OBJECTS) $(cttest_LDADD) $(LIBS) gct-tool$(EXEEXT): $(gct_tool_OBJECTS) $(gct_tool_DEPENDENCIES) $(EXTRA_gct_tool_DEPENDENCIES) @rm -f gct-tool$(EXEEXT) $(AM_V_CCLD)$(gct_tool_LINK) $(gct_tool_OBJECTS) $(gct_tool_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activatekey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/changepin.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checktree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cttest.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genkey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashtree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setkey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsignseq.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/showkey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/showpasswords.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/showuser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/activatekey.Po -rm -f ./$(DEPDIR)/changepin.Po -rm -f ./$(DEPDIR)/checktree.Po -rm -f ./$(DEPDIR)/create.Po -rm -f ./$(DEPDIR)/cttest.Po -rm -f ./$(DEPDIR)/genkey.Po -rm -f ./$(DEPDIR)/hashtree.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/setkey.Po -rm -f ./$(DEPDIR)/setsignseq.Po -rm -f ./$(DEPDIR)/showkey.Po -rm -f ./$(DEPDIR)/showpasswords.Po -rm -f ./$(DEPDIR)/showuser.Po -rm -f ./$(DEPDIR)/update.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/activatekey.Po -rm -f ./$(DEPDIR)/changepin.Po -rm -f ./$(DEPDIR)/checktree.Po -rm -f ./$(DEPDIR)/create.Po -rm -f ./$(DEPDIR)/cttest.Po -rm -f ./$(DEPDIR)/genkey.Po -rm -f ./$(DEPDIR)/hashtree.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/setkey.Po -rm -f ./$(DEPDIR)/setsignseq.Po -rm -f ./$(DEPDIR)/showkey.Po -rm -f ./$(DEPDIR)/showpasswords.Po -rm -f ./$(DEPDIR)/showuser.Po -rm -f ./$(DEPDIR)/update.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile sources: for f in $(gct_tool_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/gcttool/hashtree.c0000644000175000017500000000704213142134476015474 00000000000000/*************************************************************************** begin : Tue Jun 01 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include #include int hashTree(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *folder; GWEN_MDIGEST *md; GWEN_STRINGLIST *sl; GWEN_STRINGLISTENTRY *se; GWEN_BUFFER *tbuf; FILE *f; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "folder", /* name */ 1, /* minnum */ 1, /* maxnum */ "d", /* short option */ "dir", /* long option */ "Specify folder to hash", /* short description */ "Specify folder to hash" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } folder=GWEN_DB_GetCharValue(db, "folder", 0, NULL); assert(folder); /* hash */ sl=GWEN_StringList_new(); md=GWEN_MDigest_Rmd160_new(); rv=GWEN_MDigest_HashFileTree(md, folder, "checksums.rmd", sl); if (rv<0) { fprintf(stderr, "ERROR: Could not hash folder tree (%d)\n", rv); return 2; } /* write checksum file */ tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, folder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S "checksums.rmd"); f=fopen(GWEN_Buffer_GetStart(tbuf), "w+"); if (f==NULL) { fprintf(stderr, "ERROR: Could not open output file: %s\n", strerror(errno)); return 2; } se=GWEN_StringList_FirstEntry(sl); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) fprintf(f, "%s\n", s); se=GWEN_StringListEntry_Next(se); } GWEN_MDigest_free(md); GWEN_StringList_free(sl); if (fclose(f)) { fprintf(stderr, "ERROR: Could not close output file: %s\n", strerror(errno)); return 2; } GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/gcttool/showkey.c0000644000175000017500000002203313412721014015345 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int showKey(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; unsigned int keyId; int shown=0; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "keyId", /* name */ 0, /* minnum */ 1, /* maxnum */ "k", /* short option */ "key", /* long option */ "Key id (0 for any)", /* short description */ "Key id (0 for any)" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } keyId=GWEN_DB_GetIntValue(db, "keyId", 0, 0); ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { uint32_t keyIds[64]; uint32_t keyCount; uint32_t i; keyCount=64; rv=GWEN_Crypt_Token_GetKeyIdList(ct, keyIds, &keyCount, 0); if (rv<0) { DBG_ERROR(0, "Error filling key list"); GWEN_Crypt_Token_Close(ct, 0, 0); return 3; } for (i=0; i>=1; } } fprintf(stdout, "Modulus : (%d bits)\n", nbits); while (len) { uint32_t rl; rl=(len>16)?16:len; GWEN_Text_ToHexBuffer((const char *)p, rl, tbuf, 2, ' ', 0); fprintf(stdout, " %s\n", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); p+=rl; len-=rl; } GWEN_Buffer_free(tbuf); } if (flags & GWEN_CRYPT_TOKEN_KEYFLAGS_HASEXPONENT) { GWEN_BUFFER *tbuf; const char *p; uint32_t len; tbuf=GWEN_Buffer_new(0, 256, 0, 1); fprintf(stdout, "Exponent : \n"); p=(const char *)GWEN_Crypt_Token_KeyInfo_GetExponentData(ki); len=GWEN_Crypt_Token_KeyInfo_GetExponentLen(ki); while (len) { uint32_t rl; rl=(len>16)?16:len; GWEN_Text_ToHexBuffer(p, rl, tbuf, 2, ' ', 0); fprintf(stdout, " %s\n", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); p+=rl; len-=rl; } GWEN_Buffer_free(tbuf); } shown++; } } } } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } if (!shown) { if (keyId==0) { DBG_ERROR(0, "No key found"); } else { DBG_ERROR(0, "Key %u not found", keyId); } return 1; } return 0; } gwenhywfar-5.12.1/tools/gcttool/cttest.c0000666000175000017500000004153713553076353015217 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: main.c 1107 2007-01-07 21:17:05Z martin $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "src/base/i18n_l.h" #ifdef OS_WIN32 # define DIRSEP "\\" #else # define DIRSEP "/" #endif #ifdef HAVE_I18N # include # include #endif #define GCT_LOGDOMAIN "GCT" //#define DEBUG_GCT_TOOL int signWithNew(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_PLUGIN_MANAGER *pm; GWEN_PLUGIN *pl; GWEN_CRYPT_TOKEN *ct; /* unsigned int cid; */ int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "contextId", /* name */ 0, /* minnum */ 1, /* maxnum */ "i", /* short option */ "id", /* long option */ "Context id (0 for any)", /* short description */ "Context id (0 for any)" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } /* cid=GWEN_DB_GetIntValue(db, "contextId", 0, 0); */ ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ pm=GWEN_PluginManager_FindPluginManager("ct"); if (pm==0) { DBG_ERROR(0, "Plugin manager not found"); return 3; } pl=GWEN_PluginManager_GetPlugin(pm, ttype); if (pl==0) { DBG_ERROR(0, "Plugin not found"); return 3; } DBG_INFO(0, "Plugin found"); ct=GWEN_Crypt_Token_Plugin_CreateToken(pl, tname); if (ct==0) { DBG_ERROR(0, "Could not create crypt token"); return 3; } if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { uint8_t clearText[20]= { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14 }; uint8_t signature[256]; uint32_t signLen; GWEN_CRYPT_PADDALGO *algo; algo=GWEN_Crypt_PaddAlgo_new(GWEN_Crypt_PaddAlgoId_Iso9796_1A4); signLen=sizeof(signature); rv=GWEN_Crypt_Token_Sign(ct, 0x81, /* local sign key */ algo, clearText, 20, signature, &signLen, NULL, 0); if (rv) { DBG_ERROR(0, "Could not sign data (%d)", rv); return 3; } fprintf(stderr, "Signature is:\n"); GWEN_Text_DumpString((const char *) signature, signLen, 2); rv=GWEN_Crypt_Token_Verify(ct, 0x81, algo, clearText, 20, signature, signLen, 0, 0); if (rv) { DBG_ERROR(0, "Could not verify data (%d)", rv); return 3; } fprintf(stderr, "Signature is ok.\n"); } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } return 0; } int cryptWithNew(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_PLUGIN_MANAGER *pm; GWEN_PLUGIN *pl; GWEN_CRYPT_TOKEN *ct; /* unsigned int cid; */ int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "contextId", /* name */ 0, /* minnum */ 1, /* maxnum */ "i", /* short option */ "id", /* long option */ "Context id (0 for any)", /* short description */ "Context id (0 for any)" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } /* cid=GWEN_DB_GetIntValue(db, "contextId", 0, 0); */ ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ pm=GWEN_PluginManager_FindPluginManager("ct"); if (pm==0) { DBG_ERROR(0, "Plugin manager not found"); return 3; } pl=GWEN_PluginManager_GetPlugin(pm, ttype); if (pl==0) { DBG_ERROR(0, "Plugin not found"); return 3; } DBG_INFO(0, "Plugin found"); ct=GWEN_Crypt_Token_Plugin_CreateToken(pl, tname); if (ct==0) { DBG_ERROR(0, "Could not create crypt token"); return 3; } if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { uint8_t clearText[16]= { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }; uint8_t encrypted[128]; uint32_t elen; uint8_t decrypted[128]; uint32_t dlen; GWEN_CRYPT_PADDALGO *algo; algo=GWEN_Crypt_PaddAlgo_new(GWEN_Crypt_PaddAlgoId_LeftZero); elen=sizeof(encrypted); rv=GWEN_Crypt_Token_Encipher(ct, 0x86, algo, clearText, 16, encrypted, &elen, 0); if (rv) { DBG_ERROR(0, "Could not encipher data (%d)", rv); return 3; } fprintf(stderr, "Encrypted data is:\n"); GWEN_Text_DumpString((const char *) encrypted, elen, 2); dlen=sizeof(decrypted); rv=GWEN_Crypt_Token_Decipher(ct, 0x86, algo, encrypted, elen, decrypted, &dlen, 0); if (rv) { DBG_ERROR(0, "Could not decipher data (%d)", rv); return 3; } if (memcmp(clearText, decrypted, dlen)) { DBG_ERROR(0, "Deciphered data does not equal clear text(%d)", rv); return 3; } fprintf(stderr, "Deciphered data is ok.\n"); } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } return 0; } int main(int argc, char **argv) { GWEN_DB_NODE *db; const char *cmd; int rv; int err; GWEN_GUI *gui; GWEN_STRINGLIST *slist; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "cfgfile", /* name */ 0, /* minnum */ 1, /* maxnum */ "C", /* short option */ "cfgfile", /* long option */ "Specify the configuration file", /* short description */ "Specify the configuration file" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "forcePin", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "forcepin", /* long option */ "force pin entry", /* short description */ "force pin entry even if the error counter is not zero" }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; err=GWEN_Init(); if (err) { fprintf(stderr, "Could not initialize Gwenhywfar.\n"); return 2; } gui=GWEN_Gui_CGui_new(); GWEN_Gui_SetGui(gui); slist = GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_LOCALEDIR); assert(GWEN_StringList_Count(slist) > 0); #ifdef HAVE_I18N { const char *localedir = GWEN_StringList_FirstString(slist); setlocale(LC_ALL, ""); if (bindtextdomain(PACKAGE, localedir)==0) fprintf(stderr, "Error binding locale\n"); } #endif GWEN_StringList_free(slist); GWEN_Logger_Open(GCT_LOGDOMAIN, "gct-tool", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User); #ifdef DEBUG_GCT_TOOL GWEN_Logger_SetLevel(GCT_LOGDOMAIN, GWEN_LoggerLevel_Info); GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Debug); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); #else GWEN_Logger_SetLevel(GCT_LOGDOMAIN, GWEN_LoggerLevel_Warning); GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Warning); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Warning); #endif #ifdef GCT_IS_EXPERIMENTAL fprintf(stderr, "\n"); fprintf(stderr, "\n"); fprintf(stderr, "=================== WARNING ===================\n"); fprintf(stderr, "This tool is still EXPERIMENTAL !!!\n"); fprintf(stderr, "Please DON'T USE it with your daily key files !\n"); fprintf(stderr, "===============================================\n"); fprintf(stderr, "\n"); fprintf(stderr, "\n"); #endif db=GWEN_DB_Group_new("arguments"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM | GWEN_ARGS_MODE_STOP_AT_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments main\n"); return -1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); GWEN_Buffer_AppendString(ubuf, I18N("Usage: ")); GWEN_Buffer_AppendString(ubuf, argv[0]); GWEN_Buffer_AppendString(ubuf, I18N(" [GLOBAL OPTIONS] COMMAND " "[LOCAL OPTIONS]\n")); GWEN_Buffer_AppendString(ubuf, I18N("\nGlobal Options:\n")); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } GWEN_Buffer_AppendString(ubuf, I18N("\nCommands:\n\n")); GWEN_Buffer_AppendString(ubuf, I18N(" create:\n" " This command creates a crypt token" "\n\n")); GWEN_Buffer_AppendString(ubuf, I18N(" showuser:\n" " Display user data stored on the " "token\n\n")); fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } if (rv) { argc-=rv-1; argv+=rv-1; } cmd=GWEN_DB_GetCharValue(db, "params", 0, 0); if (!cmd) { fprintf(stderr, "ERROR: Command needed.\n"); return 1; } if (strcasecmp(cmd, "sign")==0) { rv=signWithNew(db, argc, argv); } else if (strcasecmp(cmd, "crypt")==0) { rv=cryptWithNew(db, argc, argv); } else { fprintf(stderr, "ERROR: Unknown command \"%s\".\n", cmd); rv=1; } err=GWEN_Fini(); if (err) { fprintf(stderr, "WARNING: Could not deinitialize Gwenhywfar.\n"); } return rv; } gwenhywfar-5.12.1/tools/gcttool/showpasswords.c0000644000175000017500000000676113142134476016626 00000000000000/*************************************************************************** begin : Mon Oct 10 2016 copyright : (C) 2016 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include //#include //#include //#include #include /* * Show passwords from a GWEN_PASSWD_STORE file. */ int showPasswords(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *file; GWEN_PASSWD_STORE *sto; GWEN_STRINGLIST *sl; GWEN_STRINGLISTENTRY *se; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "file", /* name */ 1, /* minnum */ 1, /* maxnum */ "f", /* short option */ "file", /* long option */ "Specify the password file", /* short description */ "Specify the password file" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } file=GWEN_DB_GetCharValue(db, "file", 0, NULL); assert(file); sto=GWEN_PasswordStore_new(file); sl=GWEN_StringList_new(); rv=GWEN_PasswordStore_GetTokenList(sto, sl); if (rv<0) { fprintf(stderr, "ERROR: Could not get token list: %d\n", rv); GWEN_PasswordStore_free(sto); return 3; } se=GWEN_StringList_FirstEntry(sl); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s && *s) { char passwd[512]; rv=GWEN_PasswordStore_GetPassword(sto, s, passwd, 1, sizeof(passwd)-1); if (rv<0) { fprintf(stderr, "ERROR: Could not get password for token \"%s\": %d\n", s, rv); GWEN_PasswordStore_free(sto); return 3; } passwd[sizeof(passwd)-1]=0; fprintf(stdout, "\"%s\" -> \"%s\"\n", s, passwd); memset(passwd, 0, sizeof(passwd)); } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); GWEN_PasswordStore_free(sto); return 0; } gwenhywfar-5.12.1/tools/gcttool/showuser.c0000644000175000017500000001541413142134476015552 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include int showUser(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; unsigned int cid; int shown=0; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Int, /* type */ "contextId", /* name */ 0, /* minnum */ 1, /* maxnum */ "i", /* short option */ "id", /* long option */ "Context id (0 for any)", /* short description */ "Context id (0 for any)" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } cid=GWEN_DB_GetIntValue(db, "contextId", 0, 0); ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } else { uint32_t ctxIds[32]; uint32_t ctxCount; uint32_t i; ctxCount=32; rv=GWEN_Crypt_Token_GetContextIdList(ct, ctxIds, &ctxCount, 0); if (rv<0) { DBG_ERROR(0, "Error filling context list"); GWEN_Crypt_Token_Close(ct, 0, 0); return 3; } for (i=0; i #endif #include "globals.h" #include #include #include #include #include #include #include #include int checkTree(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *folder; GWEN_MDIGEST *md; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "folder", /* name */ 1, /* minnum */ 1, /* maxnum */ "d", /* short option */ "dir", /* long option */ "Specify folder to check", /* short description */ "Specify folder to check" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } folder=GWEN_DB_GetCharValue(db, "folder", 0, NULL); assert(folder); /* check hash list */ md=GWEN_MDigest_Rmd160_new(); rv=GWEN_MDigest_CheckFileTree(md, folder, "checksums.rmd", 0, 0); if (rv<0) { fprintf(stderr, "ERROR: Integrity check failed"); GWEN_MDigest_free(md); return 2; } GWEN_MDigest_free(md); fprintf(stdout, "All files found (passed)\n"); return 0; } gwenhywfar-5.12.1/tools/gcttool/update.c0000644000175000017500000000741313142134476015155 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int updateToken(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; int rv; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* allow update of key file */ GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_ALLOW_UPDATE); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } fprintf(stderr, "Crypt Token updated.\n"); return 0; } gwenhywfar-5.12.1/tools/gcttool/Makefile.am0000664000175000017500000000164714203137070015560 00000000000000AM_CPPFLAGS= -I$(top_builddir) -I$(top_srcdir) -I$(gwenhywfar_symlinkdir) -I$(top_srcdir)/src/base if IF_HAVE_OPENSSL AM_CPPFLAGS+= $(OPENSSL_CFLAGS) endif #EXTRA_DIST= bin_PROGRAMS=gct-tool noinst_HEADERS=\ globals.h gct_tool_SOURCES=\ activatekey.c \ changepin.c \ create.c \ genkey.c \ showkey.c \ showuser.c \ update.c \ setsignseq.c \ setkey.c \ hashtree.c \ checktree.c \ showpasswords.c \ main.c gct_tool_LDADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) if IS_WINDOWS gct_tool_LDFLAGS=-mconsole gct_tool_LDADD+=$(PROG_LIBRARIES) endif noinst_PROGRAMS=cttest cttest_SOURCES=cttest.c cttest_LDADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) @i18n_libs@ if IF_HAVE_OPENSSL gct_tool_LDADD+=$(OPENSSL_LIBS) endif sources: for f in $(gct_tool_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/tools/gcttool/changepin.c0000644000175000017500000001011613142134476015621 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id: create.c 892 2005-11-03 00:20:45Z aquamaniac $ begin : Tue May 03 2005 copyright : (C) 2005 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "globals.h" #include #include #include #include int changePin(GWEN_DB_NODE *dbArgs, int argc, char **argv) { GWEN_DB_NODE *db; const char *ttype; const char *tname; GWEN_CRYPT_TOKEN *ct; int rv; int admin; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenType", /* name */ 1, /* minnum */ 1, /* maxnum */ "t", /* short option */ "ttype", /* long option */ "Specify the crypt token type", /* short description */ "Specify the crypt token type" /* long description */ }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "tokenName", /* name */ 0, /* minnum */ 1, /* maxnum */ "n", /* short option */ "tname", /* long option */ "Specify the crypt token name", /* short description */ "Specify the crypt token name" /* long description */ }, { 0, /* flags */ GWEN_ArgsType_Int, "admin", 0, 1, "a", "admin", "Change the admin pin instead of the access pin", "Change the admin pin instead of the access pin" }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; db=GWEN_DB_GetGroup(dbArgs, GWEN_DB_FLAGS_DEFAULT, "local"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments\n"); return 1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } ttype=GWEN_DB_GetCharValue(db, "tokenType", 0, 0); assert(ttype); tname=GWEN_DB_GetCharValue(db, "tokenName", 0, 0); admin=GWEN_DB_GetIntValue(db, "admin", 0, 0); /* get crypt token */ ct=getCryptToken(ttype, tname); if (ct==0) return 3; if (GWEN_DB_GetIntValue(dbArgs, "forcePin", 0, 0)) GWEN_Crypt_Token_AddModes(ct, GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY); /* open crypt token for use */ rv=GWEN_Crypt_Token_Open(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not open token"); return 3; } /* change pin */ rv=GWEN_Crypt_Token_ChangePin(ct, admin, 0); if (rv) { DBG_ERROR(0, "Could not change pin"); return 3; } /* close crypt token */ rv=GWEN_Crypt_Token_Close(ct, 0, 0); if (rv) { DBG_ERROR(0, "Could not close token"); return 3; } fprintf(stderr, "Crypt Token updated.\n"); return 0; } gwenhywfar-5.12.1/tools/typemaker2/0000755000175000017500000000000015032533714014210 500000000000000gwenhywfar-5.12.1/tools/typemaker2/Makefile.am0000664000175000017500000000324714156464753016210 00000000000000SUBDIRS=c types AM_CPPFLAGS=@all_includes@ -I$(gwenhywfar_symlinkdir) \ -I$(srcdir)/c \ -I$(builddir)/c typefiles=\ tm_item.xml \ tm_enum.xml \ tm_define.xml \ tm_code.xml \ tm_signal.xml \ tm_slot.xml bin_PROGRAMS=typemaker2 noinst_HEADERS=\ tm_type_p.h tm_type.h \ tm_member_p.h tm_member.h \ tm_header_p.h tm_header.h \ tm_typemanager_p.h tm_typemanager.h \ tm_virtualfn_p.h tm_virtualfn.h \ tm_builder_p.h tm_builder.h \ tm_item_p.h tm_item.h \ tm_enum_p.h tm_enum.h \ tm_define_p.h tm_define.h \ tm_code_p.h tm_code.h \ tm_inline_p.h tm_inline.h \ tm_signal_p.h tm_signal.h \ tm_slot_p.h tm_slot.h \ tm_group_p.h tm_group.h \ tm_util.h \ typemaker2.h typemaker2_SOURCES=\ tm_type.c \ tm_member.c \ tm_header.c \ tm_util.c \ tm_typemanager.c \ tm_builder.c \ tm_item.c \ tm_enum.c \ tm_define.c \ tm_code.c \ tm_inline.c \ tm_virtualfn.c \ tm_signal.c \ tm_slot.c \ tm_group.c \ build.c \ builddefs.c \ main.c # tm_enum.c typemaker2_LDADD=c/libtm2_c.la $(top_builddir)/src/$(gwenhywfar_internal_libname) if IS_WINDOWS typemaker2_LDFLAGS=-mconsole typemaker2_LDADD+= $(PROG_LIBRARIES) endif EXTRA_DIST=$(typefiles) #BUILT_SOURCES= sources: for f in $(typemaker2_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done indent: $(BUILT_SOURCES) $(ASTYLE) \ --style=gnu \ --indent=spaces=2 \ --min-conditional-indent=0 \ --indent-labels \ --pad=oper \ --one-line=keep-blocks \ --suffix=none \ -a -y $(BUILT_SOURCES) types: $(typefiles) ./typemaker2 -I types/c -I $(srcdir) $(typefiles) gwenhywfar-5.12.1/tools/typemaker2/tm_enum.xml0000644000175000017500000000420713142134464016320 00000000000000 TYPEMAKER2_ENUM Typemaker2_Enum tm_enum with_list1 with_xml
tm_item.h
NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const NULL Typemaker2_Item_List_new() public own volatile const dup none NULL NULL public own volatile const dup const NULL NULL public own volatile const dup const
gwenhywfar-5.12.1/tools/typemaker2/types/0000755000175000017500000000000015032533714015354 500000000000000gwenhywfar-5.12.1/tools/typemaker2/types/Makefile.in0000644000175000017500000006045515032533615017353 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/typemaker2/types ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ SUBDIRS = c all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/typemaker2/types/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/typemaker2/types/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile sources: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/typemaker2/types/Makefile.am0000644000175000017500000000002413142134464017323 00000000000000SUBDIRS=c sources: gwenhywfar-5.12.1/tools/typemaker2/types/c/0000755000175000017500000000000015032533715015577 500000000000000gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_buffer.tm20000644000175000017500000000773313377356266020464 00000000000000 GWEN_BUFFER AQDB_DataType_Bin $(dst)=$(preset); GWEN_Buffer_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_Buffer_dup($(src)); if ($(dst) && $(src)) $(retval)=0; else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; if ($(src)) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, GWEN_Buffer_GetUsedBytes($(src))*2, 0, 1); GWEN_Text_ToHexBuffer(GWEN_Buffer_GetStart($(src)), GWEN_Buffer_GetUsedBytes($(src)), tbuf, 0, 0, 0); GWEN_XMLNode_SetCharValue($(db), "$(name)", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", $(default)); if (s) { $(dst)=GWEN_Buffer_new(0, strlen(s)/2, 0, 1); GWEN_Text_FromHexBuffer(s, $(dst)); } } if ($(src)) $(retval)=GWEN_DB_SetBinValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", GWEN_Buffer_GetStart($(src)), GWEN_Buffer_GetUsedBytes($(src))); else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } { const uint8_t *ptr; uint32_t len; ptr=GWEN_DB_GetBinValue($(db), "$(name)", 0, NULL, 0, &len); if (ptr && len) { $(dst)=GWEN_Buffer_new(0, len, 0, 1); GWEN_Buffer_AppendBytes($(dst), (const char*)ptr, len); } } if ($(src)) { $(retval)=AQDB_Object_SetField($(db), $(fieldId), (const uint8_t*) GWEN_Buffer_GetStart($(src)), GWEN_Buffer_GetUsedBytes($(src))); } else $(retval)=AQDB_Object_SetField($(db), $(fieldId), NULL, 0); { uint8_t *p; uint32_t len; $(retval)=AQDB_Object_GetField($(db), $(fieldId), &p, &len); if ($(retval)>=0 && p && len) { $(dst)=GWEN_Buffer_new(0, len, 0, 1); GWEN_Buffer_AppendBytes($(dst), (const char*) p, len); } } NULL NULL own const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/uint32_t_array.tm20000664000175000017500000000763213265727202021024 00000000000000 uint32_t memset($(dst), 0, ($(maxlen))*4); $(dst)=$(src); memmove($(dst), $(src), ($(maxlen))*4); if (*($(dst)) && *($(src))) $(retval)=memcmp($(src), $(dst), ($(maxlen))*4); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; $(api) $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx); $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx) { if (p_struct && (idx < $(maxlen))) return p_struct->$(name)[idx]; return 0; } $(api) int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v); int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v) { if (p_struct && (idx < $(maxlen))) { p_struct->$(name)[idx]=v; return 0; } return GWEN_ERROR_INVALID; } $(api) void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v); void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v) { int i; for(i=0; i < $(maxlen); i++) p_struct->$(name)[i]=v; } NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_db_node.tm20000664000175000017500000000605213377356304020571 00000000000000 GWEN_DB_NODE AQDB_DataType_String $(dst)=$(preset); GWEN_DB_Group_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_DB_Group_dup($(src)); attribute attribute attribute attribute attribute attribute if ($(src)){ GWEN_DB_NODE *dbCopy; dbCopy=GWEN_DB_GetGroup($(db), GWEN_DB_FLAGS_DEFAULT, "$(name)"); assert(dbCopy); $(retval)=GWEN_DB_AddGroupChildren(dbCopy, $(src)); } else { GWEN_DB_DeleteGroup($(db), "$(name)"); $(retval)=0; } { GWEN_DB_NODE *dbSrc; dbSrc=GWEN_DB_GetGroup($(db), GWEN_PATH_FLAGS_NAMEMUSTEXIST, "$(name)"); if (dbSrc) { $(dst)=GWEN_DB_Group_dup(dbSrc); } else $(dst)=NULL; } if ($(src)) { GWEN_Buffer_AppendString($(buffer), GWEN_Date_GetString($(src))); GWEN_DB_WriteToBuffer($(src), $(buffer), GWEN_DB_FLAGS_DEFAULT); } NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/tree_base.tm20000644000175000017500000000404613377356412020107 00000000000000 $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); attribute attribute attribute attribute attribute attribute NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/char.tm20000644000175000017500000000016713142134464017062 00000000000000 char gwenhywfar-5.12.1/tools/typemaker2/types/c/Makefile.am0000664000175000017500000000136314460564441017564 00000000000000 typedatadir=$(datadir)/gwenhywfar/typemaker2/c dist_typedata_DATA=\ char.tm2 \ char_array.tm2 \ char_ptr.tm2 \ double.tm2 \ int.tm2 \ int_base.tm2 \ int_array.tm2 \ gwen_buffer.tm2 \ gwen_date.tm2 \ gwen_timestamp.tm2 \ gwen_idlist64.tm2 \ gwen_time.tm2 \ list1_base.tm2 \ list2_base.tm2 \ struct_base.tm2 \ uint16_t.tm2 \ uint16_t_array.tm2 \ uint32_t.tm2 \ uint32_t_array.tm2 \ uint64_t.tm2 \ tree_base.tm2 \ tree2_base.tm2 \ idmap_base.tm2 \ gwen_multicache.tm2 \ gwen_multicache_type.tm2 \ uint8_t.tm2 \ uint8_t_array.tm2 \ gwen_bindata.tm2 \ double_array.tm2 \ gwen_stringlist2.tm2 \ gwen_db_node.tm2 \ gwen_xmlnode.tm2 \ gwen_xmlnode_list.tm2 \ gwen_xmlnode_list2.tm2 sources: gwenhywfar-5.12.1/tools/typemaker2/types/c/idmap_base.tm20000644000175000017500000000144613377356353020247 00000000000000 $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); NULL NULL const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_idlist64.tm20000644000175000017500000000150113377356314020632 00000000000000 GWEN_IDLIST64 $(dst)=$(preset); GWEN_IdList64_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_IdList64_dup($(src)); NULL NULL const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_xmlnode_list2.tm20000666000175000017500000000034413443310601021742 00000000000000 GWEN_XMLNODE_LIST2 GWEN_XMLNode_List2 gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_date.tm20000644000175000017500000001053513377356276020123 00000000000000 GWEN_DATE AQDB_DataType_Date $(dst)=$(preset); GWEN_Date_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_Date_dup($(src)); if ($(dst) && $(src)) $(retval)=GWEN_Date_Compare($(src), $(dst)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; attribute if ($(src)){ const char *s=GWEN_Date_GetString($(src)); GWEN_XMLNode_SetCharValue($(db), "$(name)", s); } attribute attribute if ($(src)){ const char *s=GWEN_Date_GetString($(src)); GWEN_XMLNode_SetProperty($(db), "$(name)", s); } attribute { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", NULL); if (s && *s) $(dst)=GWEN_Date_fromString(s); } attribute attribute { const char *s; s=GWEN_XMLNode_GetProperty($(db), "$(name)", NULL); if (s && *s) $(dst)=GWEN_Date_fromString(s); } if ($(src)){ const char *s=GWEN_Date_GetString($(src)); $(retval)=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", s); } else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } { const char *s; s=GWEN_DB_GetCharValue($(db), "$(name)", 0, NULL); if (s && *s) $(dst)=GWEN_Date_fromString(s); } if ($(src)){ const char *s=GWEN_Date_GetString($(src)); $(retval)=AQDB_Object_SetFieldString($(db), $(fieldid), s); } else { $(retval)=AQDB_Object_SetFieldString($(db), $(fieldid), NULL); } { const char *s; $(retval)=AQDB_Object_GetFieldString($(db), $(fieldid), &s); if ($(retval)>=0 && s && *s) { $(dst)=GWEN_Date_fromString(s); if ($(dst)==NULL) $(retval)=GWEN_ERROR_BAD_DATA; } else $(retval)=0; } if ($(src)) GWEN_Buffer_AppendString($(buffer), GWEN_Date_GetString($(src))); NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/double_array.tm20000664000175000017500000000766313265727202020633 00000000000000 double memset($(dst), 0, $(maxlen)*sizeof(double)); $(dst)=$(src); memmove($(dst), $(src), $(maxlen)*sizeof(double)); if (*($(dst)) && *($(src))) $(retval)=memcmp($(src), $(dst), $(maxlen)*sizeof(double)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; $(api) $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx); $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx) { if (p_struct && (idx < $(maxlen))) return p_struct->$(name)[idx]; return 0; } $(api) int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v); int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v) { if (p_struct && (idx < $(maxlen))) { p_struct->$(name)[idx]=v; return 0; } return GWEN_ERROR_INVALID; } $(api) void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v); void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v) { int i; for(i=0; i < $(maxlen); i++) p_struct->$(name)[i]=v; } NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/uint16_t_array.tm20000664000175000017500000000763214125675317021033 00000000000000 uint16_t memset($(dst), 0, ($(maxlen))*4); $(dst)=$(src); memmove($(dst), $(src), ($(maxlen))*4); if (*($(dst)) && *($(src))) $(retval)=memcmp($(src), $(dst), ($(maxlen))*4); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; $(api) $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx); $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx) { if (p_struct && (idx < $(maxlen))) return p_struct->$(name)[idx]; return 0; } $(api) int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v); int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v) { if (p_struct && (idx < $(maxlen))) { p_struct->$(name)[idx]=v; return 0; } return GWEN_ERROR_INVALID; } $(api) void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v); void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v) { int i; for(i=0; i < $(maxlen); i++) p_struct->$(name)[i]=v; } NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_multicache_type.tm20000644000175000017500000000303113377356333022350 00000000000000 GWEN_MULTICACHE_TYPE GWEN_MultiCache_Type $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_xmlnode.tm20000666000175000017500000000404313443310601020625 00000000000000 GWEN_XMLNODE AQDB_DataType_String $(dst)=$(preset); GWEN_XMLNode_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_XMLNode_dup($(src)); if ($(src)){ GWEN_XMLNODE *cpy; GWEN_XMLNODE *newNode; cpy=GWEN_XMLNode_dup($(src)); newNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, $(name)); GWEN_XMLNode_AddChild(newNode, cpy); GWEN_XMLNode_AddChild($(db), newNode); } { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetFirstTag($(src)); if (n) $(dst)=GWEN_XMLNode_dup(n); } NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/int.tm20000644000175000017500000000016513142134464016735 00000000000000 int gwenhywfar-5.12.1/tools/typemaker2/types/c/list2_base.tm20000664000175000017500000001206313404775343020204 00000000000000 $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=$(member_prefix)_dup($(src)); { if ($(src)) { GWEN_XMLNODE *dbDest; $(member_basetype_type)_LIST2_ITERATOR *it; dbDest=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(name)"); it=$(member_prefix)_List2__First($(src)); if (it) { $(member_basetype_type) *elem; elem=$(member_prefix)Iterator_Data(it); while(elem) { GWEN_XMLNODE *dbElem; dbElem=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(element_name)"); assert(dbElem); $(member_basetype_prefix)_toXml(elem, dbElem); GWEN_XMLNode_AddChild(dbDest, dbElem); elem=$(member_prefix)Iterator_Next(it); } $(member_prefix)Iterator_free(it); } GWEN_XMLNode_AddChild($(db), dbDest); } } { GWEN_XMLNODE *dbSource; dbSource=GWEN_XMLNode_FindFirstTag($(db), "$(name)", NULL, NULL); if (dbSource) { $(member_type) *t; GWEN_XMLNODE *dbT; t=$(member_prefix)_new(); dbT=GWEN_XMLNode_FindFirstTag(dbSource, "$(element_name)", NULL, NULL); while(dbT) { $(member_basetype_type) *elem; elem=$(member_basetype_prefix)_fromXml(dbT); if (elem) $(member_prefix)_PushBack(t, elem); dbT=GWEN_XMLNode_FindNextTag(dbT, "$(element_name)", NULL, NULL); } $(dst)=t; } else $(dst)=$(preset); } { if ($(src)) { GWEN_DB_NODE *dbDest; $(member_basetype_type)_LIST2_ITERATOR *it; dbDest=GWEN_DB_GetGroup($(db), GWEN_DB_FLAGS_OVERWRITE_GROUPS, "$(name)"); assert(dbDest); it=$(member_prefix)_First($(src)); if (it) { $(member_basetype_type) *elem; $(retval)=0; elem=$(member_prefix)Iterator_Data(it); while(elem) { GWEN_DB_NODE *dbElem; dbElem=GWEN_DB_GetGroup(dbDest, GWEN_PATH_FLAGS_CREATE_GROUP, "$(element_name)"); assert(dbElem); $(retval)=$(member_basetype_prefix)_toDb(elem, dbElem); if ($(retval)<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", $(retval)); break; } elem=$(member_prefix)Iterator_Next(it); } $(member_prefix)Iterator_free(it); } } else $(retval)=0; } { GWEN_DB_NODE *dbSource; dbSource=GWEN_DB_GetGroup($(db), GWEN_PATH_FLAGS_NAMEMUSTEXIST, "$(name)"); if (dbSource) { $(member_type) *t; GWEN_DB_NODE *dbT; t=$(member_prefix)_new(); dbT=GWEN_DB_FindFirstGroup(dbSource, "$(element_name)"); while(dbT) { $(member_basetype_type) *elem; elem=$(member_basetype_prefix)_fromDb(dbT); if (elem) $(member_prefix)_PushBack(t, elem); dbT=GWEN_DB_FindNextGroup(dbT, "$(element_name)"); } $(dst)=t; } else $(dst)=$(preset); } NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/Makefile.in0000644000175000017500000005212615032533615017571 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/typemaker2/types/c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_typedata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(typedatadir)" DATA = $(dist_typedata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ typedatadir = $(datadir)/gwenhywfar/typemaker2/c dist_typedata_DATA = \ char.tm2 \ char_array.tm2 \ char_ptr.tm2 \ double.tm2 \ int.tm2 \ int_base.tm2 \ int_array.tm2 \ gwen_buffer.tm2 \ gwen_date.tm2 \ gwen_timestamp.tm2 \ gwen_idlist64.tm2 \ gwen_time.tm2 \ list1_base.tm2 \ list2_base.tm2 \ struct_base.tm2 \ uint16_t.tm2 \ uint16_t_array.tm2 \ uint32_t.tm2 \ uint32_t_array.tm2 \ uint64_t.tm2 \ tree_base.tm2 \ tree2_base.tm2 \ idmap_base.tm2 \ gwen_multicache.tm2 \ gwen_multicache_type.tm2 \ uint8_t.tm2 \ uint8_t_array.tm2 \ gwen_bindata.tm2 \ double_array.tm2 \ gwen_stringlist2.tm2 \ gwen_db_node.tm2 \ gwen_xmlnode.tm2 \ gwen_xmlnode_list.tm2 \ gwen_xmlnode_list2.tm2 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/typemaker2/types/c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/typemaker2/types/c/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_typedataDATA: $(dist_typedata_DATA) @$(NORMAL_INSTALL) @list='$(dist_typedata_DATA)'; test -n "$(typedatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(typedatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(typedatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typedatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(typedatadir)" || exit $$?; \ done uninstall-dist_typedataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_typedata_DATA)'; test -n "$(typedatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(typedatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(typedatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_typedataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_typedataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_typedataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_typedataDATA .PRECIOUS: Makefile sources: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/typemaker2/types/c/int_base.tm20000644000175000017500000001237713142134464017737 00000000000000 AQDB_DataType_Int $(dst)=$(preset); $(dst)=$(src); $(dst)=$(src); if ($(dst)==$(src)) $(retval)=0; else if ($(src)<$(dst)) $(retval)=-1; else $(retval)=1; enum attribute enum GWEN_XMLNode_SetCharValue($(db), "$(name)", $(enum_tostring_fn)($(src))); enum attribute enum attribute GWEN_XMLNode_SetProperty($(db), "$(name)", $(enum_tostring_fn)($(src))); enum GWEN_XMLNode_SetIntValue($(db), "$(name)", $(src)); enum attribute enum { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", NULL); if (s) $(dst)=$(enum_fromstring_fn)(s); else $(dst)=$(default); } enum attribute enum attribute { const char *s; s=GWEN_XMLNode_GetProperty($(db), "$(name)", NULL); if (s) $(dst)=$(enum_fromstring_fn)(s); else $(dst)=$(default); } enum $(dst)=GWEN_XMLNode_GetIntValue($(db), "$(name)", $(default)); enum enum $(retval)=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", $(enum_tostring_fn)($(src))); enum $(retval)=GWEN_DB_SetIntValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", $(src)); enum enum { const char *s; s=GWEN_DB_GetCharValue($(db), "$(name)", 0, NULL); if (s) $(dst)=$(enum_fromstring_fn)(s); else $(dst)=$(default); } enum $(dst)=GWEN_DB_GetIntValue($(db), "$(name)", 0, $(default)); { int64_t v64=(int64_t) ($(src)); $(retval)=AQDB_Object_SetFieldInt64($(db), $(fieldId), v64); } { int64_t v64; $(retval)=AQDB_Object_GetFieldInt64($(db), $(fieldId), &v64); if ($(retval)>=0) $(dst)=(int) v64; } { char numbuf[32]; snprintf(numbuf, sizeof(numbuf)-1, "%d", $(src)); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString($(buffer), numbuf); } 0 0 gwenhywfar-5.12.1/tools/typemaker2/types/c/uint16_t.tm20000664000175000017500000000017714125675317017632 00000000000000 uint16_t gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_time.tm20000644000175000017500000001170513377356346020142 00000000000000 GWEN_TIME AQDB_DataType_Date $(dst)=$(preset); GWEN_Time_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_Time_dup($(src)); if ($(dst) && $(src)) $(retval)=GWEN_Time_Compare($(src), $(dst)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; attribute if ($(src)){ GWEN_BUFFER *xbuf; int rv; xbuf=GWEN_Buffer_new(0, 32, 0, 1); rv=GWEN_Time_toString($(src), "YYYY/MM/DD-hh:mm", xbuf); if (rv>=0) GWEN_XMLNode_SetCharValue($(db), "$(name)", GWEN_Buffer_GetStart(xbuf)); GWEN_Buffer_free(xbuf); } attribute attribute if ($(src)){ GWEN_BUFFER *xbuf; int rv; xbuf=GWEN_Buffer_new(0, 32, 0, 1); rv=GWEN_Time_toString($(src), "YYYY/MM/DD-hh:mm", xbuf); if (rv>=0) GWEN_XMLNode_SetProperty($(db), "$(name)", GWEN_Buffer_GetStart(xbuf)); GWEN_Buffer_free(xbuf); } attribute { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", NULL); if (s && *s) $(dst)=GWEN_Time_fromString(s, "YYYY/MM/DD-hh:mm"); } attribute attribute { const char *s; s=GWEN_XMLNode_GetProperty($(db), "$(name)", NULL); if (s && *s) $(dst)=GWEN_Time_fromString(s, "YYYY/MM/DD-hh:mm"); } if ($(src)){ GWEN_DB_NODE *dbDest; dbDest=GWEN_DB_GetGroup($(db), GWEN_DB_FLAGS_OVERWRITE_GROUPS, "$(name)"); assert(dbDest); $(retval)=GWEN_Time_toDb($(src), dbDest); } else $(retval)=0; { GWEN_DB_NODE *dbDest; dbDest=GWEN_DB_GetGroup($(db), GWEN_PATH_FLAGS_NAMEMUSTEXIST, "$(name)"); if (dbDest) $(dst)=GWEN_Time_fromDb(dbDest); } if ($(src)){ GWEN_BUFFER *xbuf=GWEN_Buffer_new(0, 64, 0, 1); $(retval)=GWEN_Time_toUtcString($(src), "YYYYMMDD-hhmmss", xbuf); if ($(retval)>=0) $(retval)=AQDB_Object_SetFieldString($(db), $(fieldid), GWEN_Buffer_GetStart(xbuf)); GWEN_Buffer_free(xbuf); } else $(retval)=0; { const char *s; $(retval)=AQDB_Object_GetFieldString($(db), $(fieldid), &s); if ($(retval)>=0 && s && *s) { $(dst)=GWEN_Time_fromUtcString(s, "YYYYMMDD-hhmmss"); if ($(dst)==NULL) $(retval)=GWEN_ERROR_BAD_DATA; } else $(retval)=0; } if ($(src)) GWEN_Time_toUtcString($(src), "YYYY/MM/DD-hh:mm", $(buffer)); NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/uint8_t.tm20000644000175000017500000000017513142134464017536 00000000000000 uint8_t gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_stringlist2.tm20000644000175000017500000000554213377356341021465 00000000000000 GWEN_STRINGLIST2 AQDB_DataType_String $(dst)=$(preset); GWEN_StringList2_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_StringList2_dup($(src)); $(retval)=0; attribute if ($(src)){ GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(name)"); GWEN_StringList2_toXml($(src), n); GWEN_XMLNode_AddChild($(db), n); } attribute { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag($(db), "$(name)", 0, 0); if(n) { $(dst)=GWEN_StringList2_fromXml(n, GWEN_StringList2_IntertMode_AlwaysAdd); } else $(dst)=NULL; } if ($(src)){ $(retval)=GWEN_StringList2_toDb($(src), $(db), "$(name)"); } else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } { $(dst)=GWEN_StringList2_fromDb($(db), "$(name)", GWEN_StringList2_IntertMode_AlwaysAdd); } #error "Not implemented" #error "Not implemented" #error "Not implemented" NULL NULL own assign none const gwenhywfar-5.12.1/tools/typemaker2/types/c/list1_base.tm20000644000175000017500000001117013404775311020172 00000000000000 $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=$(member_prefix)_dup($(src)); { if ($(src)) { GWEN_XMLNODE *dbDest; $(member_basetype_type) *elem; dbDest=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(name)"); elem=$(member_prefix)_First($(src)); while(elem) { GWEN_XMLNODE *dbElem; dbElem=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(element_name)"); assert(dbElem); $(member_basetype_prefix)_toXml(elem, dbElem); GWEN_XMLNode_AddChild(dbDest, dbElem); elem=$(member_prefix)_Next(elem); } GWEN_XMLNode_AddChild($(db), dbDest); } } { GWEN_XMLNODE *dbSource; dbSource=GWEN_XMLNode_FindFirstTag($(db), "$(name)", NULL, NULL); if (dbSource) { $(member_type) *t; GWEN_XMLNODE *dbT; t=$(member_prefix)_new(); dbT=GWEN_XMLNode_FindFirstTag(dbSource, "$(element_name)", NULL, NULL); while(dbT) { $(member_basetype_type) *elem; elem=$(member_basetype_prefix)_fromXml(dbT); if (elem) $(member_prefix)_Add(elem, t); dbT=GWEN_XMLNode_FindNextTag(dbT, "$(element_name)", NULL, NULL); } $(dst)=t; } else $(dst)=$(preset); } { if ($(src)) { GWEN_DB_NODE *dbDest; $(member_basetype_type) *elem; dbDest=GWEN_DB_GetGroup($(db), GWEN_DB_FLAGS_OVERWRITE_GROUPS, "$(name)"); assert(dbDest); $(retval)=0; elem=$(member_prefix)_First($(src)); while(elem) { GWEN_DB_NODE *dbElem; dbElem=GWEN_DB_GetGroup(dbDest, GWEN_PATH_FLAGS_CREATE_GROUP, "$(element_name)"); assert(dbElem); $(retval)=$(member_basetype_prefix)_toDb(elem, dbElem); if ($(retval)<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", $(retval)); break; } elem=$(member_prefix)_Next(elem); } } else $(retval)=0; } { GWEN_DB_NODE *dbSource; dbSource=GWEN_DB_GetGroup($(db), GWEN_PATH_FLAGS_NAMEMUSTEXIST, "$(name)"); if (dbSource) { $(member_type) *t; GWEN_DB_NODE *dbT; t=$(member_prefix)_new(); dbT=GWEN_DB_FindFirstGroup(dbSource, "$(element_name)"); while(dbT) { $(member_basetype_type) *elem; elem=$(member_basetype_prefix)_fromDb(dbT); if (elem) $(member_prefix)_Add(elem, t); dbT=GWEN_DB_FindNextGroup(dbT, "$(element_name)"); } $(dst)=t; } else $(dst)=$(preset); } NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/uint64_t.tm20000644000175000017500000000017713142134464017622 00000000000000 uint64_t gwenhywfar-5.12.1/tools/typemaker2/types/c/uint8_t_array.tm20000664000175000017500000001174113517070611020736 00000000000000 uint8_t memset($(dst), 0, $(maxlen)); $(dst)=$(src); memmove($(dst), $(src), $(maxlen)); if (*($(dst)) && *($(src))) $(retval)=memcmp($(src), $(dst), $(maxlen)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; { int i=0; int result=0; for (i=0; i < $(maxlen); i++) { result=GWEN_DB_SetIntValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", $(src)[i]); } $(retval)=result; } { int i; memset($(dst), 0, ($(maxlen))*sizeof(uint8_t)); for (i=0; i < $(maxlen); i++) { int v; v=GWEN_DB_GetIntValue($(db), "$(name)", i, 0); if (v==0) break; $(dst)[i]=v; } } $(api) $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx); $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx) { if (p_struct && (idx < $(maxlen))) return p_struct->$(name)[idx]; return 0; } $(api) int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v); int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v) { if (p_struct && (idx < $(maxlen))) { p_struct->$(name)[idx]=v; return 0; } return GWEN_ERROR_INVALID; } $(api) void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v); void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v) { memset(p_struct->$(name), v, $(maxlen)); } $(api) int $(struct_prefix)_Get$(nameWithCapital)ArraySize(void); int $(struct_prefix)_Get$(nameWithCapital)ArraySize(void) { return $(maxlen); } NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/char_array.tm20000664000175000017500000001152714460564441020272 00000000000000 char AQDB_DataType_String memset($(dst), 0, $(maxlen)); if ($(src)) { strncpy($(dst), $(src), $(maxlen)-1); ($(dst))[$(maxlen)-1]=0; } else { ($(dst))[0]=0; } if ($(src)) { strncpy($(dst), $(src), $(maxlen)-1); ($(dst))[$(maxlen)-1]=0; } else { ($(dst))[0]=0; } if (*($(dst)) && *($(src))) $(retval)=strncasecmp($(src), $(dst), $(maxlen)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; attribute if (*($(src))) GWEN_XMLNode_SetCharValue($(db), "$(name)", $(src)); attribute attribute if (*($(src))) GWEN_XMLNode_SetProperty($(db), "$(name)", $(src)); attribute { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", $(default)); if (s) strncpy($(dst), s, $(maxlen)); } attribute attribute { const char *s; s=GWEN_XMLNode_GetProperty($(db), "$(name)", $(default)); if (s) strncpy($(dst), s, $(maxlen)); } if (*($(src))) $(retval)=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", $(src)); else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } { const char *s; s=GWEN_DB_GetCharValue($(db), "$(name)", 0, $(default)); if (s) strncpy($(dst), s, $(maxlen)); } if ($(src)) $(retval)=AQDB_Object_SetFieldString($(db), $(fieldId), $(src)); else $(retval)=AQDB_Object_SetFieldString($(db), $(fieldId), NULL); { const char *s; $(retval)=AQDB_Object_GetFieldString($(db), $(fieldId), &s); if ($(retval)>=0 && s) strncpy($(dst), s, $(maxlen)); } with_hashnum if (*($(src))) GWEN_Buffer_AppendString($(buffer), $(src)); with_hashnum with_hashnum if (*($(src))) { const char *tmp_s; tmp_s=$(src); while (*tmp_s=='0') tmp_s++; if (*tmp_s) GWEN_Buffer_AppendString($(buffer), tmp_s); } NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/int_array.tm20000666000175000017500000001160613702435660020145 00000000000000 int memset($(dst), 0, ($(maxlen))*sizeof(int)); $(dst)=$(src); memmove($(dst), $(src), ($(maxlen))*sizeof(int)); if (*($(dst)) && *($(src))) { int i=0; int result=0; while(i < $(maxlen)) { if ( $(src)[i] < $(dst)[i]) { result=-1; break; } else if ( $(src)[i] > $(dst)[i]) { result=1; break; } i++; } $(retval)=result; } else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; { int i=0; int result=0; GWEN_DB_DeleteVar($(db), "$(name)"); for (i=0; i < $(maxlen); i++) { result=GWEN_DB_SetIntValue($(db), 0, "$(name)", $(src)[i]); } $(retval)=result; } { int i; memset($(dst), 0, ($(maxlen))*sizeof(int)); for (i=0; i < $(maxlen); i++) { int v; v=GWEN_DB_GetIntValue($(db), "$(name)", i, 0); if (v==0) break; $(dst)[i]=v; } } $(api) $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx); $(member_basetype_type) $(struct_prefix)_Get$(nameWithCapital)At(const $(struct_type) *p_struct, int idx) { if (p_struct && (idx < $(maxlen))) return p_struct->$(name)[idx]; return 0; } $(api) int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v); int $(struct_prefix)_Set$(nameWithCapital)At($(struct_type) *p_struct, int idx, $(member_basetype_type) v) { if (p_struct && (idx < $(maxlen))) { p_struct->$(name)[idx]=v; return 0; } return GWEN_ERROR_INVALID; } $(api) void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v); void $(struct_prefix)_Preset$(nameWithCapital)($(struct_type) *p_struct, $(member_basetype_type) v) { int i; for(i=0; i < $(maxlen); i++) p_struct->$(name)[i]=v; } NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/uint32_t.tm20000644000175000017500000000017713142134464017615 00000000000000 uint32_t gwenhywfar-5.12.1/tools/typemaker2/types/c/char_ptr.tm20000644000175000017500000001107013377356201017747 00000000000000 char AQDB_DataType_String $(dst)=$(preset); free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=strdup($(src)); if ($(dst) && $(src)) $(retval)=strcasecmp($(src), $(dst)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; attribute GWEN_XMLNode_SetCharValue($(db), "$(name)", $(src)); attribute attribute GWEN_XMLNode_SetProperty($(db), "$(name)", $(src)); attribute { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", $(default)); if (s) $(dst)=strdup(s); } attribute attribute { const char *s; s=GWEN_XMLNode_GetProperty($(db), "$(name)", $(default)); if (s) $(dst)=strdup(s); } if ($(src)) $(retval)=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", $(src)); else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } { const char *s; s=GWEN_DB_GetCharValue($(db), "$(name)", 0, $(default)); if (s) $(dst)=strdup(s); } if ($(src)) $(retval)=AQDB_Object_SetFieldString($(db), $(fieldId), $(src)); else $(retval)=AQDB_Object_SetFieldString($(db), $(fieldId), NULL); { const char *s; $(retval)=AQDB_Object_GetFieldString($(db), $(fieldId), &s); if ($(retval)>=0 && s) $(dst)=strdup(s); } with_hashnum if ($(src)) GWEN_Buffer_AppendString($(buffer), $(src)); with_hashnum with_hashnum if (($(src))) { const char *tmp_s; tmp_s=$(src); while (*tmp_s=='0') tmp_s++; if (*tmp_s) GWEN_Buffer_AppendString($(buffer), tmp_s); } NULL NULL own const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_bindata.tm20000644000175000017500000001321313377356255020601 00000000000000 GWEN_BINDATA AQDB_DataType_Bin $(dst).pointer=NULL; $(dst).length=0; if ($(src).length && $(src).pointer) { free($(src).pointer); } $(src).pointer=NULL; $(src).length=0; $(dst).pointer=$(src).pointer; $(dst).length=$(src).length; if ($(src).length && $(src).pointer) { $(dst).pointer=(uint8_t*) malloc($(src).length); if ($(dst).pointer) { $(dst).length=$(src).length; memmove($(dst).pointer, $(src).pointer, $(src).length); } else { $(dst).pointer=NULL; $(dst).length=0; } } else { $(dst).pointer=NULL; $(dst).length=0; } if (($(src).length == $(dst).length) && $(src).pointer && $(dst).pointer ) $(retval)=memcmp($(src).pointer, $(dst).pointer, $(maxlen)); else if ($(src).length>$(dst).length) $(retval)=1; else if ($(dst).length>$(src).length) $(retval)=-1; else $(retval)=0; { if ($(src).length && $(src).pointer) { GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 1024, 0, 1); rv=GWEN_Base64_Encode((const unsigned char*) $(src).pointer, $(src).length, tbuf, 80); if (rv < 0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); } else { GWEN_XMLNode_SetCharValue($(db), "$(name)", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } } } { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", $(default)); if (s) { GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 1024, 0, 1); rv=GWEN_Base64_Decode((const unsigned char*)s, strlen(s), tbuf); if (rv < 0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); } else { char *t; uint32_t len; len=GWEN_Buffer_GetUsedBytes(tbuf); t=GWEN_Buffer_GetStart(tbuf); if (GWEN_Buffer_Relinquish(tbuf) < 0) { uint8_t *dest; dest=(uint8_t*) malloc(len); memmove(dest, t, len); $(dst).pointer=dest; $(dst).length=len; } else { $(dst).pointer=(uint8_t*) t; $(dst).length=len; } } GWEN_Buffer_free(tbuf); } } { if ($(src).length && $(src).pointer) { GWEN_DB_SetBinValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", $(src).pointer, $(src).length); } else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } } { const void *v; unsigned int vlen; v=GWEN_DB_GetBinValue($(db), "$(name)", 0, NULL, 0, &vlen); if (v && vlen) { uint8_t *dest; dest=(uint8_t*) malloc(vlen); memmove(dest, v, vlen); $(dst).pointer=dest; $(dst).length=vlen; } } { if ($(src).length && $(src).pointer) $(retval)=AQDB_Object_SetField($(db), $(fieldId), $(src).pointer, $(src).length); else $(retval)=AQDB_Object_SetField($(db), $(fieldId), NULL, 0); } { uint8_t *data=NULL; uint32_t len=0; int rv; rv=AQDB_Object_GetField($(db), $(fieldId), &data, &len); if (rv < 0) { $(retval)=rv; } else { uint8_t *dest; dest=(uint8_t*) malloc(len); memmove(dest, data, len); $(dst).pointer=dest; $(dst).length=len; } } NULL assign none const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_multicache.tm20000644000175000017500000000301213377356324021306 00000000000000 GWEN_MULTICACHE GWEN_MultiCache $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_timestamp.tm20000664000175000017500000001070514460564441021177 00000000000000 GWEN_TIMESTAMP AQDB_DataType_Int $(dst)=$(preset); GWEN_Timestamp_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=GWEN_Timestamp_dup($(src)); if ($(dst) && $(src)) $(retval)=GWEN_Timestamp_Compare($(src), $(dst)); else if ($(src)) $(retval)=1; else if ($(dst)) $(retval)=-1; else $(retval)=0; attribute if ($(src)){ const char *s=GWEN_Timestamp_GetString($(src)); GWEN_XMLNode_SetCharValue($(db), "$(name)", s); } attribute attribute if ($(src)){ const char *s=GWEN_Timestamp_GetString($(src)); GWEN_XMLNode_SetProperty($(db), "$(name)", s); } attribute { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", NULL); if (s && *s) $(dst)=GWEN_Timestamp_fromString(s); } attribute attribute { const char *s; s=GWEN_XMLNode_GetProperty($(db), "$(name)", NULL); if (s && *s) $(dst)=GWEN_Timestamp_fromString(s); } if ($(src)){ const char *s=GWEN_Timestamp_GetString($(src)); $(retval)=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", s); } else { GWEN_DB_DeleteVar($(db), "$(name)"); $(retval)=0; } { const char *s; s=GWEN_DB_GetCharValue($(db), "$(name)", 0, NULL); if (s && *s) $(dst)=GWEN_Timestamp_fromString(s); } if ($(src)){ int64_t v; v=GWEN_Timestamp_toInt64($(src)); $(retval)=AQDB_Object_SetFieldInt64($(db), $(fieldid), v); } else { $(retval)=AQDB_Object_SetFieldInt64($(db), $(fieldid), 0); } { int64_t v=0; $(retval)=AQDB_Object_GetFieldInt64($(db), $(fieldid), &v); if ($(retval)>=0 && v>0) { $(dst)=GWEN_Timestamp_fromInt64(v); if ($(dst)==NULL) $(retval)=GWEN_ERROR_BAD_DATA; } else $(retval)=0; } if ($(src)) GWEN_Buffer_AppendString($(buffer), GWEN_Timestamp_GetString($(src))); NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/double.tm20000644000175000017500000000656414465452032017431 00000000000000 AQDB_DataType_String double $(dst)=$(preset); $(dst)=$(src); $(dst)=$(src); if ($(dst)==$(src)) $(retval)=0; else if ($(src)<$(dst)) $(retval)=-1; else $(retval)=1; { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "%f", $(src)); numbuf[sizeof(numbuf)-1]=0; GWEN_XMLNode_SetCharValue($(db), "$(name)", numbuf); } { const char *s; s=GWEN_XMLNode_GetCharValue($(db), "$(name)", NULL); if (s) { double v; if (sscanf(s, "%lf", &v)==1) $(dst)=v; else $(dst)=$(default); } else $(dst)=$(default); } { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "%f", $(src)); numbuf[sizeof(numbuf)-1]=0; $(retval)=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(name)", numbuf); } { const char *s; s=GWEN_DB_GetCharValue($(db), "$(name)", 0, NULL); if (s) { double v; if (sscanf(s, "%lf", &v)==1) $(dst)=v; else $(dst)=$(default); } else $(dst)=$(default); } { $(retval)=AQDB_Object_SetFieldDouble($(db), $(fieldId), $(src)); } { double v; $(retval)=AQDB_Object_GetFieldDouble($(db), $(fieldId), &v); if ($(retval)>=0) $(dst)=v; } { char numbuf[32]; snprintf(numbuf, sizeof(numbuf)-1, "%f", $(src)); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString($(buffer), numbuf); } 0.0 0.0 gwenhywfar-5.12.1/tools/typemaker2/types/c/struct_base.tm20000644000175000017500000000532713404774215020473 00000000000000 $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); $(dst)=$(member_prefix)_dup($(src)); { if ($(src)) { GWEN_XMLNODE *dbDest; dbDest=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(name)"); $(member_prefix)_toXml($(src), dbDest); GWEN_XMLNode_AddChild($(db), dbDest); } } { GWEN_XMLNODE *dbSource; dbSource=GWEN_XMLNode_FindFirstTag($(db), "$(name)", NULL, NULL); if (dbSource) $(dst)=$(member_prefix)_fromXml(dbSource); else $(dst)=$(preset); } { if ($(src)) { GWEN_DB_NODE *dbDest; dbDest=GWEN_DB_GetGroup($(db), GWEN_DB_FLAGS_OVERWRITE_GROUPS, "$(name)"); assert(dbDest); $(retval)=$(member_prefix)_toDb($(src), dbDest); } else $(retval)=0; } { GWEN_DB_NODE *dbSource; dbSource=GWEN_DB_GetGroup($(db), GWEN_PATH_FLAGS_NAMEMUSTEXIST, "$(name)"); if (dbSource) $(dst)=$(member_prefix)_fromDb(dbSource); else $(dst)=$(preset); } $(member_prefix)_toHashString($(src), $(buffer)); NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/tree2_base.tm20000666000175000017500000000404713507362654020176 00000000000000 $(dst)=$(preset); $(member_prefix)_free($(src)); $(src)=NULL; $(dst)=$(src); attribute attribute attribute attribute attribute attribute NULL NULL const dup const const gwenhywfar-5.12.1/tools/typemaker2/types/c/gwen_xmlnode_list.tm20000666000175000017500000000034113443310601021655 00000000000000 GWEN_XMLNODE_LIST GWEN_XMLNode_List gwenhywfar-5.12.1/tools/typemaker2/tm_enum_p.h0000644000175000017500000000126213142134464016264 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_enum.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_ENUM_P_H #define TM_ENUM_P_H #include "tm_enum.h" #ifdef __cplusplus extern "C" { #endif struct TYPEMAKER2_ENUM { GWEN_LIST_ELEMENT(TYPEMAKER2_ENUM) char *id; char *prefix; char *type; TYPEMAKER2_ITEM_LIST *items; /* volatile */ char *toStringFn; /* volatile */ char *fromStringFn; /* volatile */ }; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_virtualfn_p.h0000644000175000017500000000173213142134464017334 00000000000000/*************************************************************************** begin : Mon Jun 28 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_VIRTUALFN_P_H #define TYPEMAKER2_VIRTUALFN_P_H #include "tm_virtualfn.h" struct TYPEMAKER2_VIRTUALFN_PARAM { GWEN_LIST_ELEMENT(TYPEMAKER2_VIRTUALFN_PARAM) char *name; char *type; char *descr; }; struct TYPEMAKER2_VIRTUALFN { GWEN_LIST_ELEMENT(TYPEMAKER2_VIRTUALFN) char *name; char *location; char *descr; int access; uint32_t flags; char *returnType; char *returnTypeDescr; char *defaultReturnValue; char *preset; TYPEMAKER2_VIRTUALFN_PARAM_LIST *paramList; int refCount; }; #endif gwenhywfar-5.12.1/tools/typemaker2/c/0000755000175000017500000000000015032533714014432 500000000000000gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_copy.c0000664000175000017500000001542614144206313016422 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_copy.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addCopyMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addAssignValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addDupValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildCopy(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_copy(%s *p_struct, const %s *p_src);\n", Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_copy(%s *p_struct, const %s *p_src) {\n", Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetIdentifier(ty)); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_src);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { rv=_addCopyMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addCopyMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sMemberName; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_NOCOPY)) { GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); /* TODO: only do this if there is a preset value and it is !=NULL for pointers! */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { rv=TM2C_AddReleaseOldValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) { if (Typemaker2_Member_GetCopyFlags(tm) & TYPEMAKER2_FLAGS_ASSIGN) { rv=_addAssignValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } /* assign */ else { GWEN_Buffer_AppendArgs(tbuf, " if (p_src->%s) {\n", sMemberName); rv=_addDupValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, " }\n"); } } /* if pointer */ else { rv=_addDupValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } } /* if !nocopy */ else { GWEN_Buffer_AppendString(tbuf, " /* member \""); GWEN_Buffer_AppendString(tbuf, sMemberName); GWEN_Buffer_AppendString(tbuf, "\" has nocopy flag, not copying */\n"); } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addAssignValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; const char *sMemberName; sMemberName=Typemaker2_Member_GetName(tm); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_src->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_AssignFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addDupValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; const char *sMemberName; sMemberName=Typemaker2_Member_GetName(tm); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_src->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_DupFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_writedb.h0000664000175000017500000000121014144206313017077 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_WRITEDB_H #define TM2C_WRITEDB_H #include "tm_builder.h" int TM2C_BuildWriteDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildToDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_constructor.c0000664000175000017500000002166714144206313020041 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_constructor.h" #include #include static void _buildPrototypes(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _buildImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static void _addTypeInits(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf); static void _addSignalInits(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf); static void _addSlotInits(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf); static int _addMemberInits(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); static void _addVirtualFns(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); int TM2C_BuildConstructor(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _buildPrototypes(tb, ty); rv=_buildImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _buildPrototypes(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ if (Typemaker2_Type_GetUsePrivateConstructor(ty)) { GWEN_Buffer_AppendString(tbuf, "/** Private constructor. */\n"); } else { GWEN_Buffer_AppendString(tbuf, "/** Constructor. */\n"); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } } s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) GWEN_Buffer_AppendString(tbuf, "_"); GWEN_Buffer_AppendString(tbuf, "_new(void)"); GWEN_Buffer_AppendString(tbuf, ";\n"); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); else Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _buildImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; uint32_t flags; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); flags=Typemaker2_Type_GetFlags(ty); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) GWEN_Buffer_AppendString(tbuf, "_"); GWEN_Buffer_AppendString(tbuf, "_new(void)"); GWEN_Buffer_AppendString(tbuf, " {\n"); GWEN_Buffer_AppendArgs(tbuf, " %s *p_struct;\n\n", Typemaker2_Type_GetIdentifier(ty)); _addTypeInits(ty, flags, tbuf); _addSignalInits(ty, flags, tbuf); _addSlotInits(ty, flags, tbuf); rv=_addMemberInits(tb, ty, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } _addVirtualFns(ty, tbuf); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addTypeInits(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf) { const char *sTypeId; const char *sTypePrefix; sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendArgs(tbuf, " GWEN_NEW_OBJECT(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT) GWEN_Buffer_AppendString(tbuf, " p_struct->_refCount=1;\n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_INHERIT) GWEN_Buffer_AppendArgs(tbuf, " GWEN_INHERIT_INIT(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) GWEN_Buffer_AppendArgs(tbuf, " GWEN_LIST_INIT(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) GWEN_Buffer_AppendArgs(tbuf, " GWEN_TREE_INIT(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) GWEN_Buffer_AppendArgs(tbuf, " GWEN_TREE2_INIT(%s, p_struct, %s)\n", sTypeId, sTypePrefix); } void _addSignalInits(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf) { if ((flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) || (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS)) GWEN_Buffer_AppendString(tbuf, " p_struct->_signalObject=GWEN_SignalObject_new();\n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) { TYPEMAKER2_SIGNAL_LIST *slist; GWEN_Buffer_AppendString(tbuf, " /* generate pre-defined signals */\n"); slist=Typemaker2_Type_GetSignals(ty); if (slist) { TYPEMAKER2_SIGNAL *sig; sig=Typemaker2_Signal_List_First(slist); while (sig) { const char *s; s=Typemaker2_Signal_GetName(sig); GWEN_Buffer_AppendArgs(tbuf, " /* signal \"%s \" */\n", s); GWEN_Buffer_AppendString(tbuf, " GWEN_Signal_new(p_struct->_signalObject, NULL, "); /* name */ GWEN_Buffer_AppendArgs(tbuf, "\"%s\", ", s); /* param type 1 */ s=Typemaker2_Signal_GetParamType1(sig); GWEN_Buffer_AppendArgs(tbuf, "\"%s\", ", s?s:"none"); /* param type 2 */ s=Typemaker2_Signal_GetParamType2(sig); GWEN_Buffer_AppendArgs(tbuf, "\"%s\");\n", s?s:"none"); sig=Typemaker2_Signal_List_Next(sig); } } } } void _addSlotInits(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf) { if (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS) { TYPEMAKER2_SLOT_LIST *slist; GWEN_Buffer_AppendString(tbuf, " /* generate pre-defined slots */\n"); slist=Typemaker2_Type_GetSlots(ty); if (slist) { TYPEMAKER2_SLOT *slot; slot=Typemaker2_Slot_List_First(slist); while (slot) { const char *s; s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendArgs(tbuf, " /* slot \"%s\" */\n", s); GWEN_Buffer_AppendString(tbuf, " GWEN_Slot_new(p_struct->_signalObject, NULL, "); /* name */ GWEN_Buffer_AppendArgs(tbuf, "\"%s\", ", s); /* param type 1 */ s=Typemaker2_Slot_GetParamType1(slot); GWEN_Buffer_AppendArgs(tbuf, "\"%s\", ", s?s:"none"); /* param type 2 */ s=Typemaker2_Slot_GetParamType2(slot); GWEN_Buffer_AppendArgs(tbuf, "\"%s\", ", s?s:"none"); /* callback function */ s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_SlotCallback_"); s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendArgs(tbuf, "%c%s", toupper(*s), (s+1)); GWEN_Buffer_AppendString(tbuf, ", (void*) p_struct);\n"); slot=Typemaker2_Slot_List_Next(slot); } } } } int _addMemberInits(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { TYPEMAKER2_MEMBER_LIST *tml; GWEN_Buffer_AppendString(tbuf, " /* members */\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; int rv; tm=Typemaker2_Member_List_First(tml); while (tm) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *dstbuf; const char *s; dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(dstbuf, "p_struct->"); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendString(dstbuf, s); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ConstructFn(tb, ty, tm, NULL, /* no source */ GWEN_Buffer_GetStart(dstbuf), tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(dstbuf); return rv; } GWEN_Buffer_free(dstbuf); GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } return 0; } void _addVirtualFns(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { TYPEMAKER2_VIRTUALFN_LIST *tvfl; tvfl=Typemaker2_Type_GetVirtualFns(ty); if (tvfl) { TYPEMAKER2_VIRTUALFN *tvf; GWEN_Buffer_AppendString(tbuf, " /* virtual functions */\n"); tvf=Typemaker2_VirtualFn_List_First(tvfl); while (tvf) { const char *fname; const char *fpreset; fname=Typemaker2_VirtualFn_GetName(tvf); fpreset=Typemaker2_VirtualFn_GetPreset(tvf); if (fname && *fname && fpreset && *fpreset) GWEN_Buffer_AppendArgs(tbuf, " p_struct->%c%sFn=%s;\n", tolower(*fname), fname+1, fpreset); tvf=Typemaker2_VirtualFn_List_Next(tvf); } } } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_macros.c0000664000175000017500000000404514144206313016727 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_macros.h" #include "tm2c_misc.h" #include #include int TM2C_BuildMacroFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; uint32_t flags; const char *sTypeId; const char *sTypePrefix; sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* macro functions */\n"); flags=Typemaker2_Type_GetFlags(ty); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) GWEN_Buffer_AppendArgs(tbuf, "GWEN_LIST_FUNCTIONS(%s, %s)\n", sTypeId, sTypePrefix); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) GWEN_Buffer_AppendArgs(tbuf, "GWEN_LIST2_FUNCTIONS(%s, %s)\n", sTypeId, sTypePrefix); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_CONSTLIST2) GWEN_Buffer_AppendArgs(tbuf, "GWEN_CONSTLIST2_FUNCTIONS(%s, %s)\n", sTypeId, sTypePrefix); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) GWEN_Buffer_AppendArgs(tbuf, "GWEN_TREE_FUNCTIONS(%s, %s)\n", sTypeId, sTypePrefix); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) GWEN_Buffer_AppendArgs(tbuf, "GWEN_TREE2_FUNCTIONS(%s, %s)\n", sTypeId, sTypePrefix); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_INHERIT) GWEN_Buffer_AppendArgs(tbuf, "GWEN_INHERIT_FUNCTIONS(%s)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_IDMAP) GWEN_Buffer_AppendArgs(tbuf, "GWEN_IDMAP_FUNCTIONS(%s, %s)\n", sTypeId, sTypePrefix); GWEN_Buffer_AppendString(tbuf, "\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_readobject.h0000664000175000017500000000122714144206313017551 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_READOBJECT_H #define TM2C_READOBJECT_H #include "tm_builder.h" int TM2C_BuildReadObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildFromObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_readdb.c0000664000175000017500000001427714144206313016674 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_readdb.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addReadMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildReadDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "void %s_ReadDb(%s *p_struct, GWEN_DB_NODE *p_db);\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "void %s_ReadDb(%s *p_struct, GWEN_DB_NODE *p_db){\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { rv=_addReadMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addReadMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; int rv; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { rv=TM2C_AddReleaseOldValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } /* read from object */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE) { GWEN_BUFFER *dstbuf; GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" is volatile, just presetting it */\n", sMemberName); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ConstructFn(tb, ty, tm, NULL, GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } else { GWEN_BUFFER *dstbuf; /* not volatile */ dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_FromDbFn(tb, ty, tm, NULL, GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } return 0; } int TM2C_BuildFromDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_fromDb(GWEN_DB_NODE *p_db);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_fromDb(GWEN_DB_NODE *p_db) {\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct;\n"); GWEN_Buffer_AppendString(tbuf, " p_struct="); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) { GWEN_Buffer_AppendByte(tbuf, '_'); } GWEN_Buffer_AppendString(tbuf, "_new();\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_ReadDb(p_struct, p_db);\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_destructor.c0000664000175000017500000001471614144206313017647 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_destructor.h" #include #include static void _addPrototypes(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static void _addFreeHookPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static void _addTypeFinis(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf); static int _addMemberFinis(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); int TM2C_BuildDestructor(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototypes(tb, ty); _addFreeHookPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototypes(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ GWEN_Buffer_AppendString(tbuf, "/** Destructor. */\n"); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "void "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_free("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } void _addFreeHookPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { const char *s; /* insert freeHook prototype, if needed */ s=Typemaker2_Type_GetFreeHook(ty); if (s && *s) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "static void "); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct);\n"); Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; uint32_t flags; const char *sTypeId; const char *sTypePrefix; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); flags=Typemaker2_Type_GetFlags(ty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); /* implementation */ GWEN_Buffer_AppendArgs(tbuf, "void %s_free(%s *p_struct) {\n", sTypePrefix, sTypeId); GWEN_Buffer_AppendString(tbuf, " if (p_struct) {\n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT) { GWEN_Buffer_AppendString(tbuf, " assert(p_struct->_refCount);\n"); GWEN_Buffer_AppendString(tbuf, " if (p_struct->_refCount==1) {\n"); } if ((flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) || (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS)) GWEN_Buffer_AppendString(tbuf, " GWEN_SignalObject_free(p_struct->_signalObject);\n"); /* insert freeHook, if any */ s=Typemaker2_Type_GetFreeHook(ty); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, " %s(p_struct);\n", s); _addTypeFinis(ty, flags, tbuf); rv=_addMemberFinis(tb, ty, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT) { GWEN_Buffer_AppendString(tbuf, " p_struct->_refCount=0;\n"); } GWEN_Buffer_AppendString(tbuf, " GWEN_FREE_OBJECT(p_struct);\n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT) { GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " else\n"); GWEN_Buffer_AppendString(tbuf, " p_struct->_refCount--;\n"); } GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addTypeFinis(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf) { const char *sTypeId; const char *sTypePrefix; sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_INHERIT) GWEN_Buffer_AppendArgs(tbuf, " GWEN_INHERIT_FINI(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) GWEN_Buffer_AppendArgs(tbuf, " GWEN_LIST_FINI(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) GWEN_Buffer_AppendArgs(tbuf, " GWEN_TREE_FINI(%s, p_struct)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) GWEN_Buffer_AppendArgs(tbuf, " GWEN_TREE2_FINI(%s, p_struct, %s)\n", sTypeId, sTypePrefix); } int _addMemberFinis(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { TYPEMAKER2_MEMBER_LIST *tml; GWEN_Buffer_AppendString(tbuf, " /* members */\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { /* destruct, but only if the member is owned */ GWEN_BUFFER *dstbuf; int rv; const char *s; dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(dstbuf, "p_struct->"); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendString(dstbuf, s); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_DestructFn(tb, ty, tm, GWEN_Buffer_GetStart(dstbuf), NULL, /* no dest */ tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(dstbuf); return rv; } GWEN_Buffer_free(dstbuf); GWEN_Buffer_AppendString(tbuf, "\n"); } tm=Typemaker2_Member_List_Next(tm); } } return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm_builder_c.h0000664000175000017500000000110714144206313017147 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_BUILDER_C_H #define TYPEMAKER2_BUILDER_C_H #include "tm_builder.h" TYPEMAKER2_BUILDER *Typemaker2_Builder_C_new(); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_tree2.h0000664000175000017500000000114314144206313016465 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_TREE2_H #define TM2C_TREE2_H #include "tm_builder.h" int TM2C_BuildTree2GetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_writeobject.h0000664000175000017500000000123014144206313017762 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_WRITEOBJECT_H #define TM2C_WRITEOBJECT_H #include "tm_builder.h" int TM2C_BuildWriteObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildToObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_writexml.c0000664000175000017500000001233314144206313017315 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_writexml.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addWriteMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildWriteXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "void %s_WriteXml(const %s *p_struct, GWEN_XMLNODE *p_db);\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "void %s_WriteXml(const %s *p_struct, GWEN_XMLNODE *p_db) {\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { int rv; rv=_addWriteMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addWriteMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE)) { GWEN_BUFFER *srcbuf; int rv; GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ToXmlFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), NULL, tbuf); GWEN_Buffer_free(srcbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } else GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" is volatile, not writing to xml */\n", sMemberName); GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int TM2C_BuildToXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "void "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_toXml(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, GWEN_XMLNODE *p_db);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "void "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_toXml(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, GWEN_XMLNODE *p_db) {\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_WriteXml(p_struct, p_db);\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_virtualfn.c0000664000175000017500000005532114144206313017460 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_virtualfn.h" #include "tm2c_misc.h" #include #include int TM2C_BuildDefineVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *loc) { TYPEMAKER2_VIRTUALFN_LIST *fns; fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (loc && *loc) GWEN_Buffer_AppendArgs(tbuf, "/* definitions for virtual functions (%s) */\n", loc); else GWEN_Buffer_AppendString(tbuf, "/* definitions for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { s=Typemaker2_VirtualFn_GetLocation(vf); if (!(s && *s)) s="pre"; if (s && loc && strcasecmp(s, loc)==0) { int access=Typemaker2_VirtualFn_GetAccess(vf); TYPEMAKER2_VIRTUALFN_PARAM_LIST *plist; int i; GWEN_Buffer_AppendString(tbuf, "typedef "); s=Typemaker2_VirtualFn_GetReturnType(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_VirtualFn_GetFlags(vf) & TYPEMAKER2_FLAGS_GWEN_CB) { GWEN_Buffer_AppendString(tbuf, " GWENHYWFAR_CB"); } GWEN_Buffer_AppendArgs(tbuf, " (*%s_", Typemaker2_Type_GetIdentifier(ty)); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) { GWEN_Buffer_AppendByte(tbuf, toupper(*s)); s++; } GWEN_Buffer_AppendString(tbuf, "_FN)("); if (Typemaker2_VirtualFn_GetFlags(vf) & TYPEMAKER2_FLAGS_CONST) GWEN_Buffer_AppendString(tbuf, "const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct"); plist=Typemaker2_VirtualFn_GetParamTypeList(vf); if (plist) { TYPEMAKER2_VIRTUALFN_PARAM *prm; i=1; prm=Typemaker2_VirtualFn_Param_List_First(plist); while (prm) { const char *paramName; const char *paramType; GWEN_Buffer_AppendString(tbuf, ", "); paramName=Typemaker2_VirtualFn_Param_GetName(prm); paramType=Typemaker2_VirtualFn_Param_GetType(prm); GWEN_Buffer_AppendString(tbuf, paramType); GWEN_Buffer_AppendString(tbuf, " "); if (paramName) GWEN_Buffer_AppendString(tbuf, paramName); else GWEN_Buffer_AppendArgs(tbuf, "param%d", i); prm=Typemaker2_VirtualFn_Param_List_Next(prm); i++; } } GWEN_Buffer_AppendString(tbuf, ");\n"); Typemaker2_Builder_AddDeclaration(tb, access, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); } vf=Typemaker2_VirtualFn_List_Next(vf); } GWEN_Buffer_free(tbuf); } return 0; } int TM2C_BuildProtoVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fns; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* prototypes for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { int access=Typemaker2_VirtualFn_GetAccess(vf); TYPEMAKER2_VIRTUALFN_PARAM_LIST *plist; int i; /* write APIDOC */ GWEN_Buffer_AppendString(tbuf, "/**\n"); s=Typemaker2_VirtualFn_GetDescr(vf); if (s && *s) { int len; GWEN_Buffer_AppendString(tbuf, " * "); GWEN_Buffer_AppendString(tbuf, s); len=strlen(s); if (s[len-1]!='\n') GWEN_Buffer_AppendString(tbuf, "\n"); } s=Typemaker2_VirtualFn_GetReturnTypeDescr(vf); if (s && *s) { int len; GWEN_Buffer_AppendString(tbuf, " * @return "); GWEN_Buffer_AppendString(tbuf, s); len=strlen(s); if (s[len-1]!='\n') GWEN_Buffer_AppendString(tbuf, "\n"); } i=1; plist=Typemaker2_VirtualFn_GetParamTypeList(vf); if (plist) { TYPEMAKER2_VIRTUALFN_PARAM *prm; i=1; prm=Typemaker2_VirtualFn_Param_List_First(plist); while (prm) { const char *paramDescr; paramDescr=Typemaker2_VirtualFn_Param_GetDescr(prm); if (paramDescr && *paramDescr) { const char *paramName; int len; GWEN_Buffer_AppendString(tbuf, " * @param "); paramName=Typemaker2_VirtualFn_Param_GetName(prm); if (paramName) GWEN_Buffer_AppendString(tbuf, paramName); else { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "param%d", i); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString(tbuf, numbuf); } GWEN_Buffer_AppendString(tbuf, " "); GWEN_Buffer_AppendString(tbuf, paramDescr); len=strlen(paramDescr); if (paramDescr[len-1]!='\n') GWEN_Buffer_AppendString(tbuf, "\n"); } i++; prm=Typemaker2_VirtualFn_Param_List_Next(prm); } } GWEN_Buffer_AppendString(tbuf, " */\n"); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } s=Typemaker2_VirtualFn_GetReturnType(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "("); if (Typemaker2_VirtualFn_GetFlags(vf) & TYPEMAKER2_FLAGS_CONST) GWEN_Buffer_AppendString(tbuf, "const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct"); i=1; plist=Typemaker2_VirtualFn_GetParamTypeList(vf); if (plist) { TYPEMAKER2_VIRTUALFN_PARAM *prm; i=1; prm=Typemaker2_VirtualFn_Param_List_First(plist); while (prm) { const char *paramName; const char *paramType; GWEN_Buffer_AppendString(tbuf, ", "); paramName=Typemaker2_VirtualFn_Param_GetName(prm); paramType=Typemaker2_VirtualFn_Param_GetType(prm); GWEN_Buffer_AppendString(tbuf, paramType); GWEN_Buffer_AppendString(tbuf, " "); if (paramName) GWEN_Buffer_AppendString(tbuf, paramName); else { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "param%d", i); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString(tbuf, numbuf); } prm=Typemaker2_VirtualFn_Param_List_Next(prm); i++; } } GWEN_Buffer_AppendString(tbuf, ");\n"); Typemaker2_Builder_AddDeclaration(tb, access, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); vf=Typemaker2_VirtualFn_List_Next(vf); } GWEN_Buffer_free(tbuf); } return 0; } int TM2C_BuildCodeVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fns; fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* code for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { TYPEMAKER2_VIRTUALFN_PARAM_LIST *plist; int i; s=Typemaker2_VirtualFn_GetReturnType(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "("); if (Typemaker2_VirtualFn_GetFlags(vf) & TYPEMAKER2_FLAGS_CONST) GWEN_Buffer_AppendString(tbuf, "const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct"); i=1; plist=Typemaker2_VirtualFn_GetParamTypeList(vf); if (plist) { TYPEMAKER2_VIRTUALFN_PARAM *prm; i=1; prm=Typemaker2_VirtualFn_Param_List_First(plist); while (prm) { const char *paramName; const char *paramType; GWEN_Buffer_AppendString(tbuf, ", "); paramName=Typemaker2_VirtualFn_Param_GetName(prm); paramType=Typemaker2_VirtualFn_Param_GetType(prm); GWEN_Buffer_AppendString(tbuf, paramType); GWEN_Buffer_AppendString(tbuf, " "); if (paramName) GWEN_Buffer_AppendString(tbuf, paramName); else { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "param%d", i); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString(tbuf, numbuf); } prm=Typemaker2_VirtualFn_Param_List_Next(prm); i++; } } GWEN_Buffer_AppendString(tbuf, ") {\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " if (p_struct->"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { DBG_ERROR(0, "Virtual functions has no name"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "Fn)\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct->"); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "Fn(p_struct"); i=1; plist=Typemaker2_VirtualFn_GetParamTypeList(vf); if (plist) { TYPEMAKER2_VIRTUALFN_PARAM *prm; i=1; prm=Typemaker2_VirtualFn_Param_List_First(plist); while (prm) { const char *paramName; GWEN_Buffer_AppendString(tbuf, ", "); paramName=Typemaker2_VirtualFn_Param_GetName(prm); if (paramName) GWEN_Buffer_AppendString(tbuf, paramName); else { char numbuf[64]; snprintf(numbuf, sizeof(numbuf)-1, "param%d", i); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString(tbuf, numbuf); } prm=Typemaker2_VirtualFn_Param_List_Next(prm); i++; } } GWEN_Buffer_AppendString(tbuf, ");\n"); GWEN_Buffer_AppendString(tbuf, " else\n"); GWEN_Buffer_AppendString(tbuf, " return "); s=Typemaker2_VirtualFn_GetDefaultReturnValue(vf); if (!(s && *s)) { DBG_ERROR(0, "No default return value"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, ";\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); vf=Typemaker2_VirtualFn_List_Next(vf); } GWEN_Buffer_free(tbuf); } return 0; } int TM2C_BuildProtoSetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fns; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* setters for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { int access=Typemaker2_VirtualFn_GetAccess(vf); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_Set"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "Fn("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct, "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN fn);\n"); switch (access) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_Reset(tbuf); vf=Typemaker2_VirtualFn_List_Next(vf); } GWEN_Buffer_free(tbuf); } return 0; } int TM2C_BuildSetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fns; fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* setters for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_Set"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "Fn("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct, "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN fn){\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN oldFn;\n\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " oldFn=p_struct->"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "Fn;\n"); GWEN_Buffer_AppendString(tbuf, " p_struct->"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "Fn=fn;\n"); GWEN_Buffer_AppendString(tbuf, " return oldFn;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); vf=Typemaker2_VirtualFn_List_Next(vf); } GWEN_Buffer_free(tbuf); } return 0; } int TM2C_BuildProtoGetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fns; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* getters for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { int access=Typemaker2_VirtualFn_GetAccess(vf); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_Get"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "Fn(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct);\n"); Typemaker2_Builder_AddDeclaration(tb, access, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); vf=Typemaker2_VirtualFn_List_Next(vf); } GWEN_Buffer_free(tbuf); } return 0; } int TM2C_BuildGetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fns; fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN *vf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "/* getters for virtual functions */\n"); vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_Get"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "Fn(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); /* created structs are always pointers */ GWEN_Buffer_AppendString(tbuf, " *p_struct){\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct->"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "Fn;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); vf=Typemaker2_VirtualFn_List_Next(vf); } } return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_setter.h0000664000175000017500000000110414144206313016747 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_SETTER_H #define TM2C_SETTER_H #include "tm_builder.h" int TM2C_BuildSetter(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_object.h0000664000175000017500000000134114144206313016712 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_OBJECT_H #define TM2C_OBJECT_H #include "tm_builder.h" int TM2C_BuildCreateColumnList(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildCreateTable(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildCreateObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_list1.h0000664000175000017500000000141514144206313016502 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_LIST1_H #define TM2C_LIST1_H #include "tm_builder.h" int TM2C_BuildList1GetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); int TM2C_BuildList1Dup(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildList1SortByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_readxml.c0000664000175000017500000001430514144206313017077 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_readxml.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addReadMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildReadXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "void %s_ReadXml(%s *p_struct, GWEN_XMLNODE *p_db);\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "void %s_ReadXml(%s *p_struct, GWEN_XMLNODE *p_db){\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { rv=_addReadMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addReadMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; int rv; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { rv=TM2C_AddReleaseOldValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } /* read from object */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE) { GWEN_BUFFER *dstbuf; GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" is volatile, just presetting it */\n", sMemberName); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ConstructFn(tb, ty, tm, NULL, GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } else { GWEN_BUFFER *dstbuf; /* not volatile */ dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_FromXmlFn(tb, ty, tm, NULL, GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } return 0; } int TM2C_BuildFromXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_fromXml(GWEN_XMLNODE *p_db);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_fromXml(GWEN_XMLNODE *p_db) {\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct;\n"); GWEN_Buffer_AppendString(tbuf, " p_struct="); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) { GWEN_Buffer_AppendByte(tbuf, '_'); } GWEN_Buffer_AppendString(tbuf, "_new();\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_ReadXml(p_struct, p_db);\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_misc.c0000664000175000017500000000320214156464753016411 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_setter.h" #include #include int TM2C_AddReleaseOldValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *srcbuf; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) GWEN_Buffer_AppendArgs(tbuf, " if (p_struct->%s) {\n", Typemaker2_Member_GetName(tm)); /* invoke free */ srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_struct->%s", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_DestructFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), NULL, /* no dest */ tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(srcbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_free(srcbuf); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) { GWEN_Buffer_AppendArgs(tbuf, " p_struct->%s=NULL;\n", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, " }\n"); } return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_dup.h0000664000175000017500000000107314144206313016236 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_DUP_H #define TM2C_DUP_H #include "tm_builder.h" int TM2C_BuildDup(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_slot.h0000664000175000017500000000126414144206313016431 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_SLOT_H #define TM2C_SLOT_H #include "tm_builder.h" int TM2C_BuildSlotFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_AddVirtualFnsFromSlots(TYPEMAKER2_TYPE *ty); void TM2C_DelVirtualFnsFromSlots(TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_tree1.h0000664000175000017500000000114214144206313016463 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_TREE1_H #define TM2C_TREE1_H #include "tm_builder.h" int TM2C_BuildTreeGetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_getter.c0000664000175000017500000001562214144206313016740 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_getter.h" #include #include static void _addSignalObjects(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addMemberProtoTypes(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addFunctionDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildGetter(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_MEMBER_LIST *tml; uint32_t flags; flags=Typemaker2_Type_GetFlags(ty); /* probably add getter for signalObject */ if ((flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) || (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS)) _addSignalObjects(tb, ty); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { if (!(Typemaker2_Member_GetGetFlags(tm) & TYPEMAKER2_FLAGS_OMIT)) { int rv; rv=_addMemberProtoTypes(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } _addMemberImplementation(tb, ty, tm); } tm=Typemaker2_Member_List_Next(tm); } } return 0; } void _addSignalObjects(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPEMANAGER *tym; const char *sTypeId; const char *sTypePrefix; const char *sApi; tym=Typemaker2_Builder_GetTypeManager(tb); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sApi=Typemaker2_TypeManager_GetApiDeclaration(tym); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ if (sApi && *sApi) GWEN_Buffer_AppendArgs(tbuf, "%s ", sApi); GWEN_Buffer_AppendArgs(tbuf, "GWEN_SIGNALOBJECT *%s_GetSignalObject(const %s *p_struct);\n", sTypePrefix, sTypeId); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendArgs(tbuf, "GWEN_SIGNALOBJECT *%s_GetSignalObject(const %s *p_struct) {\n", sTypePrefix, sTypeId); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct->_signalObject;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addMemberProtoTypes(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; GWEN_BUFFER *tbuf; const char *sApi; tym=Typemaker2_Builder_GetTypeManager(tb); sApi=Typemaker2_TypeManager_GetApiDeclaration(tym); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* apidoc */ GWEN_Buffer_AppendArgs(tbuf, "/** Getter.\n" " * Use this function to get the member \"%s\" (see @ref %s_%s)\n*/\n", Typemaker2_Member_GetName(tm), Typemaker2_Type_GetIdentifier(ty), Typemaker2_Member_GetName(tm)); /* prototype */ if (sApi && Typemaker2_Member_GetAccess(tm)<=TypeMaker2_Access_Protected) GWEN_Buffer_AppendArgs(tbuf, "%s ", sApi); _addFunctionDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); switch (Typemaker2_Member_GetAccess(tm)) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_free(tbuf); return 0; } void _addMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *tbuf; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addFunctionDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendArgs(tbuf, " return p_struct->%s;\n", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } void _addFunctionDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; const char *s; sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); /* determine and write return type */ /* const return value? */ if ((Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer || Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) && (Typemaker2_Member_GetGetFlags(tm) & TYPEMAKER2_FLAGS_CONST)) GWEN_Buffer_AppendString(tbuf, "const "); /* enum return value? */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_ENUM) { TYPEMAKER2_ENUM *te; const char *s; te=Typemaker2_Member_GetEnumPtr(tm); assert(te); s=Typemaker2_Enum_GetType(te); if (s && *s) GWEN_Buffer_AppendString(tbuf, s); else { s=Typemaker2_Type_GetIdentifier(mty); GWEN_Buffer_AppendString(tbuf, s); } } else { s=Typemaker2_Type_GetIdentifier(mty); GWEN_Buffer_AppendString(tbuf, s); } GWEN_Buffer_AppendString(tbuf, " "); /* pointer return value? */ if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer || Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) GWEN_Buffer_AppendString(tbuf, "*"); /* function name */ GWEN_Buffer_AppendArgs(tbuf, "%s_Get%c%s(", sTypePrefix, toupper(*sMemberName), sMemberName+1); if (!(Typemaker2_Member_GetGetFlags(tm) & TYPEMAKER2_FLAGS_NOCONSTOBJECT)) GWEN_Buffer_AppendString(tbuf, "const "); GWEN_Buffer_AppendArgs(tbuf, "%s *p_struct)", sTypeId); } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_enums.c0000664000175000017500000003047614144206313016601 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_enums.h" #include "tm2c_misc.h" #include #include int TM2C_BuildDefineEnums(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_ENUM_LIST *enums; enums=Typemaker2_Type_GetEnums(ty); assert(enums); if (Typemaker2_Enum_List_GetCount(enums)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_ENUM *te; tbuf=GWEN_Buffer_new(0, 256, 0, 1); te=Typemaker2_Enum_List_First(enums); while (te) { const char *prefix; const char *etype; TYPEMAKER2_ITEM *ti; int access=TypeMaker2_Access_Public; prefix=Typemaker2_Enum_GetPrefix(te); if (prefix==NULL || *prefix==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No prefix in enum definition"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } etype=Typemaker2_Enum_GetType(te); if (etype && *etype) GWEN_Buffer_AppendString(tbuf, "typedef enum {\n"); else GWEN_Buffer_AppendString(tbuf, "enum {\n"); GWEN_Buffer_AppendString(tbuf, " "); if (prefix) GWEN_Buffer_AppendString(tbuf, prefix); GWEN_Buffer_AppendString(tbuf, "Unknown = -1"); ti=Typemaker2_Item_List_First(Typemaker2_Enum_GetItems(te)); if (ti) GWEN_Buffer_AppendString(tbuf, ","); GWEN_Buffer_AppendString(tbuf, "\n"); while (ti) { GWEN_Buffer_AppendString(tbuf, " "); if (prefix) GWEN_Buffer_AppendString(tbuf, prefix); s=Typemaker2_Item_GetName(ti); if (s && *s) { GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); } s=Typemaker2_Item_GetValue(ti); if (s) { GWEN_Buffer_AppendString(tbuf, " = "); GWEN_Buffer_AppendString(tbuf, s); } ti=Typemaker2_Item_List_Next(ti); if (ti) GWEN_Buffer_AppendString(tbuf, ","); GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, "}"); if (etype && *etype) { GWEN_Buffer_AppendString(tbuf, " "); GWEN_Buffer_AppendString(tbuf, etype); } GWEN_Buffer_AppendString(tbuf, ";\n"); GWEN_Buffer_AppendString(tbuf, "\n"); switch (access) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_Reset(tbuf); te=Typemaker2_Enum_List_Next(te); } } return 0; } int TM2C_SetEnumStringFns(TYPEMAKER2_TYPE *ty) { TYPEMAKER2_ENUM_LIST *enums; /* TYPEMAKER2_TYPEMANAGER *tym; */ /* uint32_t flags; */ /* tym=Typemaker2_Builder_GetTypeManager(tb); */ enums=Typemaker2_Type_GetEnums(ty); /* flags=Typemaker2_Type_GetFlags(ty); */ assert(enums); if (Typemaker2_Enum_List_GetCount(enums)) { TYPEMAKER2_ENUM *te; te=Typemaker2_Enum_List_First(enums); while (te) { const char *prefix; GWEN_BUFFER *tbuf; prefix=Typemaker2_Enum_GetPrefix(te); if (prefix==NULL || *prefix==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No prefix in enum definition"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (prefix && *prefix) { GWEN_Buffer_AppendString(tbuf, prefix); if (prefix[strlen(prefix)-1]!='_') GWEN_Buffer_AppendString(tbuf, "_"); } GWEN_Buffer_AppendString(tbuf, "fromString"); Typemaker2_Enum_SetFromStringFn(te, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); if (prefix && *prefix) { GWEN_Buffer_AppendString(tbuf, prefix); if (prefix[strlen(prefix)-1]!='_') GWEN_Buffer_AppendString(tbuf, "_"); } GWEN_Buffer_AppendString(tbuf, "toString"); Typemaker2_Enum_SetToStringFn(te, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); te=Typemaker2_Enum_List_Next(te); } } return 0; } int TM2C_BuildEnumFromString(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_ENUM_LIST *enums; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); enums=Typemaker2_Type_GetEnums(ty); assert(enums); if (Typemaker2_Enum_List_GetCount(enums)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_ENUM *te; tbuf=GWEN_Buffer_new(0, 256, 0, 1); te=Typemaker2_Enum_List_First(enums); while (te) { const char *prefix; const char *etype; TYPEMAKER2_ITEM *ti; int acc=TypeMaker2_Access_Public; int i; prefix=Typemaker2_Enum_GetPrefix(te); if (prefix==NULL || *prefix==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No prefix in enum definition"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } etype=Typemaker2_Enum_GetType(te); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "%s ", (etype && *etype)?etype:"int"); if (prefix && *prefix) { GWEN_Buffer_AppendString(tbuf, prefix); if (prefix[strlen(prefix)-1]!='_') GWEN_Buffer_AppendString(tbuf, "_"); } GWEN_Buffer_AppendString(tbuf, "fromString(const char *p_s);\n"); switch (acc) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_Reset(tbuf); /* implementation */ if (etype && *etype) GWEN_Buffer_AppendArgs(tbuf, "%s ", etype); else GWEN_Buffer_AppendString(tbuf, "int "); if (prefix && *prefix) { GWEN_Buffer_AppendString(tbuf, prefix); if (prefix[strlen(prefix)-1]!='_') GWEN_Buffer_AppendString(tbuf, "_"); } GWEN_Buffer_AppendString(tbuf, "fromString(const char *p_s) {\n"); GWEN_Buffer_AppendString(tbuf, " if (p_s && *p_s) {\n"); i=0; ti=Typemaker2_Item_List_First(Typemaker2_Enum_GetItems(te)); while (ti) { const char *sItemName; sItemName=Typemaker2_Item_GetName(ti); GWEN_Buffer_AppendString(tbuf, " "); if (i++) GWEN_Buffer_AppendString(tbuf, "else "); GWEN_Buffer_AppendArgs(tbuf, "if (strcasecmp(p_s, \"%s\")==0)\n", sItemName); GWEN_Buffer_AppendArgs(tbuf, " return %s%c%s;\n", prefix, toupper(*sItemName), sItemName+1); ti=Typemaker2_Item_List_Next(ti); } GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendArgs(tbuf, " return %sUnknown;\n", prefix); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); te=Typemaker2_Enum_List_Next(te); } GWEN_Buffer_free(tbuf); } /* if enums */ return 0; } int TM2C_BuildEnumToString(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_ENUM_LIST *enums; TYPEMAKER2_TYPEMANAGER *tym; /* uint32_t flags; */ tym=Typemaker2_Builder_GetTypeManager(tb); enums=Typemaker2_Type_GetEnums(ty); /* flags=Typemaker2_Type_GetFlags(ty); */ assert(enums); if (Typemaker2_Enum_List_GetCount(enums)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_ENUM *te; tbuf=GWEN_Buffer_new(0, 256, 0, 1); te=Typemaker2_Enum_List_First(enums); while (te) { const char *prefix; const char *etype; TYPEMAKER2_ITEM *ti; int acc=TypeMaker2_Access_Public; prefix=Typemaker2_Enum_GetPrefix(te); if (prefix==NULL || *prefix==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No prefix in enum definition"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } etype=Typemaker2_Enum_GetType(te); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "const char *"); if (prefix && *prefix) { GWEN_Buffer_AppendString(tbuf, prefix); if (prefix[strlen(prefix)-1]!='_') GWEN_Buffer_AppendString(tbuf, "_"); } GWEN_Buffer_AppendString(tbuf, "toString("); if (etype && *etype) GWEN_Buffer_AppendString(tbuf, etype); else GWEN_Buffer_AppendString(tbuf, "int"); GWEN_Buffer_AppendString(tbuf, " p_i);\n"); switch (acc) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "const char *"); if (prefix && *prefix) { GWEN_Buffer_AppendString(tbuf, prefix); if (prefix[strlen(prefix)-1]!='_') GWEN_Buffer_AppendString(tbuf, "_"); } GWEN_Buffer_AppendString(tbuf, "toString("); if (etype && *etype) GWEN_Buffer_AppendString(tbuf, etype); else GWEN_Buffer_AppendString(tbuf, "int"); GWEN_Buffer_AppendString(tbuf, " p_i) {\n"); GWEN_Buffer_AppendString(tbuf, " switch(p_i) {\n"); ti=Typemaker2_Item_List_First(Typemaker2_Enum_GetItems(te)); while (ti) { GWEN_Buffer_AppendString(tbuf, " case "); if (prefix) GWEN_Buffer_AppendString(tbuf, prefix); s=Typemaker2_Item_GetName(ti); if (s && *s) { GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); } GWEN_Buffer_AppendString(tbuf, ": return \""); s=Typemaker2_Item_GetName(ti); if (s && *s) { GWEN_Buffer_AppendByte(tbuf, tolower(*s)); GWEN_Buffer_AppendString(tbuf, s+1); } GWEN_Buffer_AppendString(tbuf, "\";\n"); ti=Typemaker2_Item_List_Next(ti); } /* handle "unknown" */ GWEN_Buffer_AppendString(tbuf, " case "); if (prefix) GWEN_Buffer_AppendString(tbuf, prefix); GWEN_Buffer_AppendString(tbuf, "Unknown:\n"); /* handle default */ GWEN_Buffer_AppendString(tbuf, " default: return \"unknown\";\n"); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); te=Typemaker2_Enum_List_Next(te); } GWEN_Buffer_free(tbuf); } /* if enums */ return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_struct.c0000664000175000017500000001501314460564441016776 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_struct.h" #include #include static void _addFlagspecificElements(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf); static int _addMembers(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); static int _addMember(TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addVirtualFunctions(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); int TM2C_BuildStruct(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; uint32_t flags; const char *sTypeId; int rv; int pack; tbuf=GWEN_Buffer_new(0, 256, 0, 1); flags=Typemaker2_Type_GetFlags(ty); sTypeId=Typemaker2_Type_GetIdentifier(ty); pack=Typemaker2_Type_GetPack(ty); if (pack) GWEN_Buffer_AppendArgs(tbuf, "#pragma pack(push, %d)\n", pack); GWEN_Buffer_AppendArgs(tbuf, "struct %s {\n", sTypeId); _addFlagspecificElements(ty, flags, tbuf); if ((flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) || (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS)) GWEN_Buffer_AppendString(tbuf, " GWEN_SIGNALOBJECT *_signalObject;\n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT) GWEN_Buffer_AppendString(tbuf, " int _refCount;\n"); rv=_addMembers(ty, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } rv=_addVirtualFunctions(ty, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "};\n"); if (pack) GWEN_Buffer_AppendArgs(tbuf, "#pragma pack(pop)\n"); /* add to declaration according to structAccess (defaults to "private") */ switch(Typemaker2_Type_GetStructAccess(ty)) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; } GWEN_Buffer_free(tbuf); return 0; } void _addFlagspecificElements(TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf) { const char *sTypeId; sTypeId=Typemaker2_Type_GetIdentifier(ty); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_INHERIT) GWEN_Buffer_AppendArgs(tbuf, " GWEN_INHERIT_ELEMENT(%s)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) GWEN_Buffer_AppendArgs(tbuf, " GWEN_LIST_ELEMENT(%s)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) GWEN_Buffer_AppendArgs(tbuf, " GWEN_TREE_ELEMENT(%s)\n", sTypeId); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) GWEN_Buffer_AppendArgs(tbuf, " GWEN_TREE2_ELEMENT(%s)\n", sTypeId); } int _addMembers(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { TYPEMAKER2_MEMBER_LIST *tml; tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { int rv; rv=_addMember(tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } tm=Typemaker2_Member_List_Next(tm); } } return 0; } int _addMember(TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; int typeIsWritten=0; const char *s; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); GWEN_Buffer_AppendString(tbuf, " "); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_ENUM) { TYPEMAKER2_ENUM *te=Typemaker2_Member_GetEnumPtr(tm); const char *s; if (te==NULL) { DBG_ERROR(0, "No enum name set in definition of member \"%s\"", Typemaker2_Member_GetName(tm)); return GWEN_ERROR_BAD_DATA; } s=Typemaker2_Enum_GetType(te); if (s && *s) { GWEN_Buffer_AppendArgs(tbuf, "%s ", s); typeIsWritten=1; } } if (!typeIsWritten) { if ((Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) && (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_CONST)) GWEN_Buffer_AppendString(tbuf, "const "); s=Typemaker2_Type_GetIdentifier(mty); if (!(s && *s)) { const char *xx; xx=Typemaker2_Member_GetName(tm); DBG_ERROR(0, "Member [%s] has no identifier", xx?xx:"(unnamed)"); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) GWEN_Buffer_AppendString(tbuf, "*"); } s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) GWEN_Buffer_AppendArgs(tbuf, "[%d]", Typemaker2_Member_GetMaxLen(tm)); GWEN_Buffer_AppendString(tbuf, ";"); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE) GWEN_Buffer_AppendString(tbuf, " /* volatile */"); GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addVirtualFunctions(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { TYPEMAKER2_VIRTUALFN_LIST *fns; /* add virtual functions */ fns=Typemaker2_Type_GetVirtualFns(ty); assert(fns); if (Typemaker2_VirtualFn_List_GetCount(fns)) { const char *s; TYPEMAKER2_VIRTUALFN *vf; vf=Typemaker2_VirtualFn_List_First(fns); while (vf) { GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { DBG_ERROR(0, "Virtual function has no name"); return GWEN_ERROR_BAD_DATA; } while (*s) GWEN_Buffer_AppendByte(tbuf, toupper(*(s++))); GWEN_Buffer_AppendString(tbuf, "_FN "); s=Typemaker2_VirtualFn_GetName(vf); if (!(s && *s)) { DBG_ERROR(0, "Virtual function has no name"); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendByte(tbuf, tolower(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "Fn;\n"); vf=Typemaker2_VirtualFn_List_Next(vf); } } return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_typedef.h0000664000175000017500000000110714144206313017104 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_TYPEDEF_H #define TM2C_TYPEDEF_H #include "tm_builder.h" int TM2C_BuildTypedef(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_signal.c0000664000175000017500000002777714144206313016741 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_signal.h" #include "tm2c_misc.h" #include #include int TM2C_BuildSignalFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_SIGNAL_LIST *sigList; const char *sTypeId; const char *sTypePrefix; tym=Typemaker2_Builder_GetTypeManager(tb); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); sigList=Typemaker2_Type_GetSignals(ty); if (sigList) { TYPEMAKER2_SIGNAL *sig; /* prototype */ GWEN_Buffer_AppendString(tbuf, "/* signal functions */\n"); sig=Typemaker2_Signal_List_First(sigList); while (sig) { const char *sSignalName; sSignalName=Typemaker2_Signal_GetName(sig); /* SignalConnect */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "int %s_SignalConnect_%c%s(%s *p_struct, GWEN_SLOT *slot);\n", sTypePrefix, toupper(*sSignalName), sSignalName+1, sTypeId); /* SignalDisconnect */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "int %s_SignalDisconnect_%c%s(%s *p_struct, GWEN_SLOT *slot);\n", sTypePrefix, toupper(*sSignalName), sSignalName+1, sTypeId); /* GetSignal */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "GWEN_SIGNAL *%s_GetSignal_%c%s(const %s *p_struct);\n", sTypePrefix, toupper(*sSignalName), sSignalName+1, sTypeId); /* EmitSignal */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "int %s_EmitSignal_%c%s(%s *p_struct", sTypePrefix, toupper(*sSignalName), sSignalName+1, sTypeId); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ if (s && *s && strcasecmp(s, "none")!=0) GWEN_Buffer_AppendArgs(tbuf, ", %s param1", s); s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ if (s && *s && strcasecmp(s, "none")!=0) GWEN_Buffer_AppendArgs(tbuf, ", %s param2", s); if (Typemaker2_Signal_GetFlags(sig) & TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM3) GWEN_Buffer_AppendString(tbuf, ", int param3"); if (Typemaker2_Signal_GetFlags(sig) & TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM4) GWEN_Buffer_AppendString(tbuf, ", int param4"); GWEN_Buffer_AppendString(tbuf, ");\n"); sig=Typemaker2_Signal_List_Next(sig); } Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "/* signal functions */\n"); sig=Typemaker2_Signal_List_First(sigList); while (sig) { /* SignalConnect */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_SignalConnect_"); s=Typemaker2_Signal_GetName(sig); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, GWEN_SLOT *slot) {\n"); GWEN_Buffer_AppendString(tbuf, " GWEN_SIGNAL *sig;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " sig=GWEN_SignalObject_FindSignal(p_struct->_signalObject, "); s=Typemaker2_Signal_GetName(sig); /* name */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\");\n"); GWEN_Buffer_AppendString(tbuf, " if (sig)\n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_Signal_Connect(sig, slot);\n"); GWEN_Buffer_AppendString(tbuf, " else\n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_ERROR_NOT_FOUND;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); /* SignalDisconnect */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_SignalDisconnect_"); s=Typemaker2_Signal_GetName(sig); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, GWEN_SLOT *slot) {\n"); GWEN_Buffer_AppendString(tbuf, " GWEN_SIGNAL *sig;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " sig=GWEN_SignalObject_FindSignal(p_struct->_signalObject, "); s=Typemaker2_Signal_GetName(sig); /* name */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\");\n"); GWEN_Buffer_AppendString(tbuf, " if (sig)\n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_Signal_Disconnect(sig, slot);\n"); GWEN_Buffer_AppendString(tbuf, " else\n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_ERROR_NOT_FOUND;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); /* GetSignal */ GWEN_Buffer_AppendString(tbuf, "GWEN_SIGNAL *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_GetSignal_"); s=Typemaker2_Signal_GetName(sig); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct) {\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_SignalObject_FindSignal(p_struct->_signalObject, "); s=Typemaker2_Signal_GetName(sig); /* name */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\");\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); /* EmitSignal */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_EmitSignal_"); s=Typemaker2_Signal_GetName(sig); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "("); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct"); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ if (s && *s && strcasecmp(s, "none")) { GWEN_Buffer_AppendString(tbuf, ", "); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " param1"); } s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ if (s && *s && strcasecmp(s, "none")) { GWEN_Buffer_AppendString(tbuf, ", "); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " param2"); } if (Typemaker2_Signal_GetFlags(sig) & TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM3) { GWEN_Buffer_AppendString(tbuf, ", int param3"); } if (Typemaker2_Signal_GetFlags(sig) & TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM4) { GWEN_Buffer_AppendString(tbuf, ", int param4"); } GWEN_Buffer_AppendString(tbuf, "){\n"); GWEN_Buffer_AppendString(tbuf, " GWEN_SIGNAL *sig;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " sig=GWEN_SignalObject_FindSignal(p_struct->_signalObject, "); s=Typemaker2_Signal_GetName(sig); /* name */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\");\n"); GWEN_Buffer_AppendString(tbuf, " if (sig) \n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_Signal_Emit(sig, "); s=Typemaker2_Signal_GetParamType1(sig); /* param 1 */ if (s && *s && strcasecmp(s, "none")) { GWEN_Buffer_AppendString(tbuf, "(void*) "); GWEN_Buffer_AppendString(tbuf, "param1, "); } else GWEN_Buffer_AppendString(tbuf, "NULL, "); s=Typemaker2_Signal_GetParamType2(sig); /* param 2 */ if (s && *s && strcasecmp(s, "none")) { GWEN_Buffer_AppendString(tbuf, "(void*) "); GWEN_Buffer_AppendString(tbuf, " param2, "); } else GWEN_Buffer_AppendString(tbuf, "NULL, "); if (Typemaker2_Signal_GetFlags(sig) & TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM3) GWEN_Buffer_AppendString(tbuf, "param3, "); else GWEN_Buffer_AppendString(tbuf, "0, "); if (Typemaker2_Signal_GetFlags(sig) & TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM4) GWEN_Buffer_AppendString(tbuf, "param4"); else GWEN_Buffer_AppendString(tbuf, "0"); GWEN_Buffer_AppendString(tbuf, ");\n"); GWEN_Buffer_AppendString(tbuf, " else\n"); GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); sig=Typemaker2_Signal_List_Next(sig); } Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); } GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_setter.c0000664000175000017500000003131514144206313016751 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_setter.h" #include "tm2c_misc.h" #include #include static int _addSetterPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static int _addSetterImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addSetterFnDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addDupNewValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addAssignNewValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addFlagFnsPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addFlagFnsImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); int TM2C_BuildSetter(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_MEMBER_LIST *tml; tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { if (!(Typemaker2_Member_GetSetFlags(tm) & TYPEMAKER2_FLAGS_OMIT)) { TYPEMAKER2_TYPE *mty; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); rv=_addSetterPrototype(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_WITH_FLAGS) { /* add special functions for flags */ rv=_addFlagFnsPrototype(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } rv=_addSetterImplementation(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_WITH_FLAGS) _addFlagFnsImplementation(tb, ty, tm); } /* if not OMIT */ tm=Typemaker2_Member_List_Next(tm); } } return 0; } int _addSetterPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; GWEN_BUFFER *tbuf; const char *s; tbuf=GWEN_Buffer_new(0, 256, 0, 1); tym=Typemaker2_Builder_GetTypeManager(tb); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); /* prototype */ GWEN_Buffer_AppendArgs(tbuf, "/** Setter.\n" " * Use this function to set the member \"%s\" (see @ref %s_%s)\n*/\n", Typemaker2_Member_GetName(tm), Typemaker2_Type_GetIdentifier(ty), Typemaker2_Member_GetName(tm)); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && Typemaker2_Member_GetAccess(tm)<=TypeMaker2_Access_Protected) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } _addSetterFnDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); switch (Typemaker2_Member_GetAccess(tm)) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_free(tbuf); return 0; } void _addSetterFnDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *s; mty=Typemaker2_Member_GetTypePtr(tm); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, "void %s_Set%c%s(%s *p_struct, ", Typemaker2_Type_GetPrefix(ty), toupper(*s), s+1, Typemaker2_Type_GetIdentifier(ty)); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_ENUM) { TYPEMAKER2_ENUM *te; const char *s; te=Typemaker2_Member_GetEnumPtr(tm); assert(te); s=Typemaker2_Enum_GetType(te); if (!(s && *s)) s=Typemaker2_Type_GetIdentifier(mty); GWEN_Buffer_AppendArgs(tbuf, "%s p_src", s); } else if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer || Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) { if (Typemaker2_Member_GetSetFlags(tm) & TYPEMAKER2_FLAGS_CONST || Typemaker2_Member_GetSetFlags(tm) & TYPEMAKER2_FLAGS_DUP) GWEN_Buffer_AppendString(tbuf, "const "); GWEN_Buffer_AppendArgs(tbuf, "%s *p_src", Typemaker2_Type_GetIdentifier(mty)); } else { GWEN_Buffer_AppendArgs(tbuf, "%s p_src", Typemaker2_Type_GetIdentifier(mty)); } GWEN_Buffer_AppendString(tbuf, ")"); } int _addSetterImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); /* implementation */ _addSetterFnDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { rv=TM2C_AddReleaseOldValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } /* if own */ if (Typemaker2_Member_GetSetFlags(tm) & (TYPEMAKER2_FLAGS_DUP | TYPEMAKER2_FLAGS_CONST)) { rv=_addDupNewValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } else { rv=_addAssignNewValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addReleaseOldValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *srcbuf; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) GWEN_Buffer_AppendArgs(tbuf, " if (p_struct->%s) {\n", Typemaker2_Member_GetName(tm)); /* invoke free */ srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_struct->%s", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_DestructFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), NULL, /* no dest */ tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(srcbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_free(srcbuf); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) { GWEN_Buffer_AppendString(tbuf, " }\n"); } return 0; } int _addDupNewValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *dstbuf; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) GWEN_Buffer_AppendString(tbuf, " if (p_src) {\n"); /* dup */ dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_DupFn(tb, ty, tm, "p_src", GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) { GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " else {\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct->%s=NULL;\n", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, " }\n"); } #if 0 else { rv=_addAssignNewValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } #endif GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addAssignNewValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *dstbuf; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", Typemaker2_Member_GetName(tm)); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_AssignFn(tb, ty, tm, "p_src", GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addFlagFnsPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; GWEN_BUFFER *tbuf; const char *sApi; const char *s; tbuf=GWEN_Buffer_new(0, 256, 0, 1); tym=Typemaker2_Builder_GetTypeManager(tb); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sApi=Typemaker2_TypeManager_GetApiDeclaration(tym); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, "/** Add flags.\n" " * Use this function to add flags to member \"%s\" (see @ref %s_%s)\n*/\n", Typemaker2_Member_GetName(tm), Typemaker2_Type_GetIdentifier(ty), Typemaker2_Member_GetName(tm)); if (sApi && Typemaker2_Member_GetAccess(tm)<=TypeMaker2_Access_Protected) GWEN_Buffer_AppendArgs(tbuf, "%s ", sApi); GWEN_Buffer_AppendArgs(tbuf, "void %s_Add%c%s(%s *p_struct, %s p_src);\n", Typemaker2_Type_GetPrefix(ty), toupper(*s), s+1, Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetIdentifier(mty)); GWEN_Buffer_AppendArgs(tbuf, "/** Add flags.\n" " * Use this function to add flags to member \"%s\" (see @ref %s_%s)\n*/\n", Typemaker2_Member_GetName(tm), Typemaker2_Type_GetIdentifier(ty), Typemaker2_Member_GetName(tm)); if (sApi && Typemaker2_Member_GetAccess(tm)<=TypeMaker2_Access_Protected) GWEN_Buffer_AppendArgs(tbuf, "%s ", sApi); GWEN_Buffer_AppendArgs(tbuf, "void %s_Sub%c%s(%s *p_struct, %s p_src);\n", Typemaker2_Type_GetPrefix(ty), toupper(*s), s+1, Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetIdentifier(mty)); switch (Typemaker2_Member_GetAccess(tm)) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_free(tbuf); return 0; } void _addFlagFnsImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { TYPEMAKER2_TYPE *mty; GWEN_BUFFER *tbuf; const char *s; tbuf=GWEN_Buffer_new(0, 256, 0, 1); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, "void %s_Add%c%s(%s *p_struct, %s p_src) {\n" " assert(p_struct);\n" " p_struct->%s|=p_src;\n" "}\n", Typemaker2_Type_GetPrefix(ty), toupper(*s), s+1, Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetIdentifier(mty), s); GWEN_Buffer_AppendString(tbuf, "\n\n"); GWEN_Buffer_AppendArgs(tbuf, "void %s_Sub%c%s(%s *p_struct, %s p_src) {\n" " assert(p_struct);\n" " p_struct->%s&=~p_src;\n" "}\n", Typemaker2_Type_GetPrefix(ty), toupper(*s), s+1, Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetIdentifier(mty), s); GWEN_Buffer_AppendString(tbuf, "\n\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_object.c0000664000175000017500000001731214144206313016712 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_object.h" #include "tm2c_misc.h" #include #include int TM2C_BuildCreateColumnList(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_MEMBER_LIST *tml; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "AQDB_COLUMN_LIST *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateColumnList();\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "AQDB_COLUMN_LIST *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateColumnList() {\n"); if (Typemaker2_Type_GetNonVolatileMemberCount(ty)==0) { GWEN_Buffer_AppendString(tbuf, " return NULL;\n"); } else { GWEN_Buffer_AppendString(tbuf, " AQDB_COLUMN_LIST *p_cl;\n"); GWEN_Buffer_AppendString(tbuf, " AQDB_COLUMN *p_c;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " p_cl=AQDB_Column_List_new();\n"); GWEN_Buffer_AppendString(tbuf, "\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { TYPEMAKER2_TYPE *mty; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE)) { char numbuf[32]; int l; GWEN_Buffer_AppendString(tbuf, " /* member \""); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\" */\n"); GWEN_Buffer_AppendString(tbuf, " p_c=AQDB_Column_new("); s=Typemaker2_Type_GetAqDbType(mty); if (s && *s) { GWEN_Buffer_AppendString(tbuf, s); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no AQDB type element"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } GWEN_Buffer_AppendString(tbuf, ", \""); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\", "); l=Typemaker2_Member_GetMaxLen(tm); if (l==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Member [%s] has no maxlen attribute", Typemaker2_Member_GetName(tm)); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } snprintf(numbuf, sizeof(numbuf)-1, "%d", l); numbuf[sizeof(numbuf)-1]=0; GWEN_Buffer_AppendString(tbuf, numbuf); GWEN_Buffer_AppendString(tbuf, ");\n"); GWEN_Buffer_AppendString(tbuf, " AQDB_Column_List_Add(p_c, p_cl);\n"); } else { GWEN_Buffer_AppendString(tbuf, " /* member \""); s=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\" is volatile, not adding to column list */\n"); } GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, " return p_cl;\n"); } GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int TM2C_BuildCreateTable(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateTable(AQDB_DB *p_db, const char *p_name, uint32_t p_flags);"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateTable(AQDB_DB *p_db, const char *p_name, uint32_t p_flags) {\n"); GWEN_Buffer_AppendString(tbuf, " AQDB_COLUMN_LIST *p_cl;\n"); GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " p_cl="); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateColumnList();\n"); GWEN_Buffer_AppendString(tbuf, " p_rv=AQDB_DB_CreateTable(p_db, p_name, p_flags, p_cl);\n"); GWEN_Buffer_AppendString(tbuf, " AQDB_Column_List_free(p_cl);\n"); GWEN_Buffer_AppendString(tbuf, " if (p_rv<0) {\n"); GWEN_Buffer_AppendString(tbuf, " DBG_INFO(GWEN_LOGDOMAIN, \"here (%d)\", p_rv);\n"); GWEN_Buffer_AppendString(tbuf, " return p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int TM2C_BuildCreateObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateObject(AQDB_DB *p_db, AQDB_ID p_tableId, AQDB_ID p_id, AQDB_OBJECT **pp_o);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_CreateObject(AQDB_DB *p_db, AQDB_ID p_tableId, AQDB_ID p_id, AQDB_OBJECT **pp_o) {\n"); GWEN_Buffer_AppendString(tbuf, " AQDB_OBJECT *p_o;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " p_o=AQDB_Object_new(p_tableId, p_id, "); s=Typemaker2_Type_GetFieldCountId(ty); if (s && *s) { } GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, ");\n"); GWEN_Buffer_AppendString(tbuf, " *pp_o=p_o;\n"); GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_list1.c0000664000175000017500000003350214144206313016477 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_list1.h" #include "tm2c_misc.h" #include #include static void _addGetByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static int _addGetByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addGetByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static void _addListDupProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addListDupImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static void _addListDupDeclaration(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); static void _addSortByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addSortByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addSortByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static void _addCompareMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static int _addCompareMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addCompareMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildList1GetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { int rv; _addGetByMemberProtoType(tb, ty, tm); rv=_addGetByMemberImplementation(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int TM2C_BuildList1Dup(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addListDupProtoType(tb, ty); rv=_addListDupImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } int TM2C_BuildList1SortByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { int rv; _addSortByMemberProtoType(tb, ty, tm); _addCompareMemberProtoType(tb, ty, tm); _addSortByMemberImplementation(tb, ty, tm); rv=_addCompareMemberImplementation(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addGetByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; tym=Typemaker2_Builder_GetTypeManager(tb); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); _addGetByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addGetByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addGetByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendArgs(tbuf, " %s *p_struct;\n\n", sTypeId); GWEN_Buffer_AppendString(tbuf, " assert(p_list);\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct = %s_List_First(p_list);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " while(p_struct) {\n"); GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " "); if (1) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(srcbuf, "p_cmp"); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); rv=Typemaker2_Builder_Invoke_CompareFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " if (p_rv == 0)\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct = %s_List_Next(p_struct);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " return NULL;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addGetByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; const char *sMemberTypeId; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); sMemberTypeId=Typemaker2_Type_GetIdentifier(mty); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_List_GetBy%c%s(const %s_LIST *p_list, ", sTypeId, sTypePrefix, toupper(*sMemberName), sMemberName+1, sTypeId); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer || Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) GWEN_Buffer_AppendArgs(tbuf, " const %s *", sMemberTypeId); else GWEN_Buffer_AppendArgs(tbuf, "%s ", sMemberTypeId); GWEN_Buffer_AppendString(tbuf, "p_cmp)"); } void _addListDupDeclaration(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { const char *sTypeId; const char *sTypePrefix; sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendArgs(tbuf, "%s_LIST *%s_List_dup(const %s_LIST *p_src)", sTypeId, sTypePrefix, sTypeId); } void _addListDupProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); _addListDupDeclaration(ty, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addListDupImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *sTypeId; const char *sTypePrefix; sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addListDupDeclaration(ty, tbuf); GWEN_Buffer_AppendString(tbuf, " {\n"); GWEN_Buffer_AppendArgs(tbuf, " %s_LIST *p_dest;\n", sTypeId); GWEN_Buffer_AppendArgs(tbuf, " %s *p_elem;\n", sTypeId); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_src);\n"); GWEN_Buffer_AppendArgs(tbuf, " p_dest=%s_List_new();\n", sTypePrefix); GWEN_Buffer_AppendArgs(tbuf, " p_elem=%s_List_First(p_src);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " while(p_elem) {\n"); GWEN_Buffer_AppendArgs(tbuf, " %s *p_cpy;\n\n", sTypeId); GWEN_Buffer_AppendArgs(tbuf, " p_cpy=%s_dup(p_elem);\n", sTypePrefix); GWEN_Buffer_AppendArgs(tbuf, " %s_List_Add(p_cpy, p_dest);\n", sTypePrefix); GWEN_Buffer_AppendArgs(tbuf, " p_elem=%s_List_Next(p_elem);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " return p_dest;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addSortByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; tym=Typemaker2_Builder_GetTypeManager(tb); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); _addSortByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } void _addSortByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addSortByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendArgs(tbuf, " %s_LIST_SORT_FN oldSortFn;\n", sTypeId); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendArgs(tbuf, " oldSortFn=%s_List_SetSortFn(p_list, %s_List_Compare_%c%s);\n", sTypePrefix, sTypePrefix, toupper(*sMemberName), sMemberName+1); GWEN_Buffer_AppendArgs(tbuf, " %s_List_Sort(p_list, p_ascending);\n", sTypePrefix); GWEN_Buffer_AppendArgs(tbuf, " %s_List_SetSortFn(p_list, oldSortFn);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } void _addSortByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, "void %s_List_SortBy%c%s(%s_LIST *p_list, int p_ascending)", sTypePrefix, toupper(*sMemberName), sMemberName+1, sTypeId); } void _addCompareMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, "static "); _addCompareMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addCompareMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPE *mty; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addCompareMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); if (1) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_a->%s", sMemberName); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_b->%s", sMemberName); rv=Typemaker2_Builder_Invoke_CompareFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " if (p_ascending)\n"); GWEN_Buffer_AppendString(tbuf, " return p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " else\n"); GWEN_Buffer_AppendString(tbuf, " return -p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addCompareMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, "int GWENHYWFAR_CB %s_List_Compare_%c%s(const %s *p_a, const %s *p_b, int p_ascending)", sTypePrefix, toupper(*sMemberName), sMemberName+1, sTypeId, sTypeId); } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_virtualfn.h0000664000175000017500000000207314144206313017461 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_VIRTUALFN_H #define TM2C_VIRTUALFN_H #include "tm_builder.h" int TM2C_BuildDefineVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *loc); int TM2C_BuildProtoVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildCodeVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildProtoSetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildSetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildProtoGetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildGetterVirtualFns(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/Makefile.in0000644000175000017500000007435615032533615016436 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools/typemaker2/c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtm2_c_la_LIBADD = am_libtm2_c_la_OBJECTS = tm_builder_c.lo tm2c_misc.lo tm2c_enums.lo \ tm2c_constructor.lo tm2c_destructor.lo tm2c_dup.lo \ tm2c_copy.lo tm2c_typedef.lo tm2c_struct.lo tm2c_macros.lo \ tm2c_getter.lo tm2c_setter.lo tm2c_readdb.lo tm2c_writedb.lo \ tm2c_readxml.lo tm2c_writexml.lo tm2c_object.lo \ tm2c_readobject.lo tm2c_writeobject.lo tm2c_list1.lo \ tm2c_tree1.lo tm2c_tree2.lo tm2c_signal.lo tm2c_slot.lo \ tm2c_virtualfn.lo libtm2_c_la_OBJECTS = $(am_libtm2_c_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/tm2c_constructor.Plo \ ./$(DEPDIR)/tm2c_copy.Plo ./$(DEPDIR)/tm2c_destructor.Plo \ ./$(DEPDIR)/tm2c_dup.Plo ./$(DEPDIR)/tm2c_enums.Plo \ ./$(DEPDIR)/tm2c_getter.Plo ./$(DEPDIR)/tm2c_list1.Plo \ ./$(DEPDIR)/tm2c_macros.Plo ./$(DEPDIR)/tm2c_misc.Plo \ ./$(DEPDIR)/tm2c_object.Plo ./$(DEPDIR)/tm2c_readdb.Plo \ ./$(DEPDIR)/tm2c_readobject.Plo ./$(DEPDIR)/tm2c_readxml.Plo \ ./$(DEPDIR)/tm2c_setter.Plo ./$(DEPDIR)/tm2c_signal.Plo \ ./$(DEPDIR)/tm2c_slot.Plo ./$(DEPDIR)/tm2c_struct.Plo \ ./$(DEPDIR)/tm2c_tree1.Plo ./$(DEPDIR)/tm2c_tree2.Plo \ ./$(DEPDIR)/tm2c_typedef.Plo ./$(DEPDIR)/tm2c_virtualfn.Plo \ ./$(DEPDIR)/tm2c_writedb.Plo ./$(DEPDIR)/tm2c_writeobject.Plo \ ./$(DEPDIR)/tm2c_writexml.Plo ./$(DEPDIR)/tm_builder_c.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libtm2_c_la_SOURCES) DIST_SOURCES = $(libtm2_c_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ INCLUDES = @all_includes@ -I$(top_builddir) -I../ -I$(srcdir)/../ -I../../ -I$(srcdir)/../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES = libtm2_c.la libtm2_c_la_SOURCES = \ tm_builder_c.c \ tm2c_misc.c \ tm2c_enums.c \ tm2c_constructor.c \ tm2c_destructor.c \ tm2c_dup.c \ tm2c_copy.c \ tm2c_typedef.c \ tm2c_struct.c \ tm2c_macros.c \ tm2c_getter.c \ tm2c_setter.c \ tm2c_readdb.c \ tm2c_writedb.c \ tm2c_readxml.c \ tm2c_writexml.c \ tm2c_object.c \ tm2c_readobject.c \ tm2c_writeobject.c \ tm2c_list1.c \ tm2c_tree1.c \ tm2c_tree2.c \ tm2c_signal.c \ tm2c_slot.c \ tm2c_virtualfn.c noinst_HEADERS = \ tm_builder_c.h \ tm2c_misc.h \ tm2c_enums.h \ tm2c_constructor.h \ tm2c_destructor.h \ tm2c_dup.h \ tm2c_copy.h \ tm2c_typedef.h \ tm2c_struct.h \ tm2c_macros.h \ tm2c_getter.h \ tm2c_setter.h \ tm2c_readdb.h \ tm2c_writedb.h \ tm2c_readxml.h \ tm2c_writexml.h \ tm2c_object.h \ tm2c_readobject.h \ tm2c_writeobject.h \ tm2c_list1.h \ tm2c_tree1.h \ tm2c_tree2.h \ tm2c_signal.h \ tm2c_slot.h \ tm2c_virtualfn.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/typemaker2/c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/typemaker2/c/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libtm2_c.la: $(libtm2_c_la_OBJECTS) $(libtm2_c_la_DEPENDENCIES) $(EXTRA_libtm2_c_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtm2_c_la_OBJECTS) $(libtm2_c_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_constructor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_copy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_destructor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_dup.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_enums.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_getter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_list1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_macros.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_misc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_readdb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_readobject.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_readxml.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_setter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_signal.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_slot.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_struct.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_tree1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_tree2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_typedef.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_virtualfn.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_writedb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_writeobject.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm2c_writexml.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_builder_c.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/tm2c_constructor.Plo -rm -f ./$(DEPDIR)/tm2c_copy.Plo -rm -f ./$(DEPDIR)/tm2c_destructor.Plo -rm -f ./$(DEPDIR)/tm2c_dup.Plo -rm -f ./$(DEPDIR)/tm2c_enums.Plo -rm -f ./$(DEPDIR)/tm2c_getter.Plo -rm -f ./$(DEPDIR)/tm2c_list1.Plo -rm -f ./$(DEPDIR)/tm2c_macros.Plo -rm -f ./$(DEPDIR)/tm2c_misc.Plo -rm -f ./$(DEPDIR)/tm2c_object.Plo -rm -f ./$(DEPDIR)/tm2c_readdb.Plo -rm -f ./$(DEPDIR)/tm2c_readobject.Plo -rm -f ./$(DEPDIR)/tm2c_readxml.Plo -rm -f ./$(DEPDIR)/tm2c_setter.Plo -rm -f ./$(DEPDIR)/tm2c_signal.Plo -rm -f ./$(DEPDIR)/tm2c_slot.Plo -rm -f ./$(DEPDIR)/tm2c_struct.Plo -rm -f ./$(DEPDIR)/tm2c_tree1.Plo -rm -f ./$(DEPDIR)/tm2c_tree2.Plo -rm -f ./$(DEPDIR)/tm2c_typedef.Plo -rm -f ./$(DEPDIR)/tm2c_virtualfn.Plo -rm -f ./$(DEPDIR)/tm2c_writedb.Plo -rm -f ./$(DEPDIR)/tm2c_writeobject.Plo -rm -f ./$(DEPDIR)/tm2c_writexml.Plo -rm -f ./$(DEPDIR)/tm_builder_c.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/tm2c_constructor.Plo -rm -f ./$(DEPDIR)/tm2c_copy.Plo -rm -f ./$(DEPDIR)/tm2c_destructor.Plo -rm -f ./$(DEPDIR)/tm2c_dup.Plo -rm -f ./$(DEPDIR)/tm2c_enums.Plo -rm -f ./$(DEPDIR)/tm2c_getter.Plo -rm -f ./$(DEPDIR)/tm2c_list1.Plo -rm -f ./$(DEPDIR)/tm2c_macros.Plo -rm -f ./$(DEPDIR)/tm2c_misc.Plo -rm -f ./$(DEPDIR)/tm2c_object.Plo -rm -f ./$(DEPDIR)/tm2c_readdb.Plo -rm -f ./$(DEPDIR)/tm2c_readobject.Plo -rm -f ./$(DEPDIR)/tm2c_readxml.Plo -rm -f ./$(DEPDIR)/tm2c_setter.Plo -rm -f ./$(DEPDIR)/tm2c_signal.Plo -rm -f ./$(DEPDIR)/tm2c_slot.Plo -rm -f ./$(DEPDIR)/tm2c_struct.Plo -rm -f ./$(DEPDIR)/tm2c_tree1.Plo -rm -f ./$(DEPDIR)/tm2c_tree2.Plo -rm -f ./$(DEPDIR)/tm2c_typedef.Plo -rm -f ./$(DEPDIR)/tm2c_virtualfn.Plo -rm -f ./$(DEPDIR)/tm2c_writedb.Plo -rm -f ./$(DEPDIR)/tm2c_writeobject.Plo -rm -f ./$(DEPDIR)/tm2c_writexml.Plo -rm -f ./$(DEPDIR)/tm_builder_c.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile sources: for f in $(typemaker2_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done indent: $(BUILT_SOURCES) $(ASTYLE) \ --style=gnu \ --indent=spaces=2 \ --min-conditional-indent=0 \ --indent-labels \ --pad=oper \ --one-line=keep-blocks \ --suffix=none \ -a -y $(BUILT_SOURCES) types: $(typefiles) ./typemaker2 -I types/c -I $(srcdir) $(typefiles) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_readobject.c0000664000175000017500000001647414144206313017556 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_readobject.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addReadMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildReadObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "int %s_ReadObject(%s *p_struct, const AQDB_OBJECT *p_db);\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "int %s_ReadObject(%s *p_struct, const AQDB_OBJECT *p_db){\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); if (Typemaker2_Type_GetNonVolatileMemberCount(ty)) { GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { rv=_addReadMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addReadMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; int rv; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { rv=TM2C_AddReleaseOldValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } /* read from object */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE) { GWEN_BUFFER *dstbuf; GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" is volatile, just presetting it */\n", sMemberName); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ConstructFn(tb, ty, tm, NULL, GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } else { GWEN_BUFFER *dstbuf; /* not volatile */ dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_FromObjectFn(tb, ty, tm, NULL, GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " if (p_rv<0) {\n"); GWEN_Buffer_AppendString(tbuf, " DBG_INFO(GWEN_LOGDOMAIN, \"here (%d)\\n\", p_rv);\n"); GWEN_Buffer_AppendString(tbuf, " return p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " }\n"); } return 0; } int TM2C_BuildFromObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_fromObject(const AQDB_OBJECT *p_db, "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " **pp_struct);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_fromObject(const AQDB_OBJECT *p_db, "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " **pp_struct) {\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct;\n"); GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " p_struct="); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) { GWEN_Buffer_AppendByte(tbuf, '_'); } GWEN_Buffer_AppendString(tbuf, "_new();\n"); GWEN_Buffer_AppendString(tbuf, " p_rv="); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_ReadObject(p_struct, p_db);\n"); GWEN_Buffer_AppendString(tbuf, " if (p_rv<0) {\n"); GWEN_Buffer_AppendString(tbuf, " DBG_INFO(GWEN_LOGDOMAIN, \"here (%d)\", p_rv);\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_free(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " return p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " *pp_struct=p_struct;\n"); GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_readdb.h0000664000175000017500000000120714144206313016666 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_READDB_H #define TM2C_READDB_H #include "tm_builder.h" int TM2C_BuildReadDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildFromDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_destructor.h0000664000175000017500000000112014144206313017635 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_DESTRUCTOR_H #define TM2C_DESTRUCTOR_H #include "tm_builder.h" int TM2C_BuildDestructor(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm_builder_c.c0000664000175000017500000007353414460564441017171 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include "tm_builder_c.h" #include "tm2c_enums.h" #include "tm2c_constructor.h" #include "tm2c_destructor.h" #include "tm2c_typedef.h" #include "tm2c_struct.h" #include "tm2c_getter.h" #include "tm2c_setter.h" #include "tm2c_readdb.h" #include "tm2c_writedb.h" #include "tm2c_readxml.h" #include "tm2c_writexml.h" #include "tm2c_readobject.h" #include "tm2c_writeobject.h" #include "tm2c_dup.h" #include "tm2c_copy.h" #include "tm2c_macros.h" #include "tm2c_list1.h" #include "tm2c_tree1.h" #include "tm2c_tree2.h" #include "tm2c_signal.h" #include "tm2c_slot.h" #include "tm2c_object.h" #include "tm2c_virtualfn.h" #include #include #include /* DEBUG */ /*DBG_ERROR(0, "Member %s has flags %x", Typemaker2_Member_GetName(tm), Typemaker2_Member_GetFlags(tm));*/ static int _buildFieldIds(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; tbuf=GWEN_Buffer_new(0, 256, 0, 1); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE)) GWEN_Buffer_AppendArgs(tbuf, "#define %s %d\n", Typemaker2_Member_GetFieldId(tm), Typemaker2_Member_GetMemberPosition(tm)); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendArgs(tbuf, "#define %s %d\n", Typemaker2_Type_GetFieldCountId(ty), Typemaker2_Type_GetNonVolatileMemberCount(ty)); Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int _buildPostHeaders(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPEMANAGER *tym GWEN_UNUSED; TYPEMAKER2_HEADER_LIST *hl; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* handle post-headers */ hl=Typemaker2_Type_GetHeaders(ty); if (hl) { TYPEMAKER2_HEADER *h; h=Typemaker2_Header_List_First(hl); if (h) { GWEN_Buffer_AppendString(tbuf, "/* post-headers */\n"); while (h) { if (Typemaker2_Header_GetLocation(h)==Typemaker2_HeaderLocation_Post) { GWEN_Buffer_AppendString(tbuf, "#include "); if (Typemaker2_Header_GetType(h)==Typemaker2_HeaderType_System) GWEN_Buffer_AppendArgs(tbuf, "<%s>", Typemaker2_Header_GetFileName(h)); else GWEN_Buffer_AppendArgs(tbuf, "\"%s\"", Typemaker2_Header_GetFileName(h)); GWEN_Buffer_AppendString(tbuf, "\n"); } h=Typemaker2_Header_List_Next(h); } } GWEN_Buffer_AppendString(tbuf, "\n"); } Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int _buildEndHeaders(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPEMANAGER *tym GWEN_UNUSED; TYPEMAKER2_HEADER_LIST *hl; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* handle post-headers */ hl=Typemaker2_Type_GetHeaders(ty); if (hl) { TYPEMAKER2_HEADER *h; int markAdded=0; h=Typemaker2_Header_List_First(hl); while (h) { if (Typemaker2_Header_GetLocation(h)==Typemaker2_HeaderLocation_HeaderEnd) { if (!markAdded) { GWEN_Buffer_AppendString(tbuf, "/* end-headers */\n"); markAdded=1; } GWEN_Buffer_AppendString(tbuf, "#include "); if (Typemaker2_Header_GetType(h)==Typemaker2_HeaderType_System) GWEN_Buffer_AppendArgs(tbuf, "<%s>", Typemaker2_Header_GetFileName(h)); else GWEN_Buffer_AppendArgs(tbuf, "\"%s\"", Typemaker2_Header_GetFileName(h)); GWEN_Buffer_AppendString(tbuf, "\n"); } h=Typemaker2_Header_List_Next(h); } GWEN_Buffer_AppendString(tbuf, "\n"); } Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int _buildGetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; uint32_t flags; /* TYPEMAKER2_TYPEMANAGER *tym; */ /* tym=Typemaker2_Builder_GetTypeManager(tb); */ tbuf=GWEN_Buffer_new(0, 256, 0, 1); flags=Typemaker2_Type_GetFlags(ty); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { TYPEMAKER2_TYPE *mty; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_WITH_GETBYMEMBER) { if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) { rv=TM2C_BuildList1GetByMember(tb, ty, tm); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) { rv=TM2C_BuildTreeGetByMember(tb, ty, tm); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) { rv=TM2C_BuildTree2GetByMember(tb, ty, tm); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } tm=Typemaker2_Member_List_Next(tm); } GWEN_Buffer_AppendString(tbuf, " return p_cl;\n"); } return 0; } static int _buildSortByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_MEMBER_LIST *tml; uint32_t flags; flags=Typemaker2_Type_GetFlags(ty); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { TYPEMAKER2_TYPE *mty; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_SORTBYMEMBER) { if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) { rv=TM2C_BuildList1SortByMember(tb, ty, tm); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } tm=Typemaker2_Member_List_Next(tm); } } return 0; } static int _buildDefineDefines(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_DEFINE_LIST *defines; defines=Typemaker2_Type_GetDefines(ty); assert(defines); if (Typemaker2_Define_List_GetCount(defines)) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_DEFINE *td; tbuf=GWEN_Buffer_new(0, 256, 0, 1); td=Typemaker2_Define_List_First(defines); while (td) { const char *prefix; TYPEMAKER2_ITEM *ti; int access=TypeMaker2_Access_Public; int j=Typemaker2_Define_GetStartValue(td); GWEN_Buffer_AppendString(tbuf, "/* define "); s=Typemaker2_Define_GetId(td); if (s && *s) GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " */\n"); prefix=Typemaker2_Define_GetPrefix(td); if (prefix==NULL || *prefix==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No prefix in define definition"); GWEN_Buffer_free(tbuf); return GWEN_ERROR_BAD_DATA; } ti=Typemaker2_Item_List_First(Typemaker2_Define_GetItems(td)); while (ti) { GWEN_Buffer_AppendString(tbuf, "#define "); if (prefix) GWEN_Buffer_AppendString(tbuf, prefix); s=Typemaker2_Item_GetName(ti); if (s && *s) { GWEN_Buffer_AppendString(tbuf, s); } s=Typemaker2_Item_GetValue(ti); if (s) { GWEN_Buffer_AppendString(tbuf, " "); GWEN_Buffer_AppendString(tbuf, s); } else { char numbuf[32]; int k=0; switch (Typemaker2_Define_GetMode(td)) { case Typemaker2_Define_Mode_BitField: k=1<%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ToHashStringFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), NULL, /* no dest */ tbuf); GWEN_Buffer_free(srcbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " GWEN_Buffer_AppendByte(p_buffer, \':\');\n"); } else GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" doesn't have with_hash flag, ignoring */\n", sMemberName); tm=Typemaker2_Member_List_Next(tm); } /* while tm */ } GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int _buildInlines(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; uint32_t flags; tbuf=GWEN_Buffer_new(0, 256, 0, 1); flags=Typemaker2_Type_GetFlags(ty); while (ty) { TYPEMAKER2_INLINE *ti; ti=Typemaker2_Inline_List_First(Typemaker2_Type_GetInlines(ty)); while (ti) { if ((flags & Typemaker2_Inline_GetTypeFlagsMask(ti))==Typemaker2_Inline_GetTypeFlagsValue(ti)) { const char *content; content=Typemaker2_Inline_GetContent(ti); if (content && *content) { GWEN_DB_NODE *db; int rv; db=Typemaker2_Builder_CreateDbForCall(tb, ty, NULL, NULL, NULL); assert(db); rv=Typemaker2_Builder_ReplaceVars(content, db, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } /* include code */ switch (Typemaker2_Inline_GetLocation(ti)) { case Typemaker2_InlineLocation_Header: Typemaker2_Builder_AddDeclaration(tb, Typemaker2_Inline_GetAccess(ti), GWEN_Buffer_GetStart(tbuf)); break; case Typemaker2_InlineLocation_Code: Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); break; } } GWEN_Buffer_Reset(tbuf); } ti=Typemaker2_Inline_List_Next(ti); } ty=Typemaker2_Type_GetExtendsPtr(ty); } GWEN_Buffer_free(tbuf); return 0; } static int _buildMemberInlines(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_TYPE *structType; GWEN_BUFFER *tbuf; /* TYPEMAKER2_TYPEMANAGER *tym; */ structType=ty; /* tym=Typemaker2_Builder_GetTypeManager(tb); */ tbuf=GWEN_Buffer_new(0, 256, 0, 1); while (ty) { TYPEMAKER2_MEMBER_LIST *tml; tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { TYPEMAKER2_TYPE *mty; uint32_t memberFlags; memberFlags=Typemaker2_Member_GetFlags(tm); mty=Typemaker2_Member_GetTypePtr(tm); /* TODO: Check that we don't create duplicate code here!! */ if (mty && mty!=structType && mty!=ty) { TYPEMAKER2_INLINE *ti; /* get inlines from member type */ ti=Typemaker2_Inline_List_First(Typemaker2_Type_GetInlines(mty)); while (ti) { if ((memberFlags & Typemaker2_Inline_GetTypeFlagsMask(ti))==Typemaker2_Inline_GetTypeFlagsValue(ti)) { const char *content; content=Typemaker2_Inline_GetContent(ti); if (content && *content) { GWEN_DB_NODE *db; int rv; /* replace vars in context of the struct type, not the particular member type */ db=Typemaker2_Builder_CreateDbForCall(tb, ty, tm, NULL, NULL); assert(db); rv=Typemaker2_Builder_ReplaceVars(content, db, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } /* include code */ switch (Typemaker2_Inline_GetLocation(ti)) { case Typemaker2_InlineLocation_Header: Typemaker2_Builder_AddDeclaration(tb, Typemaker2_Inline_GetAccess(ti), GWEN_Buffer_GetStart(tbuf)); break; case Typemaker2_InlineLocation_Code: Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); break; } } GWEN_Buffer_Reset(tbuf); } ti=Typemaker2_Inline_List_Next(ti); } } /* if mty */ tm=Typemaker2_Member_List_Next(tm); } /* while tm */ } /* if tml */ ty=Typemaker2_Type_GetExtendsPtr(ty); } return 0; } static int _buildAttach(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; const char *sTypeId; const char *sTypePrefix; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s && *s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "void %s_Attach(%s *p_struct);\n", sTypePrefix, sTypeId); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendArgs(tbuf, "void %s_Attach(%s *p_struct) {\n", sTypePrefix, sTypeId); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct->_refCount);\n"); GWEN_Buffer_AppendString(tbuf, " p_struct->_refCount++;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int _buildCacheFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPEMANAGER *tym; const char *sApi; const char *sTypePrefix; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); sApi=Typemaker2_TypeManager_GetApiDeclaration(tym); sTypePrefix=Typemaker2_Type_GetPrefix(ty); /* public prototypes */ GWEN_Buffer_AppendString(tbuf, "/* cache functions */\n"); if (sApi && *sApi) GWEN_Buffer_AppendArgs(tbuf, "%s ", sApi); GWEN_Buffer_AppendArgs(tbuf, "int GWENHYWFAR_CB %s_CacheFn_Attach(void *ptr);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, "\n"); if (sApi && *sApi) GWEN_Buffer_AppendArgs(tbuf, "%s ", sApi); GWEN_Buffer_AppendArgs(tbuf, "int GWENHYWFAR_CB %s_CacheFn_Free(void *ptr);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, "\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementations */ GWEN_Buffer_AppendString(tbuf, "/* cache functions */\n"); GWEN_Buffer_AppendArgs(tbuf, "int %s_CacheFn_Attach(void *ptr) {\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendArgs(tbuf, "int %s_CacheFn_Free(void *ptr) {\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int _buildGroupApiDoc(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_GROUP *grp, int depth, GWEN_BUFFER *buf) { const char *s; TYPEMAKER2_GROUP *childGrp; TYPEMAKER2_MEMBER_LIST *members; const char *sTypeIdentifier; const char *sTypePrefix; sTypeIdentifier=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); /* write title */ s=Typemaker2_Group_GetTitle(grp); GWEN_Buffer_AppendString(buf, "\n\n"); GWEN_Buffer_AppendArgs(buf, "%s\n", depth, (s && *s)?s:"Unnamed Group", depth); GWEN_Buffer_AppendString(buf, "\n"); s=Typemaker2_Group_GetDescription(grp); if (s && *s) { GWEN_DB_NODE *dbCall; int rv; dbCall=Typemaker2_Builder_CreateDbForCall(tb, ty, NULL, NULL, NULL); assert(dbCall); rv=Typemaker2_Builder_ReplaceVars(s, dbCall, buf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_DB_Group_free(dbCall); GWEN_Buffer_free(buf); return rv; } GWEN_DB_Group_free(dbCall); GWEN_Buffer_AppendString(buf, "\n"); } /* write member docs */ members=Typemaker2_Type_GetMembers(ty); if (members) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(members); while (tm) { if (Typemaker2_Member_GetGroupPtr(tm)==grp) { const char *sMemberName; sMemberName=Typemaker2_Member_GetName(tm); GWEN_Buffer_AppendArgs(buf, "\n\n@anchor %s_%s\n", sTypeIdentifier, sMemberName); GWEN_Buffer_AppendArgs(buf, "%s\n\n", depth+1, sMemberName, depth+1); /* add description, if any */ s=Typemaker2_Member_GetDescription(tm); if (s && *s) { GWEN_DB_NODE *dbCall; int rv; dbCall=Typemaker2_Builder_CreateDbForCall(tb, ty, tm, NULL, NULL); assert(dbCall); rv=Typemaker2_Builder_ReplaceVars(s, dbCall, buf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_DB_Group_free(dbCall); GWEN_Buffer_free(buf); return rv; } GWEN_DB_Group_free(dbCall); GWEN_Buffer_AppendString(buf, "\n"); } /* add setter/getter info */ GWEN_Buffer_AppendArgs(buf, "

Set this property with @ref %s_Set%c%s(), ", sTypePrefix, toupper(*sMemberName), sMemberName+1); GWEN_Buffer_AppendArgs(buf, "get it with @ref %s_Get%c%s().

\n", sTypePrefix, toupper(*sMemberName), sMemberName+1); } tm=Typemaker2_Member_List_Next(tm); } } /* write children groups */ childGrp=Typemaker2_Group_Tree_GetFirstChild(grp); while (childGrp) { int rv; rv=_buildGroupApiDoc(tb, ty, childGrp, depth+1, buf); if (rv<0) { DBG_ERROR(0, "here (%d)", rv); return rv; } childGrp=Typemaker2_Group_Tree_GetNext(childGrp); } return 0; } static int _buildApiDoc(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_GROUP_TREE *groupTree; TYPEMAKER2_GROUP *grp; GWEN_BUFFER *tbuf; const char *sTypeIdentifier; sTypeIdentifier=Typemaker2_Type_GetIdentifier(ty); groupTree=Typemaker2_Type_GetGroupTree(ty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "/** @page P_%s Structure %s\n", sTypeIdentifier, sTypeIdentifier); GWEN_Buffer_AppendArgs(tbuf, "

This page describes the properties of %s.

\n", sTypeIdentifier); GWEN_Buffer_AppendString(tbuf, "\n"); grp=Typemaker2_Group_Tree_GetFirst(groupTree); while (grp) { _buildGroupApiDoc(tb, ty, grp, 1, tbuf); grp=Typemaker2_Group_Tree_GetNext(grp); } GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, "*/\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } static int Typemaker2_Builder_C_Build(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; uint32_t flags; flags=Typemaker2_Type_GetFlags(ty); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS) { TM2C_DelVirtualFnsFromSlots(ty); rv=TM2C_AddVirtualFnsFromSlots(ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } rv=TM2C_SetEnumStringFns(ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_OBJECT) { rv=_buildFieldIds(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } rv=_buildApiDoc(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=_buildDefineDefines(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildTypedef(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildDefineEnums(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildDefineVirtualFns(tb, ty, "pre"); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=_buildPostHeaders(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildDefineVirtualFns(tb, ty, "post"); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildStruct(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildMacroFunctions(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildEnumFromString(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildEnumToString(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildConstructor(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildDestructor(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT) { rv=_buildAttach(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (!(flags & TYPEMAKER2_TYPEFLAGS_NODUP)) { rv=TM2C_BuildDup(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (!(flags & TYPEMAKER2_TYPEFLAGS_NOCOPY)) { rv=TM2C_BuildCopy(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } rv=TM2C_BuildGetter(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildSetter(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildProtoVirtualFns(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildCodeVirtualFns(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildProtoSetterVirtualFns(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildSetterVirtualFns(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildProtoGetterVirtualFns(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildGetterVirtualFns(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) { if (!(flags & TYPEMAKER2_TYPEFLAGS_NODUP)) { rv=TM2C_BuildList1Dup(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_DB) { rv=TM2C_BuildReadDb(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildWriteDb(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildFromDb(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildToDb(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_XML) { rv=TM2C_BuildReadXml(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildWriteXml(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildToXml(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildFromXml(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_OBJECT) { rv=TM2C_BuildReadObject(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildWriteObject(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildToObject(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildFromObject(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildCreateColumnList(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildCreateTable(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=TM2C_BuildCreateObject(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } rv=_buildGetByMember(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_HASH) { rv=_buildToHashString(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } rv=_buildMemberInlines(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=_buildSortByMember(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) { rv=TM2C_BuildSignalFunctions(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS) { rv=TM2C_BuildSlotFunctions(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_CACHEFNS) { rv=_buildCacheFunctions(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } rv=_buildInlines(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=_buildEndHeaders(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } TYPEMAKER2_BUILDER *Typemaker2_Builder_C_new() { TYPEMAKER2_BUILDER *tb; tb=Typemaker2_Builder_new(); Typemaker2_Builder_SetBuildFn(tb, Typemaker2_Builder_C_Build); return tb; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_tree2.c0000664000175000017500000001170714144206313016467 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_tree2.h" #include "tm2c_misc.h" #include #include static void _addGetByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static int _addGetByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addGetByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildTree2GetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { int rv; _addGetByMemberProtoType(tb, ty, tm); rv=_addGetByMemberImplementation(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addGetByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; tym=Typemaker2_Builder_GetTypeManager(tb); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); _addGetByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addGetByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addGetByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendArgs(tbuf, " %s *p_struct;\n\n", sTypeId); GWEN_Buffer_AppendString(tbuf, " assert(p_object);\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct = %s_Tree2_GetFirstChild(p_object);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " while(p_struct) {\n"); GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " "); if (1) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(srcbuf, "p_cmp"); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); rv=Typemaker2_Builder_Invoke_CompareFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " if (p_rv == 0)\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct = %s_Tree2_GetBelow(p_struct);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " return NULL;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addGetByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; const char *sMemberTypeId; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); sMemberTypeId=Typemaker2_Type_GetIdentifier(mty); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_Tree2_GetBy%c%s(const %s *p_object, ", sTypeId, sTypePrefix, toupper(*sMemberName), sMemberName+1, sTypeId); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer || Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) GWEN_Buffer_AppendArgs(tbuf, " const %s *", sMemberTypeId); else GWEN_Buffer_AppendArgs(tbuf, "%s ", sMemberTypeId); GWEN_Buffer_AppendString(tbuf, "p_cmp)"); } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_writeobject.c0000664000175000017500000001330514144206313017763 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_writeobject.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addWriteMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildWriteObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "int %s_WriteObject(const %s *p_struct, AQDB_OBJECT *p_db);\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "int %s_WriteObject(const %s *p_struct, AQDB_OBJECT *p_db) {\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); if (Typemaker2_Type_GetNonVolatileMemberCount(ty)) { GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { int rv; rv=_addWriteMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addWriteMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE)) { GWEN_BUFFER *srcbuf; int rv; GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ToObjectFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), NULL, tbuf); GWEN_Buffer_free(srcbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " if (p_rv<0) {\n"); GWEN_Buffer_AppendString(tbuf, " DBG_INFO(GWEN_LOGDOMAIN, \"here (%d)\\n\", p_rv);\n"); GWEN_Buffer_AppendString(tbuf, " return p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " }\n"); } else GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" is volatile, not writing to object */\n", sMemberName); GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int TM2C_BuildToObject(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_toObject(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, AQDB_OBJECT *p_db);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_toObject(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, AQDB_OBJECT *p_db) {\n"); GWEN_Buffer_AppendString(tbuf, " return "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_WriteObject(p_struct, p_db);\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_writexml.h0000664000175000017500000000121414144206313017316 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_WRITEXML_H #define TM2C_WRITEXML_H #include "tm_builder.h" int TM2C_BuildWriteXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildToXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_copy.h0000664000175000017500000000107614144206313016423 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_COPY_H #define TM2C_COPY_H #include "tm_builder.h" int TM2C_BuildCopy(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_writedb.c0000664000175000017500000001324414144206313017104 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_writedb.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addWriteMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildWriteDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "int %s_WriteDb(const %s *p_struct, GWEN_DB_NODE *p_db);\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "int %s_WriteDb(const %s *p_struct, GWEN_DB_NODE *p_db) {\n", Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); if (Typemaker2_Type_GetNonVolatileMemberCount(ty)) { GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { int rv; rv=_addWriteMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, " return 0;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addWriteMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE)) { GWEN_BUFFER *srcbuf; int rv; GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_struct->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_ToDbFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), NULL, tbuf); GWEN_Buffer_free(srcbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " if (p_rv<0) {\n"); GWEN_Buffer_AppendString(tbuf, " DBG_INFO(GWEN_LOGDOMAIN, \"here (%d)\\n\", p_rv);\n"); GWEN_Buffer_AppendString(tbuf, " return p_rv;\n"); GWEN_Buffer_AppendString(tbuf, " }\n"); } else GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" is volatile, not writing to db */\n", sMemberName); GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int TM2C_BuildToDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; /* uint32_t flags; */ TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* flags=Typemaker2_Type_GetFlags(ty); */ /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_toDb(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, GWEN_DB_NODE *p_db);\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "int "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_toDb(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct, GWEN_DB_NODE *p_db) {\n"); GWEN_Buffer_AppendString(tbuf, " return "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_WriteDb(p_struct, p_db);\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_constructor.h0000664000175000017500000000112314144206313020027 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_CONSTRUCTOR_H #define TM2C_CONSTRUCTOR_H #include "tm_builder.h" int TM2C_BuildConstructor(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_macros.h0000664000175000017500000000111414144206313016726 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_MACROS_H #define TM2C_MACROS_H #include "tm_builder.h" int TM2C_BuildMacroFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_enums.h0000664000175000017500000000141614144206313016576 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_ENUMS_H #define TM2C_ENUMS_H #include "tm_builder.h" int TM2C_BuildDefineEnums(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_SetEnumStringFns(TYPEMAKER2_TYPE *ty); int TM2C_BuildEnumFromString(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildEnumToString(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/Makefile.am0000664000175000017500000000303014156464753016420 00000000000000 INCLUDES=@all_includes@ -I$(top_builddir) -I../ -I$(srcdir)/../ -I../../ -I$(srcdir)/../../ -I$(top_srcdir)/tools -I$(gwenhywfar_symlinkdir) noinst_LTLIBRARIES=libtm2_c.la libtm2_c_la_SOURCES=\ tm_builder_c.c \ tm2c_misc.c \ tm2c_enums.c \ tm2c_constructor.c \ tm2c_destructor.c \ tm2c_dup.c \ tm2c_copy.c \ tm2c_typedef.c \ tm2c_struct.c \ tm2c_macros.c \ tm2c_getter.c \ tm2c_setter.c \ tm2c_readdb.c \ tm2c_writedb.c \ tm2c_readxml.c \ tm2c_writexml.c \ tm2c_object.c \ tm2c_readobject.c \ tm2c_writeobject.c \ tm2c_list1.c \ tm2c_tree1.c \ tm2c_tree2.c \ tm2c_signal.c \ tm2c_slot.c \ tm2c_virtualfn.c noinst_HEADERS=\ tm_builder_c.h \ tm2c_misc.h \ tm2c_enums.h \ tm2c_constructor.h \ tm2c_destructor.h \ tm2c_dup.h \ tm2c_copy.h \ tm2c_typedef.h \ tm2c_struct.h \ tm2c_macros.h \ tm2c_getter.h \ tm2c_setter.h \ tm2c_readdb.h \ tm2c_writedb.h \ tm2c_readxml.h \ tm2c_writexml.h \ tm2c_object.h \ tm2c_readobject.h \ tm2c_writeobject.h \ tm2c_list1.h \ tm2c_tree1.h \ tm2c_tree2.h \ tm2c_signal.h \ tm2c_slot.h \ tm2c_virtualfn.h sources: for f in $(typemaker2_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done indent: $(BUILT_SOURCES) $(ASTYLE) \ --style=gnu \ --indent=spaces=2 \ --min-conditional-indent=0 \ --indent-labels \ --pad=oper \ --one-line=keep-blocks \ --suffix=none \ -a -y $(BUILT_SOURCES) types: $(typefiles) ./typemaker2 -I types/c -I $(srcdir) $(typefiles) gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_struct.h0000664000175000017500000000110414144206313016765 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_STRUCT_H #define TM2C_STRUCT_H #include "tm_builder.h" int TM2C_BuildStruct(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_typedef.c0000664000175000017500000001572614144206313017113 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_typedef.h" #include #include static void _addFlagSpecificSystemHeaders(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); static void _addPreHeaders(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf); static void _addTypeSpecificDefs(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf); /** writes typedef line into public header and also writes includes */ int TM2C_BuildTypedef(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; uint32_t flags; tbuf=GWEN_Buffer_new(0, 256, 0, 1); flags=Typemaker2_Type_GetFlags(ty); _addFlagSpecificSystemHeaders(ty, tbuf); _addPreHeaders(ty, tbuf); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_OBJECT) GWEN_Buffer_AppendString(tbuf, "#include \n"); GWEN_Buffer_AppendString(tbuf, "typedef struct "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, ";\n"); _addTypeSpecificDefs(tb, ty, flags, tbuf); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_OBJECT) { GWEN_Buffer_AppendString(tbuf, "#include \n"); } GWEN_Buffer_AppendString(tbuf, "\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addFlagSpecificSystemHeaders(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { uint32_t flags; flags=Typemaker2_Type_GetFlags(ty); /* add some system headers */ GWEN_Buffer_AppendString(tbuf, "/* needed system headers */\n"); GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_INHERIT) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_IDMAP) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_DB) GWEN_Buffer_AppendString(tbuf, "#include \n"); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_XML) GWEN_Buffer_AppendString(tbuf, "#include \n"); if ((flags & TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS) || (flags & TYPEMAKER2_TYPEFLAGS_WITH_SLOTS)) GWEN_Buffer_AppendString(tbuf, "#include \n"); GWEN_Buffer_AppendString(tbuf, "\n"); } void _addPreHeaders(TYPEMAKER2_TYPE *ty, GWEN_BUFFER *tbuf) { TYPEMAKER2_HEADER_LIST *hl; /* handle pre-headers */ hl=Typemaker2_Type_GetHeaders(ty); if (hl) { TYPEMAKER2_HEADER *h; h=Typemaker2_Header_List_First(hl); if (h) { GWEN_Buffer_AppendString(tbuf, "/* pre-headers */\n"); while (h) { if (Typemaker2_Header_GetLocation(h)==Typemaker2_HeaderLocation_Pre) { GWEN_Buffer_AppendString(tbuf, "#include "); if (Typemaker2_Header_GetType(h)==Typemaker2_HeaderType_System) { GWEN_Buffer_AppendString(tbuf, "<"); GWEN_Buffer_AppendString(tbuf, Typemaker2_Header_GetFileName(h)); GWEN_Buffer_AppendString(tbuf, ">"); } else { GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, Typemaker2_Header_GetFileName(h)); GWEN_Buffer_AppendString(tbuf, "\""); } GWEN_Buffer_AppendString(tbuf, "\n"); } h=Typemaker2_Header_List_Next(h); } GWEN_Buffer_AppendString(tbuf, "\n"); } } } void _addTypeSpecificDefs(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, uint32_t flags, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPEMANAGER *tym; const char *sTypeId; const char *sTypePrefix; const char *sApi; tym=Typemaker2_Builder_GetTypeManager(tb); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sApi=Typemaker2_TypeManager_GetApiDeclaration(tym); if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_LIST_FUNCTION_LIB_DEFS(%s, %s, %s)\n", sTypeId, sTypePrefix, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_LIST_FUNCTION_DEFS(%s, %s)\n", sTypeId, sTypePrefix); } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_LIST2_FUNCTION_LIB_DEFS(%s, %s, %s)\n", sTypeId, sTypePrefix, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_LIST2_FUNCTION_DEFS(%s, %s)\n", sTypeId, sTypePrefix); } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_CONSTLIST2) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_CONSTLIST2_FUNCTION_LIB_DEFS(%s, %s, %s)\n", sTypeId, sTypePrefix, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_CONSTLIST2_FUNCTION_DEFS(%s, %s)\n", sTypeId, sTypePrefix); } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_TREE_FUNCTION_LIB_DEFS(%s, %s, %s)\n", sTypeId, sTypePrefix, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_TREE_FUNCTION_DEFS(%s, %s)\n", sTypeId, sTypePrefix); } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_TREE2_FUNCTION_LIB_DEFS(%s, %s, %s)\n", sTypeId, sTypePrefix, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_TREE2_FUNCTION_DEFS(%s, %s)\n", sTypeId, sTypePrefix); } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_INHERIT) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_INHERIT_FUNCTION_LIB_DEFS(%s, %s)\n", sTypeId, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_INHERIT_FUNCTION_DEFS(%s)\n", sTypeId); } if (flags & TYPEMAKER2_TYPEFLAGS_WITH_IDMAP) { if (Typemaker2_TypeManager_GetApiDeclaration(tym)) GWEN_Buffer_AppendArgs(tbuf, "GWEN_IDMAP_FUNCTION_LIB_DEFS(%s, %s, %s)\n", sTypeId, sTypePrefix, sApi); else GWEN_Buffer_AppendArgs(tbuf, "GWEN_IDMAP_FUNCTION_DEFS(%s, %s)\n", sTypeId, sTypePrefix); } GWEN_Buffer_AppendString(tbuf, "\n"); } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_signal.h0000664000175000017500000000111514144206313016720 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_SIGNAL_H #define TM2C_SIGNAL_H #include "tm_builder.h" int TM2C_BuildSignalFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_getter.h0000664000175000017500000000110414144206313016733 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_GETTER_H #define TM2C_GETTER_H #include "tm_builder.h" int TM2C_BuildGetter(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_dup.c0000664000175000017500000001561214144206313016235 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_dup.h" #include "tm2c_misc.h" #include #include static void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); static int _addDupMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addAssignValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); static int _addDupValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildDup(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; _addPrototype(tb, ty); rv=_addImplementation(tb, ty); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); /* prototype */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_dup(const %s *p_src);\n", Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; TYPEMAKER2_MEMBER_LIST *tml; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_dup(const %s *p_src) {\n", Typemaker2_Type_GetIdentifier(ty), Typemaker2_Type_GetPrefix(ty), Typemaker2_Type_GetIdentifier(ty)); GWEN_Buffer_AppendArgs(tbuf, " %s *p_struct;\n\n", Typemaker2_Type_GetIdentifier(ty)); GWEN_Buffer_AppendString(tbuf, " assert(p_src);\n"); if (Typemaker2_Type_GetUsePrivateConstructor(ty)) GWEN_Buffer_AppendArgs(tbuf, " p_struct=%s__new();\n", Typemaker2_Type_GetPrefix(ty)); else GWEN_Buffer_AppendArgs(tbuf, " p_struct=%s_new();\n", Typemaker2_Type_GetPrefix(ty)); tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tm; tm=Typemaker2_Member_List_First(tml); while (tm) { rv=_addDupMemberCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); tm=Typemaker2_Member_List_Next(tm); } } GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } int _addDupMemberCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sMemberName; int rv; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sMemberName=Typemaker2_Member_GetName(tm); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_NODUP)) { GWEN_Buffer_AppendArgs(tbuf, " /* member \"%s\" */\n", sMemberName); /* TODO: only do this if there is a preset value and it is !=NULL for pointers! */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_OWN) { rv=TM2C_AddReleaseOldValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } } if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer) { if (Typemaker2_Member_GetDupFlags(tm) & TYPEMAKER2_FLAGS_ASSIGN) { rv=_addAssignValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } /* assign */ else { GWEN_Buffer_AppendArgs(tbuf, " if (p_src->%s) {\n", sMemberName); rv=_addDupValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, " }\n"); } } /* if pointer */ else { rv=_addDupValueCode(tb, ty, tm, tbuf); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } } } /* if !nodup */ else { GWEN_Buffer_AppendString(tbuf, " /* member \""); GWEN_Buffer_AppendString(tbuf, sMemberName); GWEN_Buffer_AppendString(tbuf, "\" has nodup flag, not copying */\n"); } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addAssignValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; const char *sMemberName; sMemberName=Typemaker2_Member_GetName(tm); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_src->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_AssignFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } int _addDupValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; const char *sMemberName; sMemberName=Typemaker2_Member_GetName(tm); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(srcbuf, "p_src->%s", sMemberName); GWEN_Buffer_AppendString(tbuf, " "); rv=Typemaker2_Builder_Invoke_DupFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); return 0; } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_slot.c0000664000175000017500000002252414144206313016426 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_slot.h" #include "tm2c_misc.h" #include #include int TM2C_BuildSlotFunctions(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_SLOT_LIST *slotList; tym=Typemaker2_Builder_GetTypeManager(tb); tbuf=GWEN_Buffer_new(0, 256, 0, 1); slotList=Typemaker2_Type_GetSlots(ty); if (slotList) { TYPEMAKER2_SLOT *slot; /* private prototypes */ GWEN_Buffer_AppendString(tbuf, "/* slot functions */\n"); slot=Typemaker2_Slot_List_First(slotList); while (slot) { /* callback function */ GWEN_Buffer_AppendString(tbuf, "static int GWENHYWFAR_CB "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_SlotCallback_"); s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "(GWEN_SLOT *slot, void *userData, void *p1, void *p2, int p3, int p4);\n"); slot=Typemaker2_Slot_List_Next(slot); } Typemaker2_Builder_AddPrivateDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* public prototypes */ GWEN_Buffer_AppendString(tbuf, "/* slot functions */\n"); slot=Typemaker2_Slot_List_First(slotList); while (slot) { /* GetSlot */ s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) { GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " "); } GWEN_Buffer_AppendString(tbuf, "GWEN_SLOT *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_GetSlot_"); s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct);\n"); slot=Typemaker2_Slot_List_Next(slot); } Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); /* implementation */ GWEN_Buffer_AppendString(tbuf, "/* slot functions */\n"); slot=Typemaker2_Slot_List_First(slotList); while (slot) { /* callback function */ GWEN_Buffer_AppendString(tbuf, "static int GWENHYWFAR_CB "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_SlotCallback_"); s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "(GWEN_SLOT *slot, void *userData, void *p1, void *p2, int p3, int p4) {\n"); GWEN_Buffer_AppendString(tbuf, " "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " p_struct=("); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "*) userData;\n"); GWEN_Buffer_AppendString(tbuf, " return "); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_"); s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "(p_struct"); s=Typemaker2_Slot_GetParamType1(slot); /* param 1 */ if (s && *s && strcasecmp(s, "none")) { GWEN_Buffer_AppendString(tbuf, ", ("); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, ") p1"); } s=Typemaker2_Slot_GetParamType2(slot); /* param 2 */ if (s && *s && strcasecmp(s, "none")) { GWEN_Buffer_AppendString(tbuf, ", ("); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, ") p2"); } if (Typemaker2_Slot_GetFlags(slot) & TYPEMAKER2_SLOT_FLAGS_USE_PARAM3) GWEN_Buffer_AppendString(tbuf, ", p3"); if (Typemaker2_Slot_GetFlags(slot) & TYPEMAKER2_SLOT_FLAGS_USE_PARAM4) GWEN_Buffer_AppendString(tbuf, ", p4"); GWEN_Buffer_AppendString(tbuf, ");\n"); GWEN_Buffer_AppendString(tbuf, "}\n\n"); /* GetSlot */ GWEN_Buffer_AppendString(tbuf, "GWEN_SLOT *"); s=Typemaker2_Type_GetPrefix(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_GetSlot_"); s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); GWEN_Buffer_AppendString(tbuf, "(const "); s=Typemaker2_Type_GetIdentifier(ty); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, " *p_struct) {\n"); GWEN_Buffer_AppendString(tbuf, " assert(p_struct);\n"); GWEN_Buffer_AppendString(tbuf, " return GWEN_SignalObject_FindSlot(p_struct->_signalObject, "); s=Typemaker2_Slot_GetName(slot); /* name */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Slot_GetParamType1(slot); /* param 1 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\", "); s=Typemaker2_Slot_GetParamType2(slot); /* param 2 */ GWEN_Buffer_AppendString(tbuf, "\""); GWEN_Buffer_AppendString(tbuf, s?s:"none"); GWEN_Buffer_AppendString(tbuf, "\");\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); GWEN_Buffer_AppendString(tbuf, "\n"); slot=Typemaker2_Slot_List_Next(slot); } Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_Reset(tbuf); } GWEN_Buffer_free(tbuf); return 0; } int TM2C_AddVirtualFnsFromSlots(TYPEMAKER2_TYPE *ty) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_VIRTUALFN_LIST *fnList; TYPEMAKER2_SLOT_LIST *slotList; tbuf=GWEN_Buffer_new(0, 256, 0, 1); fnList=Typemaker2_Type_GetVirtualFns(ty); slotList=Typemaker2_Type_GetSlots(ty); if (slotList) { TYPEMAKER2_SLOT *slot; slot=Typemaker2_Slot_List_First(slotList); while (slot) { TYPEMAKER2_VIRTUALFN *fn; TYPEMAKER2_VIRTUALFN_PARAM_LIST *plist; /* callback function */ s=Typemaker2_Slot_GetName(slot); GWEN_Buffer_AppendByte(tbuf, tolower(*s)); GWEN_Buffer_AppendString(tbuf, s+1); fn=Typemaker2_VirtualFn_new(); plist=Typemaker2_VirtualFn_GetParamTypeList(fn); /* name */ Typemaker2_VirtualFn_SetName(fn, GWEN_Buffer_GetStart(tbuf)); s=Typemaker2_Slot_GetParamType1(slot); /* param 1 */ if (s && *s && strcasecmp(s, "none")) { TYPEMAKER2_VIRTUALFN_PARAM *prm; prm=Typemaker2_VirtualFn_Param_new(); Typemaker2_VirtualFn_Param_SetType(prm, s); Typemaker2_VirtualFn_Param_List_Add(prm, plist); } s=Typemaker2_Slot_GetParamType2(slot); /* param 2 */ if (s && *s && strcasecmp(s, "none")) { TYPEMAKER2_VIRTUALFN_PARAM *prm; prm=Typemaker2_VirtualFn_Param_new(); Typemaker2_VirtualFn_Param_SetType(prm, s); Typemaker2_VirtualFn_Param_List_Add(prm, plist); } if (Typemaker2_Slot_GetFlags(slot) & TYPEMAKER2_SLOT_FLAGS_USE_PARAM3) { TYPEMAKER2_VIRTUALFN_PARAM *prm; prm=Typemaker2_VirtualFn_Param_new(); Typemaker2_VirtualFn_Param_SetType(prm, "int"); Typemaker2_VirtualFn_Param_List_Add(prm, plist); } if (Typemaker2_Slot_GetFlags(slot) & TYPEMAKER2_SLOT_FLAGS_USE_PARAM4) { TYPEMAKER2_VIRTUALFN_PARAM *prm; prm=Typemaker2_VirtualFn_Param_new(); Typemaker2_VirtualFn_Param_SetType(prm, "int"); Typemaker2_VirtualFn_Param_List_Add(prm, plist); } Typemaker2_VirtualFn_SetAccess(fn, TypeMaker2_Access_Public); Typemaker2_VirtualFn_SetLocation(fn, "post"); Typemaker2_VirtualFn_SetReturnType(fn, "int"); Typemaker2_VirtualFn_SetDefaultReturnValue(fn, "GWEN_ERROR_NOT_IMPLEMENTED"); Typemaker2_VirtualFn_AddFlags(fn, TYPEMAKER2_VIRTUALFN_FLAGS_FROMSLOT); Typemaker2_VirtualFn_List_Add(fn, fnList); slot=Typemaker2_Slot_List_Next(slot); } } GWEN_Buffer_free(tbuf); return 0; } void TM2C_DelVirtualFnsFromSlots(TYPEMAKER2_TYPE *ty) { TYPEMAKER2_VIRTUALFN_LIST *fnList; fnList=Typemaker2_Type_GetVirtualFns(ty); if (fnList) { TYPEMAKER2_VIRTUALFN *fn; fn=Typemaker2_VirtualFn_List_First(fnList); while (fn) { TYPEMAKER2_VIRTUALFN *fnNext; fnNext=Typemaker2_VirtualFn_List_Next(fn); if (Typemaker2_VirtualFn_GetFlags(fn) & TYPEMAKER2_VIRTUALFN_FLAGS_FROMSLOT) { Typemaker2_VirtualFn_List_Del(fn); Typemaker2_VirtualFn_free(fn); } fn=fnNext; } } } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_tree1.c0000664000175000017500000001167514144206313016472 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm2c_tree1.h" #include "tm2c_misc.h" #include #include static void _addGetByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static int _addGetByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm); static void _addGetByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); int TM2C_BuildTreeGetByMember(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { int rv; _addGetByMemberProtoType(tb, ty, tm); rv=_addGetByMemberImplementation(tb, ty, tm); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); return rv; } return 0; } void _addGetByMemberProtoType(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; const char *s; TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_TYPE *mty; tym=Typemaker2_Builder_GetTypeManager(tb); mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=Typemaker2_TypeManager_GetApiDeclaration(tym); if (s) GWEN_Buffer_AppendArgs(tbuf, "%s ", s); _addGetByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, ";\n"); Typemaker2_Builder_AddPublicDeclaration(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } int _addGetByMemberImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm) { GWEN_BUFFER *tbuf; TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); tbuf=GWEN_Buffer_new(0, 256, 0, 1); _addGetByMemberDeclaration(ty, tm, tbuf); GWEN_Buffer_AppendString(tbuf, "{\n"); GWEN_Buffer_AppendArgs(tbuf, " %s *p_struct;\n\n", sTypeId); GWEN_Buffer_AppendString(tbuf, " assert(p_tree);\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct = %s_Tree_GetFirst(p_tree);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " while(p_struct) {\n"); GWEN_Buffer_AppendString(tbuf, " int p_rv;\n"); GWEN_Buffer_AppendString(tbuf, "\n"); GWEN_Buffer_AppendString(tbuf, " "); if (1) { GWEN_BUFFER *dstbuf; GWEN_BUFFER *srcbuf; int rv; srcbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(srcbuf, "p_cmp"); dstbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendArgs(dstbuf, "p_struct->%s", sMemberName); rv=Typemaker2_Builder_Invoke_CompareFn(tb, ty, tm, GWEN_Buffer_GetStart(srcbuf), GWEN_Buffer_GetStart(dstbuf), tbuf); GWEN_Buffer_free(srcbuf); GWEN_Buffer_free(dstbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return rv; } GWEN_Buffer_AppendString(tbuf, "\n"); } GWEN_Buffer_AppendString(tbuf, " if (p_rv == 0)\n"); GWEN_Buffer_AppendString(tbuf, " return p_struct;\n"); GWEN_Buffer_AppendArgs(tbuf, " p_struct = %s_Tree_GetBelow(p_struct);\n", sTypePrefix); GWEN_Buffer_AppendString(tbuf, " }\n"); GWEN_Buffer_AppendString(tbuf, " return NULL;\n"); GWEN_Buffer_AppendString(tbuf, "}\n"); Typemaker2_Builder_AddCode(tb, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; } void _addGetByMemberDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf) { TYPEMAKER2_TYPE *mty; const char *sTypeId; const char *sTypePrefix; const char *sMemberName; const char *sMemberTypeId; mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); sTypeId=Typemaker2_Type_GetIdentifier(ty); sTypePrefix=Typemaker2_Type_GetPrefix(ty); sMemberName=Typemaker2_Member_GetName(tm); sMemberTypeId=Typemaker2_Type_GetIdentifier(mty); GWEN_Buffer_AppendArgs(tbuf, "%s *%s_Tree_GetBy%c%s(const %s_TREE *p_tree, ", sTypeId, sTypePrefix, toupper(*sMemberName), sMemberName+1, sTypeId); if (Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Pointer || Typemaker2_Type_GetType(mty)==TypeMaker2_Type_Array) GWEN_Buffer_AppendArgs(tbuf, " const %s *", sMemberTypeId); else GWEN_Buffer_AppendArgs(tbuf, "%s ", sMemberTypeId); GWEN_Buffer_AppendString(tbuf, "p_cmp)"); } gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_readxml.h0000664000175000017500000000121314144206313017076 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_READXML_H #define TM2C_READXML_H #include "tm_builder.h" int TM2C_BuildReadXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int TM2C_BuildFromXml(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/c/tm2c_misc.h0000664000175000017500000000116414144206313016402 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TM2C_MISC_H #define TM2C_MISC_H #include "tm_builder.h" int TM2C_AddReleaseOldValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_enum.c0000644000175000017500000002202413142134476015742 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_enum.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_enum_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(TYPEMAKER2_ENUM, Typemaker2_Enum) TYPEMAKER2_ENUM *Typemaker2_Enum_new(void) { TYPEMAKER2_ENUM *p_struct; GWEN_NEW_OBJECT(TYPEMAKER2_ENUM, p_struct) GWEN_LIST_INIT(TYPEMAKER2_ENUM, p_struct) /* members */ p_struct->id=NULL; p_struct->prefix=NULL; p_struct->type=NULL; p_struct->items=Typemaker2_Item_List_new(); p_struct->toStringFn=NULL; p_struct->fromStringFn=NULL; /* virtual functions */ return p_struct; } void Typemaker2_Enum_free(TYPEMAKER2_ENUM *p_struct) { if (p_struct) { GWEN_LIST_FINI(TYPEMAKER2_ENUM, p_struct) /* members */ free(p_struct->id); free(p_struct->prefix); free(p_struct->type); Typemaker2_Item_List_free(p_struct->items); free(p_struct->toStringFn); free(p_struct->fromStringFn); GWEN_FREE_OBJECT(p_struct); } } TYPEMAKER2_ENUM *Typemaker2_Enum_dup(const TYPEMAKER2_ENUM *p_src) { TYPEMAKER2_ENUM *p_struct; assert(p_src); p_struct=Typemaker2_Enum_new(); /* member "id" */ if (p_struct->id) { free(p_struct->id); p_struct->id=NULL; } if (p_src->id) { p_struct->id=strdup(p_src->id); } /* member "prefix" */ if (p_struct->prefix) { free(p_struct->prefix); p_struct->prefix=NULL; } if (p_src->prefix) { p_struct->prefix=strdup(p_src->prefix); } /* member "type" */ if (p_struct->type) { free(p_struct->type); p_struct->type=NULL; } if (p_src->type) { p_struct->type=strdup(p_src->type); } /* member "items" */ if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); p_struct->items=NULL; } if (p_src->items) { p_struct->items=Typemaker2_Item_List_dup(p_src->items); } /* member "toStringFn" */ if (p_struct->toStringFn) { free(p_struct->toStringFn); p_struct->toStringFn=NULL; } if (p_src->toStringFn) { p_struct->toStringFn=strdup(p_src->toStringFn); } /* member "fromStringFn" */ if (p_struct->fromStringFn) { free(p_struct->fromStringFn); p_struct->fromStringFn=NULL; } if (p_src->fromStringFn) { p_struct->fromStringFn=strdup(p_src->fromStringFn); } return p_struct; } TYPEMAKER2_ENUM *Typemaker2_Enum_copy(TYPEMAKER2_ENUM *p_struct, const TYPEMAKER2_ENUM *p_src) { assert(p_struct); assert(p_src); /* member "id" */ if (p_struct->id) { free(p_struct->id); p_struct->id=NULL; } if (p_src->id) { p_struct->id=strdup(p_src->id); } /* member "prefix" */ if (p_struct->prefix) { free(p_struct->prefix); p_struct->prefix=NULL; } if (p_src->prefix) { p_struct->prefix=strdup(p_src->prefix); } /* member "type" */ if (p_struct->type) { free(p_struct->type); p_struct->type=NULL; } if (p_src->type) { p_struct->type=strdup(p_src->type); } /* member "items" */ if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); p_struct->items=NULL; } if (p_src->items) { p_struct->items=Typemaker2_Item_List_dup(p_src->items); } /* member "toStringFn" */ if (p_struct->toStringFn) { free(p_struct->toStringFn); p_struct->toStringFn=NULL; } if (p_src->toStringFn) { p_struct->toStringFn=strdup(p_src->toStringFn); } /* member "fromStringFn" */ if (p_struct->fromStringFn) { free(p_struct->fromStringFn); p_struct->fromStringFn=NULL; } if (p_src->fromStringFn) { p_struct->fromStringFn=strdup(p_src->fromStringFn); } return p_struct; } const char *Typemaker2_Enum_GetId(const TYPEMAKER2_ENUM *p_struct) { assert(p_struct); return p_struct->id; } const char *Typemaker2_Enum_GetPrefix(const TYPEMAKER2_ENUM *p_struct) { assert(p_struct); return p_struct->prefix; } const char *Typemaker2_Enum_GetType(const TYPEMAKER2_ENUM *p_struct) { assert(p_struct); return p_struct->type; } TYPEMAKER2_ITEM_LIST *Typemaker2_Enum_GetItems(const TYPEMAKER2_ENUM *p_struct) { assert(p_struct); return p_struct->items; } const char *Typemaker2_Enum_GetToStringFn(const TYPEMAKER2_ENUM *p_struct) { assert(p_struct); return p_struct->toStringFn; } const char *Typemaker2_Enum_GetFromStringFn(const TYPEMAKER2_ENUM *p_struct) { assert(p_struct); return p_struct->fromStringFn; } void Typemaker2_Enum_SetId(TYPEMAKER2_ENUM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->id) { free(p_struct->id); } if (p_src) { p_struct->id=strdup(p_src); } else { p_struct->id=NULL; } } void Typemaker2_Enum_SetPrefix(TYPEMAKER2_ENUM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->prefix) { free(p_struct->prefix); } if (p_src) { p_struct->prefix=strdup(p_src); } else { p_struct->prefix=NULL; } } void Typemaker2_Enum_SetType(TYPEMAKER2_ENUM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->type) { free(p_struct->type); } if (p_src) { p_struct->type=strdup(p_src); } else { p_struct->type=NULL; } } void Typemaker2_Enum_SetItems(TYPEMAKER2_ENUM *p_struct, const TYPEMAKER2_ITEM_LIST *p_src) { assert(p_struct); if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); } if (p_src) { p_struct->items=Typemaker2_Item_List_dup(p_src); } else { p_struct->items=Typemaker2_Item_List_new(); } } void Typemaker2_Enum_SetToStringFn(TYPEMAKER2_ENUM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->toStringFn) { free(p_struct->toStringFn); } if (p_src) { p_struct->toStringFn=strdup(p_src); } else { p_struct->toStringFn=NULL; } } void Typemaker2_Enum_SetFromStringFn(TYPEMAKER2_ENUM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->fromStringFn) { free(p_struct->fromStringFn); } if (p_src) { p_struct->fromStringFn=strdup(p_src); } else { p_struct->fromStringFn=NULL; } } TYPEMAKER2_ENUM_LIST *Typemaker2_Enum_List_dup(const TYPEMAKER2_ENUM_LIST *p_src) { TYPEMAKER2_ENUM_LIST *p_dest; TYPEMAKER2_ENUM *p_elem; assert(p_src); p_dest=Typemaker2_Enum_List_new(); p_elem=Typemaker2_Enum_List_First(p_src); while (p_elem) { TYPEMAKER2_ENUM *p_cpy; p_cpy=Typemaker2_Enum_dup(p_elem); Typemaker2_Enum_List_Add(p_cpy, p_dest); p_elem=Typemaker2_Enum_List_Next(p_elem); } return p_dest; } void Typemaker2_Enum_ReadXml(TYPEMAKER2_ENUM *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "id" */ if (p_struct->id) { free(p_struct->id); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "id", NULL); if (s) p_struct->id=strdup(s); } if (p_struct->id==NULL) { /* member "id" is volatile, just presetting */ p_struct->id=NULL; } /* member "prefix" */ if (p_struct->prefix) { free(p_struct->prefix); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "prefix", NULL); if (s) p_struct->prefix=strdup(s); } if (p_struct->prefix==NULL) { /* member "prefix" is volatile, just presetting */ p_struct->prefix=NULL; } /* member "type" */ if (p_struct->type) { free(p_struct->type); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "type", NULL); if (s) p_struct->type=strdup(s); } if (p_struct->type==NULL) { /* member "type" is volatile, just presetting */ p_struct->type=NULL; } /* member "items" */ if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); } /* member "items" is volatile, just presetting */ p_struct->items=Typemaker2_Item_List_new(); /* member "toStringFn" */ if (p_struct->toStringFn) { free(p_struct->toStringFn); } /* member "toStringFn" is volatile, just presetting */ p_struct->toStringFn=NULL; /* member "fromStringFn" */ if (p_struct->fromStringFn) { free(p_struct->fromStringFn); } /* member "fromStringFn" is volatile, just presetting */ p_struct->fromStringFn=NULL; } void Typemaker2_Enum_WriteXml(const TYPEMAKER2_ENUM *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "id" */ GWEN_XMLNode_SetProperty(p_db, "id", p_struct->id); /* member "prefix" */ GWEN_XMLNode_SetProperty(p_db, "prefix", p_struct->prefix); /* member "type" */ GWEN_XMLNode_SetProperty(p_db, "type", p_struct->type); /* member "items" is volatile, not writing to xml */ /* member "toStringFn" is volatile, not writing to xml */ /* member "fromStringFn" is volatile, not writing to xml */ } void Typemaker2_Enum_toXml(const TYPEMAKER2_ENUM *p_struct, GWEN_XMLNODE *p_db) { Typemaker2_Enum_WriteXml(p_struct, p_db); } TYPEMAKER2_ENUM *Typemaker2_Enum_fromXml(GWEN_XMLNODE *p_db) { TYPEMAKER2_ENUM *p_struct; p_struct=Typemaker2_Enum_new(); Typemaker2_Enum_ReadXml(p_struct, p_db); return p_struct; } /* code headers */ gwenhywfar-5.12.1/tools/typemaker2/tm_code.h0000644000175000017500000000624013142134464015714 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_code.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_CODE_H #define TM_CODE_H #ifdef __cplusplus extern "C" { #endif /* needed system headers */ #include #include #include /* pre-headers */ #include "tm_item.h" typedef struct TYPEMAKER2_CODE TYPEMAKER2_CODE; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_CODE, Typemaker2_Code) /* post-headers */ /** Constructor. */ TYPEMAKER2_CODE *Typemaker2_Code_new(void); /** Destructor. */ void Typemaker2_Code_free(TYPEMAKER2_CODE *p_struct); TYPEMAKER2_CODE *Typemaker2_Code_dup(const TYPEMAKER2_CODE *p_struct); TYPEMAKER2_CODE *Typemaker2_Code_copy(TYPEMAKER2_CODE *p_struct, const TYPEMAKER2_CODE *p_src); /** Getter. * Use this function to get the member "id" */ const char *Typemaker2_Code_GetId(const TYPEMAKER2_CODE *p_struct); /** Getter. * Use this function to get the member "memberFlagsMask" */ const char *Typemaker2_Code_GetMemberFlagsMask(const TYPEMAKER2_CODE *p_struct); /** Getter. * Use this function to get the member "memberFlagsValue" */ const char *Typemaker2_Code_GetMemberFlagsValue(const TYPEMAKER2_CODE *p_struct); /** Getter. * Use this function to get the member "code" */ const char *Typemaker2_Code_GetCode(const TYPEMAKER2_CODE *p_struct); /** Getter. * Use this function to get the member "memberFlagsMaskInt" */ uint32_t Typemaker2_Code_GetMemberFlagsMaskInt(const TYPEMAKER2_CODE *p_struct); /** Getter. * Use this function to get the member "memberFlagsValueInt" */ uint32_t Typemaker2_Code_GetMemberFlagsValueInt(const TYPEMAKER2_CODE *p_struct); /** Setter. * Use this function to set the member "id" */ void Typemaker2_Code_SetId(TYPEMAKER2_CODE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "memberFlagsMask" */ void Typemaker2_Code_SetMemberFlagsMask(TYPEMAKER2_CODE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "memberFlagsValue" */ void Typemaker2_Code_SetMemberFlagsValue(TYPEMAKER2_CODE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "code" */ void Typemaker2_Code_SetCode(TYPEMAKER2_CODE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "memberFlagsMaskInt" */ void Typemaker2_Code_SetMemberFlagsMaskInt(TYPEMAKER2_CODE *p_struct, uint32_t p_src); /** Setter. * Use this function to set the member "memberFlagsValueInt" */ void Typemaker2_Code_SetMemberFlagsValueInt(TYPEMAKER2_CODE *p_struct, uint32_t p_src); TYPEMAKER2_CODE_LIST *Typemaker2_Code_List_dup(const TYPEMAKER2_CODE_LIST *p_src); void Typemaker2_Code_ReadXml(TYPEMAKER2_CODE *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Code_WriteXml(const TYPEMAKER2_CODE *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Code_toXml(const TYPEMAKER2_CODE *p_struct, GWEN_XMLNODE *p_db); TYPEMAKER2_CODE *Typemaker2_Code_fromXml(GWEN_XMLNODE *p_db); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_type_p.h0000664000175000017500000000324714460564441016316 00000000000000/*************************************************************************** begin : Wed Jul 01 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_TYPE_P_H #define TYPEMAKER2_TYPE_P_H #include "tm_type.h" struct TYPEMAKER2_TYPE { GWEN_LIST_ELEMENT(TYPEMAKER2_TYPE) char *name; char *descr; uint32_t flags; uint32_t setFlags; uint32_t getFlags; uint32_t dupFlags; uint32_t copyFlags; int access; int usePrivateConstructor; int structAccess; int type; char *extends; char *baseType; char *inherits; char *identifier; char *prefix; char *defaultValue; char *presetValue; char *aqdb_type; char *baseFileName; char *freeHook; int pack; TYPEMAKER2_HEADER_LIST *headers; TYPEMAKER2_ENUM_LIST *enums; TYPEMAKER2_DEFINE_LIST *defines; TYPEMAKER2_CODE_LIST *codeDefs; TYPEMAKER2_INLINE_LIST *inlines; TYPEMAKER2_VIRTUALFN_LIST *virtualFns; TYPEMAKER2_SIGNAL_LIST *signals; TYPEMAKER2_SLOT_LIST *slots; TYPEMAKER2_GROUP_TREE *groupTree; GWEN_STRINGLIST *structIncludes; GWEN_STRINGLIST *privateIncludes; GWEN_STRINGLIST *libraryIncludes; GWEN_STRINGLIST *publicIncludes; GWEN_STRINGLIST *codeIncludes; TYPEMAKER2_MEMBER_LIST *members; TYPEMAKER2_TYPE *extendsPtr; TYPEMAKER2_TYPE *baseTypePtr; TYPEMAKER2_TYPE *inheritsPtr; int nonVolatileMemberCount; char *fieldCountId; int refCount; }; #endif gwenhywfar-5.12.1/tools/typemaker2/tm_code_p.h0000644000175000017500000000127413142134464016235 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_code.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_CODE_P_H #define TM_CODE_P_H #include "tm_code.h" #ifdef __cplusplus extern "C" { #endif struct TYPEMAKER2_CODE { GWEN_LIST_ELEMENT(TYPEMAKER2_CODE) char *id; char *memberFlagsMask; char *memberFlagsValue; char *code; uint32_t memberFlagsMaskInt; /* volatile */ uint32_t memberFlagsValueInt; /* volatile */ }; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_item.c0000644000175000017500000001104413142134476015734 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_item.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_item_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(TYPEMAKER2_ITEM, Typemaker2_Item) GWEN_LIST2_FUNCTIONS(TYPEMAKER2_ITEM, Typemaker2_Item) TYPEMAKER2_ITEM *Typemaker2_Item_new(void) { TYPEMAKER2_ITEM *p_struct; GWEN_NEW_OBJECT(TYPEMAKER2_ITEM, p_struct) GWEN_LIST_INIT(TYPEMAKER2_ITEM, p_struct) /* members */ p_struct->name=NULL; p_struct->value=NULL; /* virtual functions */ return p_struct; } void Typemaker2_Item_free(TYPEMAKER2_ITEM *p_struct) { if (p_struct) { GWEN_LIST_FINI(TYPEMAKER2_ITEM, p_struct) /* members */ free(p_struct->name); free(p_struct->value); GWEN_FREE_OBJECT(p_struct); } } TYPEMAKER2_ITEM *Typemaker2_Item_dup(const TYPEMAKER2_ITEM *p_src) { TYPEMAKER2_ITEM *p_struct; assert(p_src); p_struct=Typemaker2_Item_new(); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "value" */ if (p_struct->value) { free(p_struct->value); p_struct->value=NULL; } if (p_src->value) { p_struct->value=strdup(p_src->value); } return p_struct; } TYPEMAKER2_ITEM *Typemaker2_Item_copy(TYPEMAKER2_ITEM *p_struct, const TYPEMAKER2_ITEM *p_src) { assert(p_struct); assert(p_src); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "value" */ if (p_struct->value) { free(p_struct->value); p_struct->value=NULL; } if (p_src->value) { p_struct->value=strdup(p_src->value); } return p_struct; } const char *Typemaker2_Item_GetName(const TYPEMAKER2_ITEM *p_struct) { assert(p_struct); return p_struct->name; } const char *Typemaker2_Item_GetValue(const TYPEMAKER2_ITEM *p_struct) { assert(p_struct); return p_struct->value; } void Typemaker2_Item_SetName(TYPEMAKER2_ITEM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->name) { free(p_struct->name); } if (p_src) { p_struct->name=strdup(p_src); } else { p_struct->name=NULL; } } void Typemaker2_Item_SetValue(TYPEMAKER2_ITEM *p_struct, const char *p_src) { assert(p_struct); if (p_struct->value) { free(p_struct->value); } if (p_src) { p_struct->value=strdup(p_src); } else { p_struct->value=NULL; } } TYPEMAKER2_ITEM_LIST *Typemaker2_Item_List_dup(const TYPEMAKER2_ITEM_LIST *p_src) { TYPEMAKER2_ITEM_LIST *p_dest; TYPEMAKER2_ITEM *p_elem; assert(p_src); p_dest=Typemaker2_Item_List_new(); p_elem=Typemaker2_Item_List_First(p_src); while (p_elem) { TYPEMAKER2_ITEM *p_cpy; p_cpy=Typemaker2_Item_dup(p_elem); Typemaker2_Item_List_Add(p_cpy, p_dest); p_elem=Typemaker2_Item_List_Next(p_elem); } return p_dest; } void Typemaker2_Item_ReadXml(TYPEMAKER2_ITEM *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ if (p_struct->name) { free(p_struct->name); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "name", NULL); if (s) p_struct->name=strdup(s); } if (p_struct->name==NULL) { /* member "name" is volatile, just presetting */ p_struct->name=NULL; } /* member "value" */ if (p_struct->value) { free(p_struct->value); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "value", NULL); if (s) p_struct->value=strdup(s); } if (p_struct->value==NULL) { /* member "value" is volatile, just presetting */ p_struct->value=NULL; } } void Typemaker2_Item_WriteXml(const TYPEMAKER2_ITEM *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ GWEN_XMLNode_SetProperty(p_db, "name", p_struct->name); /* member "value" */ GWEN_XMLNode_SetProperty(p_db, "value", p_struct->value); } void Typemaker2_Item_toXml(const TYPEMAKER2_ITEM *p_struct, GWEN_XMLNODE *p_db) { Typemaker2_Item_WriteXml(p_struct, p_db); } TYPEMAKER2_ITEM *Typemaker2_Item_fromXml(GWEN_XMLNODE *p_db) { TYPEMAKER2_ITEM *p_struct; p_struct=Typemaker2_Item_new(); Typemaker2_Item_ReadXml(p_struct, p_db); return p_struct; } /* code headers */ gwenhywfar-5.12.1/tools/typemaker2/main.c0000644000175000017500000001707513440562565015241 00000000000000 #include "typemaker2.h" #include #include #include #include #include #define I18N(msg) msg int main(int argc, char **argv) { GWEN_DB_NODE *db; int rv; int err; int defsOnly=0; GWEN_GUI *gui; const GWEN_ARGS args[]= { { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "api", /* name */ 0, /* minnum */ 1, /* maxnum */ "D", /* short option */ "api", /* long option */ "API declaration prefix (like GWENHYWFAR_API)", "API declaration prefix (like GWENHYWFAR_API)" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "publicFile", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "public", /* long option */ "Name of the public header file to create", "Name of the public header file to create" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "libraryFile", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "library", /* long option */ "Name of the library header file to create", "Name of the library header file to create" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "protectedFile", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "protected", /* long option */ "Name of the protected header file to create", "Name of the protected header file to create" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "privateFile", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "private", /* long option */ "Name of the private header file to create", "Name of the private header file to create" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "codeFile", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "code", /* long option */ "Name of the code file to create", "Name of the code file to create" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "destFolder", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "destfolder", /* long option */ "Destination folder", "Destination folder" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "language", /* name */ 0, /* minnum */ 1, /* maxnum */ 0, /* short option */ "lang", /* long option */ "Language for which to create the headers and code", "Language for which to create the headers and code" }, { GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */ GWEN_ArgsType_Char, /* type */ "include", /* name */ 0, /* minnum */ 99, /* maxnum */ "I", /* short option */ "include", /* long option */ "Add folder to include for type lookup", "Add folder to include for type lookup" }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "defsOnly", /* name */ 0, /* minnum */ 1, /* maxnum */ "d", /* short option */ "defs-only", /* long option */ "Only write def files (*.tm2)", "Only write def files (*.tm2)" }, { 0, /* flags */ GWEN_ArgsType_Int, /* type */ "noDefs", /* name */ 0, /* minnum */ 1, /* maxnum */ NULL, /* short option */ "no-defs", /* long option */ "Dont write def files (*.tm2)", "Dont write def files (*.tm2)" }, { GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */ GWEN_ArgsType_Int, /* type */ "help", /* name */ 0, /* minnum */ 0, /* maxnum */ "h", /* short option */ "help", /* long option */ "Show this help screen", /* short description */ "Show this help screen" /* long description */ } }; err=GWEN_Init(); if (err) { fprintf(stderr, "Could not initialize Gwenhywfar.\n"); return 2; } gui=GWEN_Gui_CGui_new(); GWEN_Gui_SetGui(gui); GWEN_Logger_Open(0, "typemaker2", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User); db=GWEN_DB_Group_new("arguments"); rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, db); if (rv==GWEN_ARGS_RESULT_ERROR) { fprintf(stderr, "ERROR: Could not parse arguments main\n"); return -1; } else if (rv==GWEN_ARGS_RESULT_HELP) { GWEN_BUFFER *ubuf; ubuf=GWEN_Buffer_new(0, 1024, 0, 1); GWEN_Buffer_AppendString(ubuf, I18N("Usage: ")); GWEN_Buffer_AppendString(ubuf, argv[0]); GWEN_Buffer_AppendString(ubuf, I18N(" [GLOBAL OPTIONS] COMMAND " "[LOCAL OPTIONS]\n")); GWEN_Buffer_AppendString(ubuf, I18N("\nGlobal Options:\n")); if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) { fprintf(stderr, "ERROR: Could not create help string\n"); return 1; } GWEN_Buffer_AppendString(ubuf, I18N("\nCommands:\n\n")); GWEN_Buffer_AppendString(ubuf, I18N(" build:\n" " This command creates source and header files for the given file" "\n\n")); fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf)); GWEN_Buffer_free(ubuf); return 0; } if (rv) { argc-=rv-1; argv+=rv-1; } defsOnly=GWEN_DB_GetIntValue(db, "defsOnly", 0, 0); if (defsOnly) rv=buildDefs(db); else rv=build(db); err=GWEN_Fini(); if (err) { fprintf(stderr, "WARNING: Could not deinitialize Gwenhywfar.\n"); } return rv; } gwenhywfar-5.12.1/tools/typemaker2/tm_code.xml0000644000175000017500000000412113142134464016261 00000000000000 TYPEMAKER2_CODE Typemaker2_Code tm_code with_list1 with_xml
tm_item.h
NULL NULL public own attribute const dup const NULL NULL public own const dup const NULL NULL public own const dup const NULL NULL public own const dup const 0 0 public volatile none none 0 0 public volatile none none
gwenhywfar-5.12.1/tools/typemaker2/tm_member.h0000644000175000017500000001051713312251310016240 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_MEMBER_H #define TYPEMAKER2_MEMBER_H #include #include #include typedef struct TYPEMAKER2_MEMBER TYPEMAKER2_MEMBER; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_MEMBER, Typemaker2_Member); #include "tm_type.h" #include "tm_enum.h" #include "tm_define.h" #include "tm_group.h" #include "tm_code.h" TYPEMAKER2_MEMBER *Typemaker2_Member_new(); void Typemaker2_Member_free(TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_Attach(TYPEMAKER2_MEMBER *tm); const char *Typemaker2_Member_GetName(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetName(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetTypeName(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetTypeName(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetElementName(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetElementName(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetDescription(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetDescription(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetFieldId(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetFieldId(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetEnumId(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetEnumId(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetDefineId(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetDefineId(TYPEMAKER2_MEMBER *tm, const char *s); uint32_t Typemaker2_Member_GetFlags(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetFlags(TYPEMAKER2_MEMBER *tm, uint32_t i); uint32_t Typemaker2_Member_GetSetFlags(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetSetFlags(TYPEMAKER2_MEMBER *tm, uint32_t i); uint32_t Typemaker2_Member_GetGetFlags(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetGetFlags(TYPEMAKER2_MEMBER *tm, uint32_t i); uint32_t Typemaker2_Member_GetDupFlags(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetDupFlags(TYPEMAKER2_MEMBER *tm, uint32_t i); uint32_t Typemaker2_Member_GetCopyFlags(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetCopyFlags(TYPEMAKER2_MEMBER *tm, uint32_t i); TYPEMAKER2_TYPE *Typemaker2_Member_GetTypePtr(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetTypePtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_TYPE *ty); TYPEMAKER2_ENUM *Typemaker2_Member_GetEnumPtr(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetEnumPtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_ENUM *te); TYPEMAKER2_DEFINE *Typemaker2_Member_GetDefinePtr(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetDefinePtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_DEFINE *td); TYPEMAKER2_GROUP *Typemaker2_Member_GetGroupPtr(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetGroupPtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_GROUP *gr); int Typemaker2_Member_GetAccess(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetAccess(TYPEMAKER2_MEMBER *tm, int i); const char *Typemaker2_Member_GetDefaultValue(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetDefaultValue(TYPEMAKER2_MEMBER *tm, const char *s); const char *Typemaker2_Member_GetPresetValue(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetPresetValue(TYPEMAKER2_MEMBER *tm, const char *s); int Typemaker2_Member_GetMaxLen(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetMaxLen(TYPEMAKER2_MEMBER *tm, int i); const char *Typemaker2_Member_GetAqDbType(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetAqDbType(TYPEMAKER2_MEMBER *tm, const char *s); int Typemaker2_Member_GetMemberPosition(const TYPEMAKER2_MEMBER *tm); void Typemaker2_Member_SetMemberPosition(TYPEMAKER2_MEMBER *tm, int i); TYPEMAKER2_CODE_LIST *Typemaker2_Member_GetCodeDefs(const TYPEMAKER2_MEMBER *tm); int Typemaker2_Member_readXml(TYPEMAKER2_MEMBER *tm, GWEN_XMLNODE *node, const char *wantedLang); void Typemaker2_Member_Dump(TYPEMAKER2_MEMBER *tm, FILE *f, int indent); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_signal_p.h0000644000175000017500000000114613142134464016576 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_signal.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_SIGNAL_P_H #define TM_SIGNAL_P_H #include "tm_signal.h" #ifdef __cplusplus extern "C" { #endif struct TYPEMAKER2_SIGNAL { GWEN_LIST_ELEMENT(TYPEMAKER2_SIGNAL) char *name; char *paramType1; char *paramType2; uint32_t flags; }; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_member_p.h0000644000175000017500000000213313312251265016563 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_MEMBER_P_H #define TYPEMAKER2_MEMBER_P_H #include "tm_member.h" struct TYPEMAKER2_MEMBER { GWEN_LIST_ELEMENT(TYPEMAKER2_MEMBER) char *name; char *typeName; char *elementName; char *descr; int access; uint32_t flags; uint32_t setFlags; uint32_t getFlags; uint32_t dupFlags; uint32_t copyFlags; int maxLen; char *defaultValue; char *presetValue; char *aedb_type; char *enumId; char *defineId; TYPEMAKER2_TYPE *typePtr; TYPEMAKER2_ENUM *enumPtr; TYPEMAKER2_DEFINE *definePtr; TYPEMAKER2_GROUP *groupPtr; TYPEMAKER2_CODE_LIST *codeDefs; int refCount; int memberPosition; char *fieldId; }; #endif gwenhywfar-5.12.1/tools/typemaker2/tm_signal.xml0000644000175000017500000000331013142134464016623 00000000000000 TYPEMAKER2_SIGNAL Typemaker2_Signal tm_signal with_list1 with_list2 with_xml NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const 0 0 public with_flags gwenhywfar-5.12.1/tools/typemaker2/tm_type.h0000664000175000017500000002170414460564441015775 00000000000000/*************************************************************************** begin : Wed Jul 01 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_TYPE_H #define TYPEMAKER2_TYPE_H #include #include #include #include typedef struct TYPEMAKER2_TYPE TYPEMAKER2_TYPE; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_TYPE, Typemaker2_Type) GWEN_LIST2_FUNCTION_DEFS(TYPEMAKER2_TYPE, Typemaker2_Type) /* don't forget to add new flags to tm_util.c ! */ /** special value which is used to overwrite flags from extended types */ #define TYPEMAKER2_FLAGS_NONE 0x00000001 #define TYPEMAKER2_FLAGS_OWN 0x00000002 #define TYPEMAKER2_FLAGS_VOLATILE 0x00000004 #define TYPEMAKER2_FLAGS_CONST 0x00000008 #define TYPEMAKER2_FLAGS_STATIC 0x00000010 #define TYPEMAKER2_FLAGS_DUP 0x00000020 #define TYPEMAKER2_FLAGS_NODUP 0x00000040 #define TYPEMAKER2_FLAGS_ATTRIBUTE 0x00000080 #define TYPEMAKER2_FLAGS_ENUM 0x00000100 #define TYPEMAKER2_FLAGS_DEFINE 0x00000200 #define TYPEMAKER2_FLAGS_ASSIGN 0x00000400 #define TYPEMAKER2_FLAGS_OMIT 0x00000800 #define TYPEMAKER2_FLAGS_COPY 0x00001000 #define TYPEMAKER2_FLAGS_NOCOPY 0x00002000 #define TYPEMAKER2_FLAGS_SORTBYMEMBER 0x00004000 #define TYPEMAKER2_FLAGS_NOCONSTOBJECT 0x00008000 #define TYPEMAKER2_FLAGS_WITH_GETBYMEMBER 0x00010000 #define TYPEMAKER2_FLAGS_WITH_HASH 0x00020000 #define TYPEMAKER2_FLAGS_WITH_HASHNUM 0x00040000 #define TYPEMAKER2_FLAGS_WITH_FLAGS 0x00080000 #define TYPEMAKER2_FLAGS_GWEN_CB 0x00100000 #define TYPEMAKER2_TYPEFLAGS_WITH_DB 0x00000001 #define TYPEMAKER2_TYPEFLAGS_WITH_XML 0x00000002 #define TYPEMAKER2_TYPEFLAGS_WITH_OBJECT 0x00000004 #define TYPEMAKER2_TYPEFLAGS_WITH_LIST1 0x00000008 #define TYPEMAKER2_TYPEFLAGS_WITH_LIST2 0x00000010 #define TYPEMAKER2_TYPEFLAGS_WITH_INHERIT 0x00000020 #define TYPEMAKER2_TYPEFLAGS_WITH_IDMAP 0x00000040 #define TYPEMAKER2_TYPEFLAGS_WITH_TREE 0x00000080 #define TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT 0x00000100 #define TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS 0x00000800 #define TYPEMAKER2_TYPEFLAGS_WITH_SLOTS 0x00001000 #define TYPEMAKER2_TYPEFLAGS_WITH_CACHEFNS 0x00002000 #define TYPEMAKER2_TYPEFLAGS_DUP 0x00004000 #define TYPEMAKER2_TYPEFLAGS_NODUP 0x00008000 #define TYPEMAKER2_TYPEFLAGS_COPY 0x00010000 #define TYPEMAKER2_TYPEFLAGS_NOCOPY 0x00020000 #define TYPEMAKER2_TYPEFLAGS_WITH_HASH 0x00040000 #define TYPEMAKER2_TYPEFLAGS_WITH_CONSTLIST2 0x00080000 #define TYPEMAKER2_TYPEFLAGS_WITH_TREE2 0x00100000 enum { TypeMaker2_Type_Unknown=0, TypeMaker2_Type_Opaque, TypeMaker2_Type_Pointer, TypeMaker2_Type_Array }; enum { TypeMaker2_Access_Unknown=0, TypeMaker2_Access_Public, TypeMaker2_Access_Protected, TypeMaker2_Access_Library, TypeMaker2_Access_Private }; #include "tm_member.h" #include "tm_header.h" #include "tm_enum.h" #include "tm_define.h" #include "tm_code.h" #include "tm_inline.h" #include "tm_virtualfn.h" #include "tm_signal.h" #include "tm_slot.h" #include "tm_group.h" TYPEMAKER2_TYPE *Typemaker2_Type_new(); void Typemaker2_Type_free(TYPEMAKER2_TYPE *ty); void Typemaker2_Type_Attach(TYPEMAKER2_TYPE *ty); const char *Typemaker2_Type_GetName(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetName(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetExtends(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetExtends(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetBaseType(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetBaseType(TYPEMAKER2_TYPE *ty, const char *s); int Typemaker2_Type_GetType(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetType(TYPEMAKER2_TYPE *ty, int i); const char *Typemaker2_Type_GetAqDbType(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetAqDbType(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetBaseFileName(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetBaseFileName(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetFreeHook(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetFreeHook(TYPEMAKER2_TYPE *ty, const char *s); uint32_t Typemaker2_Type_GetFlags(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetFlags(TYPEMAKER2_TYPE *ty, uint32_t i); uint32_t Typemaker2_Type_GetSetFlags(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetSetFlags(TYPEMAKER2_TYPE *ty, uint32_t i); uint32_t Typemaker2_Type_GetGetFlags(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetGetFlags(TYPEMAKER2_TYPE *ty, uint32_t i); uint32_t Typemaker2_Type_GetDupFlags(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetDupFlags(TYPEMAKER2_TYPE *ty, uint32_t i); uint32_t Typemaker2_Type_GetCopyFlags(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetCopyFlags(TYPEMAKER2_TYPE *ty, uint32_t i); int Typemaker2_Type_GetAccess(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetAccess(TYPEMAKER2_TYPE *ty, int i); int Typemaker2_Type_GetStructAccess(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetStructAccess(TYPEMAKER2_TYPE *ty, int i); int Typemaker2_Type_GetUsePrivateConstructor(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetUsePrivateConstructor(TYPEMAKER2_TYPE *ty, int i); const char *Typemaker2_Type_GetDescription(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetDescription(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetDefaultValue(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetDefaultValue(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetPresetValue(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetPresetValue(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetIdentifier(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetIdentifier(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetPrefix(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetPrefix(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetInherits(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetInherits(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetBaseType(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetBaseType(TYPEMAKER2_TYPE *ty, const char *s); const char *Typemaker2_Type_GetExtends(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetExtends(TYPEMAKER2_TYPE *ty, const char *s); int Typemaker2_Type_GetPack(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetPack(TYPEMAKER2_TYPE *ty, int i); TYPEMAKER2_MEMBER_LIST *Typemaker2_Type_GetMembers(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_HEADER_LIST *Typemaker2_Type_GetHeaders(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_ENUM_LIST *Typemaker2_Type_GetEnums(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_DEFINE_LIST *Typemaker2_Type_GetDefines(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_CODE_LIST *Typemaker2_Type_GetCodeDefs(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_INLINE_LIST *Typemaker2_Type_GetInlines(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_VIRTUALFN_LIST *Typemaker2_Type_GetVirtualFns(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_SIGNAL_LIST *Typemaker2_Type_GetSignals(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_SLOT_LIST *Typemaker2_Type_GetSlots(const TYPEMAKER2_TYPE *ty); TYPEMAKER2_GROUP_TREE *Typemaker2_Type_GetGroupTree(const TYPEMAKER2_TYPE *ty); int Typemaker2_Type_GetNonVolatileMemberCount(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetNonVolatileMemberCount(TYPEMAKER2_TYPE *ty, int i); TYPEMAKER2_TYPE *Typemaker2_Type_GetExtendsPtr(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetExtendsPtr(TYPEMAKER2_TYPE *ty, TYPEMAKER2_TYPE *p); TYPEMAKER2_TYPE *Typemaker2_Type_GetBaseTypePtr(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetBaseTypePtr(TYPEMAKER2_TYPE *ty, TYPEMAKER2_TYPE *p); TYPEMAKER2_TYPE *Typemaker2_Type_GetInheritsPtr(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetInheritsPtr(TYPEMAKER2_TYPE *ty, TYPEMAKER2_TYPE *p); const char *Typemaker2_Type_GetFieldCountId(const TYPEMAKER2_TYPE *ty); void Typemaker2_Type_SetFieldCountId(TYPEMAKER2_TYPE *ty, const char *s); TYPEMAKER2_ENUM *Typemaker2_Type_FindEnum(TYPEMAKER2_TYPE *ty, const char *s); TYPEMAKER2_CODE *Typemaker2_Type_FindCodeForMember(const TYPEMAKER2_TYPE *ty, const TYPEMAKER2_MEMBER *tm, const char *id); int Typemaker2_Type_readXml(TYPEMAKER2_TYPE *ty, GWEN_XMLNODE *node, const char *wantedLang); void Typemaker2_Type_Dump(TYPEMAKER2_TYPE *ty, FILE *f, int indent); #endif gwenhywfar-5.12.1/tools/typemaker2/builddefs.c0000664000175000017500000000752514116666046016257 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "typemaker2.h" #include "tm_typemanager.h" #include "tm_builder_c.h" #include #include #include int doBuildDefs(GWEN_DB_NODE *dbArgs, const char *fname) { TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_BUILDER *tb=NULL; TYPEMAKER2_TYPE *ty; GWEN_STRINGLIST *sl; TYPEMAKER2_TYPE_LIST2 *tlist; TYPEMAKER2_TYPE_LIST2_ITERATOR *it; const char *s; int i; int rv; tym=Typemaker2_TypeManager_new(); s=GWEN_DB_GetCharValue(dbArgs, "api", 0, NULL); if (s && *s) Typemaker2_TypeManager_SetApiDeclaration(tym, s); s=GWEN_DB_GetCharValue(dbArgs, "language", 0, "c"); if (s && *s) { Typemaker2_TypeManager_SetLanguage(tym, s); if (strcasecmp(s, "c")==0) { tb=Typemaker2_Builder_C_new(); Typemaker2_Builder_SetTypeManager(tb, tym); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Unsupported language [%s]", s); return 1; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Missing language specification"); return 1; } s = GWEN_DB_GetCharValue(dbArgs, "destFolder", 0, NULL); if (s) Typemaker2_Builder_SetDestFolderName(tb, s); Typemaker2_Builder_SetSourceFileName(tb, fname); for (i=0; i<99; i++) { s=GWEN_DB_GetCharValue(dbArgs, "include", i, NULL); if (s && *s) Typemaker2_TypeManager_AddFolder(tym, s); else break; } sl=GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_DATADIR); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while (se) { s=GWEN_StringListEntry_Data(se); if (s) { GWEN_BUFFER *xbuf; xbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(xbuf, s); GWEN_Buffer_AppendString(xbuf, "/typemaker2/"); s=Typemaker2_TypeManager_GetLanguage(tym); if (s && *s) GWEN_Buffer_AppendString(xbuf, s); Typemaker2_TypeManager_AddFolder(tym, GWEN_Buffer_GetStart(xbuf)); GWEN_Buffer_free(xbuf); } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } tlist=Typemaker2_Type_List2_new(); rv=Typemaker2_TypeManager_LoadTypeFileNoLookup(tym, fname, tlist); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unable to load file [%s] (%d)", fname, rv); return 2; } it=Typemaker2_Type_List2_First(tlist); if (it) { ty=Typemaker2_Type_List2Iterator_Data(it); while (ty) { /* DEBUG */ #if 0 Typemaker2_TypeManager_Dump(tym, stderr, 2); #endif /* only write typedef files */ rv=Typemaker2_Builder_WriteFiles(tb, ty, TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_DEFS); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return 2; } /* handle next type */ ty=Typemaker2_Type_List2Iterator_Next(it); } Typemaker2_Type_List2Iterator_free(it); } Typemaker2_Type_List2_free(tlist); return 0; } int buildDefs(GWEN_DB_NODE *dbArgs) { int i; for (i=0; i<99; i++) { const char *fileName; fileName=GWEN_DB_GetCharValue(dbArgs, "params", i, NULL); if (fileName) { int rv=doBuildDefs(dbArgs, fileName); if (rv != 0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error building type from [%s]", fileName); return 2; } } else { if (i==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No input"); GWEN_DB_Dump(dbArgs, 2); return 1; } } } return 0; } gwenhywfar-5.12.1/tools/typemaker2/tm_slot.c0000644000175000017500000001544313142134476015766 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_slot.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_slot_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(TYPEMAKER2_SLOT, Typemaker2_Slot) GWEN_LIST2_FUNCTIONS(TYPEMAKER2_SLOT, Typemaker2_Slot) TYPEMAKER2_SLOT *Typemaker2_Slot_new(void) { TYPEMAKER2_SLOT *p_struct; GWEN_NEW_OBJECT(TYPEMAKER2_SLOT, p_struct) GWEN_LIST_INIT(TYPEMAKER2_SLOT, p_struct) /* members */ p_struct->name=NULL; p_struct->paramType1=NULL; p_struct->paramType2=NULL; p_struct->flags=0; /* virtual functions */ return p_struct; } void Typemaker2_Slot_free(TYPEMAKER2_SLOT *p_struct) { if (p_struct) { GWEN_LIST_FINI(TYPEMAKER2_SLOT, p_struct) /* members */ free(p_struct->name); free(p_struct->paramType1); free(p_struct->paramType2); GWEN_FREE_OBJECT(p_struct); } } TYPEMAKER2_SLOT *Typemaker2_Slot_dup(const TYPEMAKER2_SLOT *p_src) { TYPEMAKER2_SLOT *p_struct; assert(p_src); p_struct=Typemaker2_Slot_new(); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "paramType1" */ if (p_struct->paramType1) { free(p_struct->paramType1); p_struct->paramType1=NULL; } if (p_src->paramType1) { p_struct->paramType1=strdup(p_src->paramType1); } /* member "paramType2" */ if (p_struct->paramType2) { free(p_struct->paramType2); p_struct->paramType2=NULL; } if (p_src->paramType2) { p_struct->paramType2=strdup(p_src->paramType2); } /* member "flags" */ p_struct->flags=p_src->flags; return p_struct; } TYPEMAKER2_SLOT *Typemaker2_Slot_copy(TYPEMAKER2_SLOT *p_struct, const TYPEMAKER2_SLOT *p_src) { assert(p_struct); assert(p_src); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "paramType1" */ if (p_struct->paramType1) { free(p_struct->paramType1); p_struct->paramType1=NULL; } if (p_src->paramType1) { p_struct->paramType1=strdup(p_src->paramType1); } /* member "paramType2" */ if (p_struct->paramType2) { free(p_struct->paramType2); p_struct->paramType2=NULL; } if (p_src->paramType2) { p_struct->paramType2=strdup(p_src->paramType2); } /* member "flags" */ p_struct->flags=p_src->flags; return p_struct; } const char *Typemaker2_Slot_GetName(const TYPEMAKER2_SLOT *p_struct) { assert(p_struct); return p_struct->name; } const char *Typemaker2_Slot_GetParamType1(const TYPEMAKER2_SLOT *p_struct) { assert(p_struct); return p_struct->paramType1; } const char *Typemaker2_Slot_GetParamType2(const TYPEMAKER2_SLOT *p_struct) { assert(p_struct); return p_struct->paramType2; } uint32_t Typemaker2_Slot_GetFlags(const TYPEMAKER2_SLOT *p_struct) { assert(p_struct); return p_struct->flags; } void Typemaker2_Slot_SetName(TYPEMAKER2_SLOT *p_struct, const char *p_src) { assert(p_struct); if (p_struct->name) { free(p_struct->name); } if (p_src) { p_struct->name=strdup(p_src); } else { p_struct->name=NULL; } } void Typemaker2_Slot_SetParamType1(TYPEMAKER2_SLOT *p_struct, const char *p_src) { assert(p_struct); if (p_struct->paramType1) { free(p_struct->paramType1); } if (p_src) { p_struct->paramType1=strdup(p_src); } else { p_struct->paramType1=NULL; } } void Typemaker2_Slot_SetParamType2(TYPEMAKER2_SLOT *p_struct, const char *p_src) { assert(p_struct); if (p_struct->paramType2) { free(p_struct->paramType2); } if (p_src) { p_struct->paramType2=strdup(p_src); } else { p_struct->paramType2=NULL; } } void Typemaker2_Slot_SetFlags(TYPEMAKER2_SLOT *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags=p_src; } void Typemaker2_Slot_AddFlags(TYPEMAKER2_SLOT *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags|=p_src; } void Typemaker2_Slot_SubFlags(TYPEMAKER2_SLOT *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags&=~p_src; } TYPEMAKER2_SLOT_LIST *Typemaker2_Slot_List_dup(const TYPEMAKER2_SLOT_LIST *p_src) { TYPEMAKER2_SLOT_LIST *p_dest; TYPEMAKER2_SLOT *p_elem; assert(p_src); p_dest=Typemaker2_Slot_List_new(); p_elem=Typemaker2_Slot_List_First(p_src); while (p_elem) { TYPEMAKER2_SLOT *p_cpy; p_cpy=Typemaker2_Slot_dup(p_elem); Typemaker2_Slot_List_Add(p_cpy, p_dest); p_elem=Typemaker2_Slot_List_Next(p_elem); } return p_dest; } void Typemaker2_Slot_ReadXml(TYPEMAKER2_SLOT *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ if (p_struct->name) { free(p_struct->name); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "name", NULL); if (s) p_struct->name=strdup(s); } if (p_struct->name==NULL) { /* member "name" is volatile, just presetting */ p_struct->name=NULL; } /* member "paramType1" */ if (p_struct->paramType1) { free(p_struct->paramType1); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "paramType1", NULL); if (s) p_struct->paramType1=strdup(s); } if (p_struct->paramType1==NULL) { /* member "paramType1" is volatile, just presetting */ p_struct->paramType1=NULL; } /* member "paramType2" */ if (p_struct->paramType2) { free(p_struct->paramType2); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "paramType2", NULL); if (s) p_struct->paramType2=strdup(s); } if (p_struct->paramType2==NULL) { /* member "paramType2" is volatile, just presetting */ p_struct->paramType2=NULL; } /* member "flags" */ p_struct->flags=GWEN_XMLNode_GetIntValue(p_db, "flags", 0); } void Typemaker2_Slot_WriteXml(const TYPEMAKER2_SLOT *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ GWEN_XMLNode_SetProperty(p_db, "name", p_struct->name); /* member "paramType1" */ GWEN_XMLNode_SetProperty(p_db, "paramType1", p_struct->paramType1); /* member "paramType2" */ GWEN_XMLNode_SetProperty(p_db, "paramType2", p_struct->paramType2); /* member "flags" */ GWEN_XMLNode_SetIntValue(p_db, "flags", p_struct->flags); } void Typemaker2_Slot_toXml(const TYPEMAKER2_SLOT *p_struct, GWEN_XMLNODE *p_db) { Typemaker2_Slot_WriteXml(p_struct, p_db); } TYPEMAKER2_SLOT *Typemaker2_Slot_fromXml(GWEN_XMLNODE *p_db) { TYPEMAKER2_SLOT *p_struct; p_struct=Typemaker2_Slot_new(); Typemaker2_Slot_ReadXml(p_struct, p_db); return p_struct; } /* code headers */ gwenhywfar-5.12.1/tools/typemaker2/tm_define.c0000644000175000017500000002247713142134476016244 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_define.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_define_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(TYPEMAKER2_DEFINE, Typemaker2_Define) int Typemaker2_Define_Mode_fromString(const char *p_s) { if (p_s && *p_s) { if (strcasecmp(p_s, "sequence")==0) return Typemaker2_Define_Mode_Sequence; else if (strcasecmp(p_s, "bitField")==0) return Typemaker2_Define_Mode_BitField; } return Typemaker2_Define_Mode_Unknown; } const char *Typemaker2_Define_Mode_toString(int p_i) { switch (p_i) { case Typemaker2_Define_Mode_Sequence: return "sequence"; case Typemaker2_Define_Mode_BitField: return "bitField"; default: return "unknown"; } } TYPEMAKER2_DEFINE *Typemaker2_Define_new(void) { TYPEMAKER2_DEFINE *p_struct; GWEN_NEW_OBJECT(TYPEMAKER2_DEFINE, p_struct) GWEN_LIST_INIT(TYPEMAKER2_DEFINE, p_struct) /* members */ p_struct->id=NULL; p_struct->prefix=NULL; p_struct->type=NULL; p_struct->items=Typemaker2_Item_List_new(); p_struct->mode=Typemaker2_Define_Mode_Unknown; p_struct->startValue=0; p_struct->lastValue=0; /* virtual functions */ return p_struct; } void Typemaker2_Define_free(TYPEMAKER2_DEFINE *p_struct) { if (p_struct) { GWEN_LIST_FINI(TYPEMAKER2_DEFINE, p_struct) /* members */ free(p_struct->id); free(p_struct->prefix); free(p_struct->type); Typemaker2_Item_List_free(p_struct->items); GWEN_FREE_OBJECT(p_struct); } } TYPEMAKER2_DEFINE *Typemaker2_Define_dup(const TYPEMAKER2_DEFINE *p_src) { TYPEMAKER2_DEFINE *p_struct; assert(p_src); p_struct=Typemaker2_Define_new(); /* member "id" */ if (p_struct->id) { free(p_struct->id); p_struct->id=NULL; } if (p_src->id) { p_struct->id=strdup(p_src->id); } /* member "prefix" */ if (p_struct->prefix) { free(p_struct->prefix); p_struct->prefix=NULL; } if (p_src->prefix) { p_struct->prefix=strdup(p_src->prefix); } /* member "type" */ if (p_struct->type) { free(p_struct->type); p_struct->type=NULL; } if (p_src->type) { p_struct->type=strdup(p_src->type); } /* member "items" */ if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); p_struct->items=NULL; } if (p_src->items) { p_struct->items=Typemaker2_Item_List_dup(p_src->items); } /* member "mode" */ p_struct->mode=p_src->mode; /* member "startValue" */ p_struct->startValue=p_src->startValue; /* member "lastValue" */ p_struct->lastValue=p_src->lastValue; return p_struct; } TYPEMAKER2_DEFINE *Typemaker2_Define_copy(TYPEMAKER2_DEFINE *p_struct, const TYPEMAKER2_DEFINE *p_src) { assert(p_struct); assert(p_src); /* member "id" */ if (p_struct->id) { free(p_struct->id); p_struct->id=NULL; } if (p_src->id) { p_struct->id=strdup(p_src->id); } /* member "prefix" */ if (p_struct->prefix) { free(p_struct->prefix); p_struct->prefix=NULL; } if (p_src->prefix) { p_struct->prefix=strdup(p_src->prefix); } /* member "type" */ if (p_struct->type) { free(p_struct->type); p_struct->type=NULL; } if (p_src->type) { p_struct->type=strdup(p_src->type); } /* member "items" */ if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); p_struct->items=NULL; } if (p_src->items) { p_struct->items=Typemaker2_Item_List_dup(p_src->items); } /* member "mode" */ p_struct->mode=p_src->mode; /* member "startValue" */ p_struct->startValue=p_src->startValue; /* member "lastValue" */ p_struct->lastValue=p_src->lastValue; return p_struct; } const char *Typemaker2_Define_GetId(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->id; } const char *Typemaker2_Define_GetPrefix(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->prefix; } const char *Typemaker2_Define_GetType(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->type; } TYPEMAKER2_ITEM_LIST *Typemaker2_Define_GetItems(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->items; } int Typemaker2_Define_GetMode(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->mode; } int Typemaker2_Define_GetStartValue(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->startValue; } int Typemaker2_Define_GetLastValue(const TYPEMAKER2_DEFINE *p_struct) { assert(p_struct); return p_struct->lastValue; } void Typemaker2_Define_SetId(TYPEMAKER2_DEFINE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->id) { free(p_struct->id); } if (p_src) { p_struct->id=strdup(p_src); } else { p_struct->id=NULL; } } void Typemaker2_Define_SetPrefix(TYPEMAKER2_DEFINE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->prefix) { free(p_struct->prefix); } if (p_src) { p_struct->prefix=strdup(p_src); } else { p_struct->prefix=NULL; } } void Typemaker2_Define_SetType(TYPEMAKER2_DEFINE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->type) { free(p_struct->type); } if (p_src) { p_struct->type=strdup(p_src); } else { p_struct->type=NULL; } } void Typemaker2_Define_SetItems(TYPEMAKER2_DEFINE *p_struct, const TYPEMAKER2_ITEM_LIST *p_src) { assert(p_struct); if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); } if (p_src) { p_struct->items=Typemaker2_Item_List_dup(p_src); } else { p_struct->items=Typemaker2_Item_List_new(); } } void Typemaker2_Define_SetMode(TYPEMAKER2_DEFINE *p_struct, int p_src) { assert(p_struct); p_struct->mode=p_src; } void Typemaker2_Define_SetStartValue(TYPEMAKER2_DEFINE *p_struct, int p_src) { assert(p_struct); p_struct->startValue=p_src; } void Typemaker2_Define_SetLastValue(TYPEMAKER2_DEFINE *p_struct, int p_src) { assert(p_struct); p_struct->lastValue=p_src; } TYPEMAKER2_DEFINE_LIST *Typemaker2_Define_List_dup(const TYPEMAKER2_DEFINE_LIST *p_src) { TYPEMAKER2_DEFINE_LIST *p_dest; TYPEMAKER2_DEFINE *p_elem; assert(p_src); p_dest=Typemaker2_Define_List_new(); p_elem=Typemaker2_Define_List_First(p_src); while (p_elem) { TYPEMAKER2_DEFINE *p_cpy; p_cpy=Typemaker2_Define_dup(p_elem); Typemaker2_Define_List_Add(p_cpy, p_dest); p_elem=Typemaker2_Define_List_Next(p_elem); } return p_dest; } void Typemaker2_Define_ReadXml(TYPEMAKER2_DEFINE *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "id" */ if (p_struct->id) { free(p_struct->id); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "id", NULL); if (s) p_struct->id=strdup(s); } if (p_struct->id==NULL) { /* member "id" is volatile, just presetting */ p_struct->id=NULL; } /* member "prefix" */ if (p_struct->prefix) { free(p_struct->prefix); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "prefix", NULL); if (s) p_struct->prefix=strdup(s); } if (p_struct->prefix==NULL) { /* member "prefix" is volatile, just presetting */ p_struct->prefix=NULL; } /* member "type" */ if (p_struct->type) { free(p_struct->type); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "type", NULL); if (s) p_struct->type=strdup(s); } if (p_struct->type==NULL) { /* member "type" is volatile, just presetting */ p_struct->type=NULL; } /* member "items" */ if (p_struct->items) { Typemaker2_Item_List_free(p_struct->items); } /* member "items" is volatile, just presetting */ p_struct->items=Typemaker2_Item_List_new(); /* member "mode" */ { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "mode", NULL); if (s) p_struct->mode=Typemaker2_Define_Mode_fromString(s); else p_struct->mode=Typemaker2_Define_Mode_Unknown; } /* member "startValue" */ p_struct->startValue=GWEN_XMLNode_GetIntValue(p_db, "startValue", 0); /* member "lastValue" */ /* member "lastValue" is volatile, just presetting */ p_struct->lastValue=0; } void Typemaker2_Define_WriteXml(const TYPEMAKER2_DEFINE *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "id" */ GWEN_XMLNode_SetProperty(p_db, "id", p_struct->id); /* member "prefix" */ GWEN_XMLNode_SetProperty(p_db, "prefix", p_struct->prefix); /* member "type" */ GWEN_XMLNode_SetProperty(p_db, "type", p_struct->type); /* member "items" is volatile, not writing to xml */ /* member "mode" */ GWEN_XMLNode_SetProperty(p_db, "mode", Typemaker2_Define_Mode_toString(p_struct->mode)); /* member "startValue" */ GWEN_XMLNode_SetIntValue(p_db, "startValue", p_struct->startValue); /* member "lastValue" is volatile, not writing to xml */ } void Typemaker2_Define_toXml(const TYPEMAKER2_DEFINE *p_struct, GWEN_XMLNODE *p_db) { Typemaker2_Define_WriteXml(p_struct, p_db); } TYPEMAKER2_DEFINE *Typemaker2_Define_fromXml(GWEN_XMLNODE *p_db) { TYPEMAKER2_DEFINE *p_struct; p_struct=Typemaker2_Define_new(); Typemaker2_Define_ReadXml(p_struct, p_db); return p_struct; } /* code headers */ gwenhywfar-5.12.1/tools/typemaker2/tm_inline.c0000644000175000017500000000643413315472533016264 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_inline_p.h" #include "tm_util.h" #include #include #include GWEN_LIST_FUNCTIONS(TYPEMAKER2_INLINE, Typemaker2_Inline) TYPEMAKER2_INLINE *Typemaker2_Inline_new() { TYPEMAKER2_INLINE *th; GWEN_NEW_OBJECT(TYPEMAKER2_INLINE, th); th->refCount=1; GWEN_LIST_INIT(TYPEMAKER2_INLINE, th); return th; } void Typemaker2_Inline_free(TYPEMAKER2_INLINE *th) { if (th) { assert(th->refCount); if (th->refCount==1) { GWEN_LIST_FINI(TYPEMAKER2_INLINE, th); free(th->content); th->refCount=0; GWEN_FREE_OBJECT(th); } else th->refCount++; } } void Typemaker2_Inline_Attach(TYPEMAKER2_INLINE *th) { assert(th); assert(th->refCount); th->refCount++; } const char *Typemaker2_Inline_GetContent(const TYPEMAKER2_INLINE *th) { assert(th); assert(th->refCount); return th->content; } void Typemaker2_Inline_SetContent(TYPEMAKER2_INLINE *th, const char *s) { assert(th); assert(th->refCount); free(th->content); if (s) th->content=strdup(s); else th->content=NULL; } int Typemaker2_Inline_GetLocation(const TYPEMAKER2_INLINE *th) { assert(th); assert(th->refCount); return th->location; } void Typemaker2_Inline_SetLocation(TYPEMAKER2_INLINE *th, int i) { assert(th); assert(th->refCount); th->location=i; } int Typemaker2_Inline_GetAccess(const TYPEMAKER2_INLINE *th) { assert(th); assert(th->refCount); return th->acc; } void Typemaker2_Inline_SetAccess(TYPEMAKER2_INLINE *th, int i) { assert(th); assert(th->refCount); th->acc=i; } int Typemaker2_Inline_GetTypeFlagsMask(const TYPEMAKER2_INLINE *th) { assert(th); assert(th->refCount); return th->typeFlagsMask; } int Typemaker2_Inline_GetTypeFlagsValue(const TYPEMAKER2_INLINE *th) { assert(th); assert(th->refCount); return th->typeFlagsValue; } TYPEMAKER2_INLINE *Typemaker2_Inline_fromXml(GWEN_XMLNODE *node) { TYPEMAKER2_INLINE *th; const char *s; th=Typemaker2_Inline_new(); s=GWEN_XMLNode_GetCharValue(node, "content", NULL); Typemaker2_Inline_SetContent(th, s); s=GWEN_XMLNode_GetCharValue(node, "typeFlagsMask", NULL); if (s && *s) th->typeFlagsMask=Typemaker2_TypeFlagsFromString(s); s=GWEN_XMLNode_GetCharValue(node, "typeFlagsValue", NULL); if (s && *s) th->typeFlagsValue=Typemaker2_TypeFlagsFromString(s); /* read header location */ s=GWEN_XMLNode_GetProperty(node, "loc", "post"); if (strcasecmp(s, "header")==0) Typemaker2_Inline_SetLocation(th, Typemaker2_InlineLocation_Header); else if (strcasecmp(s, "code")==0) Typemaker2_Inline_SetLocation(th, Typemaker2_InlineLocation_Code); /* read access */ s=GWEN_XMLNode_GetProperty(node, "access", "public"); Typemaker2_Inline_SetAccess(th, Typemaker2_AccessFromString(s)); return th; } gwenhywfar-5.12.1/tools/typemaker2/tm_virtualfn.h0000644000175000017500000000670213142134464017017 00000000000000/*************************************************************************** begin : Mon Jun 28 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_VIRTUALFN_H #define TYPEMAKER2_VIRTUALFN_H #include #include #include typedef struct TYPEMAKER2_VIRTUALFN TYPEMAKER2_VIRTUALFN; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_VIRTUALFN, Typemaker2_VirtualFn); typedef struct TYPEMAKER2_VIRTUALFN_PARAM TYPEMAKER2_VIRTUALFN_PARAM; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_VIRTUALFN_PARAM, Typemaker2_VirtualFn_Param); #define TYPEMAKER2_VIRTUALFN_FLAGS_FROMSLOT 0x00000001 TYPEMAKER2_VIRTUALFN *Typemaker2_VirtualFn_new(); void Typemaker2_VirtualFn_free(TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_Attach(TYPEMAKER2_VIRTUALFN *vf); int Typemaker2_VirtualFn_readXml(TYPEMAKER2_VIRTUALFN *vf, GWEN_XMLNODE *node); const char *Typemaker2_VirtualFn_GetName(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetName(TYPEMAKER2_VIRTUALFN *vf, const char *s); const char *Typemaker2_VirtualFn_GetLocation(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetLocation(TYPEMAKER2_VIRTUALFN *vf, const char *s); const char *Typemaker2_VirtualFn_GetDescr(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetDescr(TYPEMAKER2_VIRTUALFN *vf, const char *s); uint32_t Typemaker2_VirtualFn_GetFlags(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetFlags(TYPEMAKER2_VIRTUALFN *vf, uint32_t fl); void Typemaker2_VirtualFn_AddFlags(TYPEMAKER2_VIRTUALFN *vf, uint32_t fl); void Typemaker2_VirtualFn_SubFlags(TYPEMAKER2_VIRTUALFN *vf, uint32_t fl); int Typemaker2_VirtualFn_GetAccess(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetAccess(TYPEMAKER2_VIRTUALFN *vf, int i); const char *Typemaker2_VirtualFn_GetReturnType(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetReturnType(TYPEMAKER2_VIRTUALFN *vf, const char *s); const char *Typemaker2_VirtualFn_GetReturnTypeDescr(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetReturnTypeDescr(TYPEMAKER2_VIRTUALFN *vf, const char *s); const char *Typemaker2_VirtualFn_GetPreset(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetPreset(TYPEMAKER2_VIRTUALFN *vf, const char *s); const char *Typemaker2_VirtualFn_GetDefaultReturnValue(const TYPEMAKER2_VIRTUALFN *vf); void Typemaker2_VirtualFn_SetDefaultReturnValue(TYPEMAKER2_VIRTUALFN *vf, const char *s); TYPEMAKER2_VIRTUALFN_PARAM_LIST *Typemaker2_VirtualFn_GetParamTypeList(const TYPEMAKER2_VIRTUALFN *vf); TYPEMAKER2_VIRTUALFN_PARAM *Typemaker2_VirtualFn_Param_new(); void Typemaker2_VirtualFn_Param_free(TYPEMAKER2_VIRTUALFN_PARAM *prm); const char *Typemaker2_VirtualFn_Param_GetName(const TYPEMAKER2_VIRTUALFN_PARAM *prm); void Typemaker2_VirtualFn_Param_SetName(TYPEMAKER2_VIRTUALFN_PARAM *prm, const char *s); const char *Typemaker2_VirtualFn_Param_GetType(const TYPEMAKER2_VIRTUALFN_PARAM *prm); void Typemaker2_VirtualFn_Param_SetType(TYPEMAKER2_VIRTUALFN_PARAM *prm, const char *s); const char *Typemaker2_VirtualFn_Param_GetDescr(const TYPEMAKER2_VIRTUALFN_PARAM *prm); void Typemaker2_VirtualFn_Param_SetDescr(TYPEMAKER2_VIRTUALFN_PARAM *prm, const char *s); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_typemanager.h0000644000175000017500000000416713142134476017327 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_TYPEMANAGER_H #define TYPEMAKER2_TYPEMANAGER_H #include "tm_type.h" #include typedef struct TYPEMAKER2_TYPEMANAGER TYPEMAKER2_TYPEMANAGER; TYPEMAKER2_TYPEMANAGER *Typemaker2_TypeManager_new(); void Typemaker2_TypeManager_free(TYPEMAKER2_TYPEMANAGER *tym); const char *Typemaker2_TypeManager_GetLanguage(const TYPEMAKER2_TYPEMANAGER *tym); void Typemaker2_TypeManager_SetLanguage(TYPEMAKER2_TYPEMANAGER *tym, const char *s); const char *Typemaker2_TypeManager_GetApiDeclaration(const TYPEMAKER2_TYPEMANAGER *tym); void Typemaker2_TypeManager_SetApiDeclaration(TYPEMAKER2_TYPEMANAGER *tym, const char *s); void Typemaker2_TypeManager_AddFolder(TYPEMAKER2_TYPEMANAGER *tym, const char *s); void Typemaker2_TypeManager_AddType(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty); int Typemaker2_TypeManager_SetTypePtrs(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty); int Typemaker2_TypeManager_SetMemberTypePtrs(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty); TYPEMAKER2_TYPE *Typemaker2_TypeManager_FindType(TYPEMAKER2_TYPEMANAGER *tym, const char *s); TYPEMAKER2_TYPE *Typemaker2_TypeManager_GetType(TYPEMAKER2_TYPEMANAGER *tym, const char *s); TYPEMAKER2_TYPE *Typemaker2_TypeManager_LoadTypeFile(TYPEMAKER2_TYPEMANAGER *tym, const char *fileName); int Typemaker2_TypeManager_LoadTypeFile2(TYPEMAKER2_TYPEMANAGER *tym, const char *fileName, TYPEMAKER2_TYPE_LIST2 *tlist2); int Typemaker2_TypeManager_LoadTypeFileNoLookup(TYPEMAKER2_TYPEMANAGER *tym, const char *fileName, TYPEMAKER2_TYPE_LIST2 *tlist2); void Typemaker2_TypeManager_Dump(TYPEMAKER2_TYPEMANAGER *tym, FILE *f, int indent); #endif gwenhywfar-5.12.1/tools/typemaker2/Makefile.in0000644000175000017500000010612715032533615016204 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = typemaker2$(EXEEXT) @IS_WINDOWS_TRUE@am__append_1 = $(PROG_LIBRARIES) subdir = tools/typemaker2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_typemaker2_OBJECTS = tm_type.$(OBJEXT) tm_member.$(OBJEXT) \ tm_header.$(OBJEXT) tm_util.$(OBJEXT) tm_typemanager.$(OBJEXT) \ tm_builder.$(OBJEXT) tm_item.$(OBJEXT) tm_enum.$(OBJEXT) \ tm_define.$(OBJEXT) tm_code.$(OBJEXT) tm_inline.$(OBJEXT) \ tm_virtualfn.$(OBJEXT) tm_signal.$(OBJEXT) tm_slot.$(OBJEXT) \ tm_group.$(OBJEXT) build.$(OBJEXT) builddefs.$(OBJEXT) \ main.$(OBJEXT) typemaker2_OBJECTS = $(am_typemaker2_OBJECTS) am__DEPENDENCIES_1 = @IS_WINDOWS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) typemaker2_DEPENDENCIES = c/libtm2_c.la \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = typemaker2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(typemaker2_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/build.Po ./$(DEPDIR)/builddefs.Po \ ./$(DEPDIR)/main.Po ./$(DEPDIR)/tm_builder.Po \ ./$(DEPDIR)/tm_code.Po ./$(DEPDIR)/tm_define.Po \ ./$(DEPDIR)/tm_enum.Po ./$(DEPDIR)/tm_group.Po \ ./$(DEPDIR)/tm_header.Po ./$(DEPDIR)/tm_inline.Po \ ./$(DEPDIR)/tm_item.Po ./$(DEPDIR)/tm_member.Po \ ./$(DEPDIR)/tm_signal.Po ./$(DEPDIR)/tm_slot.Po \ ./$(DEPDIR)/tm_type.Po ./$(DEPDIR)/tm_typemanager.Po \ ./$(DEPDIR)/tm_util.Po ./$(DEPDIR)/tm_virtualfn.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(typemaker2_SOURCES) DIST_SOURCES = $(typemaker2_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ SUBDIRS = c types AM_CPPFLAGS = @all_includes@ -I$(gwenhywfar_symlinkdir) \ -I$(srcdir)/c \ -I$(builddir)/c typefiles = \ tm_item.xml \ tm_enum.xml \ tm_define.xml \ tm_code.xml \ tm_signal.xml \ tm_slot.xml noinst_HEADERS = \ tm_type_p.h tm_type.h \ tm_member_p.h tm_member.h \ tm_header_p.h tm_header.h \ tm_typemanager_p.h tm_typemanager.h \ tm_virtualfn_p.h tm_virtualfn.h \ tm_builder_p.h tm_builder.h \ tm_item_p.h tm_item.h \ tm_enum_p.h tm_enum.h \ tm_define_p.h tm_define.h \ tm_code_p.h tm_code.h \ tm_inline_p.h tm_inline.h \ tm_signal_p.h tm_signal.h \ tm_slot_p.h tm_slot.h \ tm_group_p.h tm_group.h \ tm_util.h \ typemaker2.h typemaker2_SOURCES = \ tm_type.c \ tm_member.c \ tm_header.c \ tm_util.c \ tm_typemanager.c \ tm_builder.c \ tm_item.c \ tm_enum.c \ tm_define.c \ tm_code.c \ tm_inline.c \ tm_virtualfn.c \ tm_signal.c \ tm_slot.c \ tm_group.c \ build.c \ builddefs.c \ main.c # tm_enum.c typemaker2_LDADD = c/libtm2_c.la \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__append_1) @IS_WINDOWS_TRUE@typemaker2_LDFLAGS = -mconsole EXTRA_DIST = $(typefiles) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/typemaker2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/typemaker2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list typemaker2$(EXEEXT): $(typemaker2_OBJECTS) $(typemaker2_DEPENDENCIES) $(EXTRA_typemaker2_DEPENDENCIES) @rm -f typemaker2$(EXEEXT) $(AM_V_CCLD)$(typemaker2_LINK) $(typemaker2_OBJECTS) $(typemaker2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builddefs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_builder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_code.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_define.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_enum.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_group.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_inline.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_item.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_member.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_slot.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_type.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_typemanager.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_util.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tm_virtualfn.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/build.Po -rm -f ./$(DEPDIR)/builddefs.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/tm_builder.Po -rm -f ./$(DEPDIR)/tm_code.Po -rm -f ./$(DEPDIR)/tm_define.Po -rm -f ./$(DEPDIR)/tm_enum.Po -rm -f ./$(DEPDIR)/tm_group.Po -rm -f ./$(DEPDIR)/tm_header.Po -rm -f ./$(DEPDIR)/tm_inline.Po -rm -f ./$(DEPDIR)/tm_item.Po -rm -f ./$(DEPDIR)/tm_member.Po -rm -f ./$(DEPDIR)/tm_signal.Po -rm -f ./$(DEPDIR)/tm_slot.Po -rm -f ./$(DEPDIR)/tm_type.Po -rm -f ./$(DEPDIR)/tm_typemanager.Po -rm -f ./$(DEPDIR)/tm_util.Po -rm -f ./$(DEPDIR)/tm_virtualfn.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/build.Po -rm -f ./$(DEPDIR)/builddefs.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/tm_builder.Po -rm -f ./$(DEPDIR)/tm_code.Po -rm -f ./$(DEPDIR)/tm_define.Po -rm -f ./$(DEPDIR)/tm_enum.Po -rm -f ./$(DEPDIR)/tm_group.Po -rm -f ./$(DEPDIR)/tm_header.Po -rm -f ./$(DEPDIR)/tm_inline.Po -rm -f ./$(DEPDIR)/tm_item.Po -rm -f ./$(DEPDIR)/tm_member.Po -rm -f ./$(DEPDIR)/tm_signal.Po -rm -f ./$(DEPDIR)/tm_slot.Po -rm -f ./$(DEPDIR)/tm_type.Po -rm -f ./$(DEPDIR)/tm_typemanager.Po -rm -f ./$(DEPDIR)/tm_util.Po -rm -f ./$(DEPDIR)/tm_virtualfn.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile #BUILT_SOURCES= sources: for f in $(typemaker2_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done indent: $(BUILT_SOURCES) $(ASTYLE) \ --style=gnu \ --indent=spaces=2 \ --min-conditional-indent=0 \ --indent-labels \ --pad=oper \ --one-line=keep-blocks \ --suffix=none \ -a -y $(BUILT_SOURCES) types: $(typefiles) ./typemaker2 -I types/c -I $(srcdir) $(typefiles) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/typemaker2/tm_util.h0000644000175000017500000000125013314432532015751 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_UTIL_H #define TYPEMAKER2_UTIL_H #include uint32_t Typemaker2_FlagsFromString(const char *s); uint32_t Typemaker2_TypeFlagsFromString(const char *t); int Typemaker2_AccessFromString(const char *s); #endif gwenhywfar-5.12.1/tools/typemaker2/typemaker2.h0000644000175000017500000000113613142134464016364 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_TYPEMAKER2_H #define TYPEMAKER2_TYPEMAKER2_H #include int build(GWEN_DB_NODE *dbArgs); int buildDefs(GWEN_DB_NODE *dbArgs); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_inline_p.h0000644000175000017500000000131313142134464016573 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_INLINE_P_H #define TYPEMAKER2_INLINE_P_H #include "tm_inline.h" struct TYPEMAKER2_INLINE { GWEN_LIST_ELEMENT(TYPEMAKER2_INLINE) char *content; int acc; int location; uint32_t typeFlagsMask; uint32_t typeFlagsValue; int refCount; }; #endif gwenhywfar-5.12.1/tools/typemaker2/tm_builder.c0000664000175000017500000013015314300147217016423 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_builder_p.h" #include "tm_member.h" #include #include #include #include #include #include /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static void setCharValueWithTypePrefix(GWEN_DB_NODE *db, const char *prefix, const char *varName, const char *value); static void addMemberInfoToCallDb(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_DB_NODE *db, int withTypePrefix); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ GWEN_INHERIT_FUNCTIONS(TYPEMAKER2_BUILDER) TYPEMAKER2_BUILDER *Typemaker2_Builder_new() { TYPEMAKER2_BUILDER *tb; GWEN_NEW_OBJECT(TYPEMAKER2_BUILDER, tb); GWEN_INHERIT_INIT(TYPEMAKER2_BUILDER, tb); tb->declarationsPublic=GWEN_StringList_new(); tb->declarationsLibrary=GWEN_StringList_new(); tb->declarationsProtected=GWEN_StringList_new(); tb->declarationsPrivate=GWEN_StringList_new(); tb->code=GWEN_StringList_new(); return tb; } void Typemaker2_Builder_free(TYPEMAKER2_BUILDER *tb) { if (tb) { GWEN_INHERIT_FINI(TYPEMAKER2_BUILDER, tb); GWEN_StringList_free(tb->declarationsPublic); GWEN_StringList_free(tb->declarationsLibrary); GWEN_StringList_free(tb->declarationsProtected); GWEN_StringList_free(tb->declarationsPrivate); GWEN_StringList_free(tb->code); free(tb->fileNamePublic); free(tb->fileNameLibrary); free(tb->fileNameProtected); free(tb->fileNamePrivate); free(tb->fileNameCode); free(tb->destFolder); GWEN_FREE_OBJECT(tb); } } GWEN_STRINGLIST *Typemaker2_Builder_GetPublicDeclarations(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->declarationsPublic; } GWEN_STRINGLIST *Typemaker2_Builder_GetLibraryDeclarations(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->declarationsLibrary; } GWEN_STRINGLIST *Typemaker2_Builder_GetProtectedDeclarations(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->declarationsProtected; } GWEN_STRINGLIST *Typemaker2_Builder_GetPrivateDeclarations(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->declarationsPrivate; } GWEN_STRINGLIST *Typemaker2_Builder_GetCode(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->code; } TYPEMAKER2_TYPEMANAGER *Typemaker2_Builder_GetTypeManager(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->typeManager; } void Typemaker2_Builder_SetTypeManager(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPEMANAGER *tm) { assert(tb); tb->typeManager=tm; } void Typemaker2_Builder_AddDeclaration(TYPEMAKER2_BUILDER *tb, int access, const char *s) { switch (access) { case TypeMaker2_Access_Public: Typemaker2_Builder_AddPublicDeclaration(tb, s); break; case TypeMaker2_Access_Library: Typemaker2_Builder_AddLibraryDeclaration(tb, s); break; case TypeMaker2_Access_Protected: Typemaker2_Builder_AddProtectedDeclaration(tb, s); break; case TypeMaker2_Access_Private: Typemaker2_Builder_AddPrivateDeclaration(tb, s); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Invalid access type"); break; } } void Typemaker2_Builder_AddPublicDeclaration(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); GWEN_StringList_AppendString(tb->declarationsPublic, s, 0, 0); } void Typemaker2_Builder_AddLibraryDeclaration(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); GWEN_StringList_AppendString(tb->declarationsLibrary, s, 0, 0); } void Typemaker2_Builder_AddProtectedDeclaration(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); GWEN_StringList_AppendString(tb->declarationsProtected, s, 0, 0); } void Typemaker2_Builder_AddPrivateDeclaration(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); GWEN_StringList_AppendString(tb->declarationsPrivate, s, 0, 0); } void Typemaker2_Builder_AddCode(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); GWEN_StringList_AppendString(tb->code, s, 0, 0); } const char *Typemaker2_Builder_GetFileNamePublic(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->fileNamePublic; } void Typemaker2_Builder_SetFileNamePublic(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->fileNamePublic); if (s) tb->fileNamePublic=strdup(s); else tb->fileNamePublic=NULL; } const char *Typemaker2_Builder_GetFileNameLibrary(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->fileNameLibrary; } void Typemaker2_Builder_SetFileNameLibrary(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->fileNameLibrary); if (s) tb->fileNameLibrary=strdup(s); else tb->fileNameLibrary=NULL; } const char *Typemaker2_Builder_GetFileNameProtected(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->fileNameProtected; } void Typemaker2_Builder_SetFileNameProtected(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->fileNameProtected); if (s) tb->fileNameProtected=strdup(s); else tb->fileNameProtected=NULL; } const char *Typemaker2_Builder_GetFileNamePrivate(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->fileNamePrivate; } void Typemaker2_Builder_SetFileNamePrivate(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->fileNamePrivate); if (s) tb->fileNamePrivate=strdup(s); else tb->fileNamePrivate=NULL; } const char *Typemaker2_Builder_GetFileNameCode(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->fileNameCode; } void Typemaker2_Builder_SetFileNameCode(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->fileNameCode); if (s) tb->fileNameCode=strdup(s); else tb->fileNameCode=NULL; } const char *Typemaker2_Builder_GetSourceFileName(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->sourceFileName; } void Typemaker2_Builder_SetSourceFileName(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->sourceFileName); if (s) tb->sourceFileName=strdup(s); else tb->sourceFileName=NULL; } const char *Typemaker2_Builder_GetDestFolderName(const TYPEMAKER2_BUILDER *tb) { assert(tb); return tb->destFolder; } void Typemaker2_Builder_SetDestFolderName(TYPEMAKER2_BUILDER *tb, const char *s) { assert(tb); free(tb->destFolder); if (s) tb->destFolder=strdup(s); else tb->destFolder=NULL; } void Typemaker2_Builder_SetBuildFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_BUILDER_BUILD_FN fn) { assert(tb); tb->buildFn=fn; } int Typemaker2_Builder_Build(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { assert(tb); if (tb->buildFn) return tb->buildFn(tb, ty); else return GWEN_ERROR_NOT_SUPPORTED; } GWEN_DB_NODE *Typemaker2_Builder_CreateDbForCall(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst) { GWEN_DB_NODE *db; const char *s; db=GWEN_DB_Group_new("vars"); if (tb->typeManager) { s=Typemaker2_TypeManager_GetApiDeclaration(tb->typeManager); if (s && *s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "api", s); else GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "", s); } /* set some type vars */ if (ty) { TYPEMAKER2_TYPE *bty; TYPEMAKER2_MEMBER_LIST *tml; s=Typemaker2_Type_GetIdentifier(ty); if (s && *s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "struct_type", s); s=Typemaker2_Type_GetPrefix(ty); if (s && *s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "struct_prefix", s); bty=Typemaker2_Type_GetBaseTypePtr(ty); if (bty) { s=Typemaker2_Type_GetIdentifier(bty); if (s && *s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "basetype_type", s); s=Typemaker2_Type_GetPrefix(bty); if (s && *s) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "basetype_prefix", s); } tml=Typemaker2_Type_GetMembers(ty); if (tml) { TYPEMAKER2_MEMBER *tmm; tmm=Typemaker2_Member_List_First(tml); while (tmm) { /* write members with prefix */ addMemberInfoToCallDb(tb, ty, tmm, db, 1); tmm=Typemaker2_Member_List_Next(tmm); } } } /* set some member vars */ if (tm) /* write specific member without prefix */ addMemberInfoToCallDb(tb, ty, tm, db, 0); /* set src and dst */ if (src && *src) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "src", src); if (dst && *dst) GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "dst", dst); /* set some fixed vars */ GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "retval", "p_rv"); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "db", "p_db"); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, "buffer", "p_buffer"); return db; } void addMemberInfoToCallDb(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, GWEN_UNUSED TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_DB_NODE *db, int withTypePrefix) { const char *s; const char *prefix=NULL; char numbuf[32]; TYPEMAKER2_TYPE *mty; s=Typemaker2_Member_GetName(tm); if (withTypePrefix) prefix=s; if (s && *s) { GWEN_BUFFER *tbuf; setCharValueWithTypePrefix(db, prefix, "name", s); tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendByte(tbuf, toupper(*s)); GWEN_Buffer_AppendString(tbuf, s+1); setCharValueWithTypePrefix(db, prefix, "nameWithCapital", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } s=Typemaker2_Member_GetElementName(tm); if (s && *s) setCharValueWithTypePrefix(db, prefix, "element_name", s); else /* default behaviour is to use the name "element" for list members in GWEN_DBs */ setCharValueWithTypePrefix(db, prefix, "element_name", "element"); setCharValueWithTypePrefix(db, prefix, "default", Typemaker2_Member_GetDefaultValue(tm)); setCharValueWithTypePrefix(db, prefix, "preset", Typemaker2_Member_GetPresetValue(tm)); if (!(Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_VOLATILE)) { /* set field number for toObject/fromObject */ s=Typemaker2_Member_GetFieldId(tm); if (s && *s) setCharValueWithTypePrefix(db, prefix, "fieldid", s); } /* maxlen */ snprintf(numbuf, sizeof(numbuf)-1, "%d", Typemaker2_Member_GetMaxLen(tm)); setCharValueWithTypePrefix(db, prefix, "maxlen", numbuf); /* set basetype stuff */ mty=Typemaker2_Member_GetTypePtr(tm); assert(mty); if (mty) { TYPEMAKER2_TYPE *bty; setCharValueWithTypePrefix(db, prefix, "member_type", Typemaker2_Type_GetIdentifier(mty)); setCharValueWithTypePrefix(db, prefix, "member_prefix", Typemaker2_Type_GetPrefix(mty)); bty=Typemaker2_Type_GetBaseTypePtr(mty); if (bty) { setCharValueWithTypePrefix(db, prefix, "member_basetype_type", Typemaker2_Type_GetIdentifier(bty)); setCharValueWithTypePrefix(db, prefix, "member_basetype_prefix", Typemaker2_Type_GetPrefix(bty)); } } /* set enum-specific stuff */ if (Typemaker2_Member_GetFlags(tm) & TYPEMAKER2_FLAGS_ENUM) { TYPEMAKER2_ENUM *te; te=Typemaker2_Member_GetEnumPtr(tm); if (te) { setCharValueWithTypePrefix(db, prefix, "enum_fromstring_fn", Typemaker2_Enum_GetFromStringFn(te)); setCharValueWithTypePrefix(db, prefix, "enum_tostring_fn", Typemaker2_Enum_GetToStringFn(te)); } } } void setCharValueWithTypePrefix(GWEN_DB_NODE *db, const char *prefix, const char *varName, const char *value) { if (value) { if (prefix && *prefix) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, prefix); GWEN_Buffer_AppendString(tbuf, "."); GWEN_Buffer_AppendString(tbuf, varName); GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_Buffer_GetStart(tbuf), value); GWEN_Buffer_free(tbuf); } else { GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS, varName, value); } } } int Typemaker2_Builder_ReplaceVars(const char *s, GWEN_DB_NODE *db, GWEN_BUFFER *dbuf) { const char *p; p=s; while (*p) { if (*p=='$') { p++; if (*p=='$') GWEN_Buffer_AppendByte(dbuf, '$'); else if (*p=='(') { const char *pStart; p++; pStart=p; while (*p && *p!=')') p++; if (*p!=')') { DBG_ERROR(GWEN_LOGDOMAIN, "Unterminated variable name in code"); return GWEN_ERROR_BAD_DATA; } else { int len; char *name; const char *v; len=p-pStart; if (len<1) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty variable name in code"); return GWEN_ERROR_BAD_DATA; } name=(char *) malloc(len+1); assert(name); memmove(name, pStart, len); name[len]=0; v=GWEN_DB_GetCharValue(db, name, 0, NULL); if (v) { free(name); GWEN_Buffer_AppendString(dbuf, v); } #if 0 /* just replace with empty value */ else { GWEN_Buffer_AppendString(dbuf, " [__VALUE OF "); GWEN_Buffer_AppendString(dbuf, name); GWEN_Buffer_AppendString(dbuf, " WAS NOT SET__] "); free(name); } #endif } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Bad variable string in code"); return GWEN_ERROR_BAD_DATA; } p++; } else { if (*p=='#') { /* let # lines begin on a new line */ GWEN_Buffer_AppendByte(dbuf, '\n'); GWEN_Buffer_AppendByte(dbuf, *p); /* skip introducing cross and copy all stuff until the next cross * upon which wa inject a newline (to make the preprocessor happy) */ p++; while (*p && *p!='#') { GWEN_Buffer_AppendByte(dbuf, *p); p++; } if (*p=='#') { GWEN_Buffer_AppendByte(dbuf, '\n'); p++; } } else if (*p=='\\') { /* check for recognized control escapes */ if (tolower(p[1])=='n') { GWEN_Buffer_AppendByte(dbuf, '\n'); p+=2; /* skip introducing backslash and control character */ } else if (tolower(p[1])=='t') { GWEN_Buffer_AppendByte(dbuf, '\t'); p+=2; /* skip introducing backslash and control character */ } else if (tolower(p[1])=='\\') { GWEN_Buffer_AppendByte(dbuf, '\\'); p+=2; /* skip introducing backslash and control character */ } else { /* no known escape character, just add literally */ GWEN_Buffer_AppendByte(dbuf, *p); p++; } } else { GWEN_Buffer_AppendByte(dbuf, *p); p++; } } } return 0; } #define INVOKE_FN(macro_var1) \ int Typemaker2_Builder_Invoke_##macro_var1##Fn(TYPEMAKER2_BUILDER *tb, \ TYPEMAKER2_TYPE *ty, \ TYPEMAKER2_MEMBER *tm, \ const char *src, \ const char *dst, \ GWEN_BUFFER *dbuf) { \ if (tm) { \ TYPEMAKER2_TYPE *mty; \ TYPEMAKER2_CODE *tc; \ const char *s=NULL; \ \ mty=Typemaker2_Member_GetTypePtr(tm); \ if (mty==NULL) { \ DBG_ERROR(GWEN_LOGDOMAIN, "No type pointer for member"); \ return GWEN_ERROR_NO_DATA; \ } \ tc=Typemaker2_Type_FindCodeForMember(mty, tm, __STRING(macro_var1));\ if (tc) \ s=Typemaker2_Code_GetCode(tc); \ if (s && *s) { \ GWEN_DB_NODE *db; \ int rv; \ \ db=Typemaker2_Builder_CreateDbForCall(tb, ty, tm, src, dst); \ if (db==NULL) { \ DBG_INFO(GWEN_LOGDOMAIN, "here"); \ return GWEN_ERROR_BAD_DATA; \ } \ \ if (0) { \ GWEN_Buffer_AppendString(dbuf, "/* function \""); \ GWEN_Buffer_AppendString(dbuf, __STRING(macro_var1)); \ GWEN_Buffer_AppendString(dbuf, "\" of type \""); \ GWEN_Buffer_AppendString(dbuf, Typemaker2_Type_GetName(mty)); \ GWEN_Buffer_AppendString(dbuf, "\" */\n"); \ } \ rv=Typemaker2_Builder_ReplaceVars(s, db, dbuf); \ GWEN_DB_Group_free(db); \ if (rv<0) { \ DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); \ return rv; \ } \ return 0; \ } \ else { \ DBG_INFO(GWEN_LOGDOMAIN, "No code for type [%s]", \ Typemaker2_Type_GetName(mty)); \ return 0; \ } \ } \ else { \ DBG_ERROR(GWEN_LOGDOMAIN, "No member information"); \ return GWEN_ERROR_NO_DATA; \ } \ } INVOKE_FN(Construct); INVOKE_FN(Destruct); INVOKE_FN(Assign); INVOKE_FN(Dup); INVOKE_FN(Compare); INVOKE_FN(ToDb); INVOKE_FN(FromDb); INVOKE_FN(ToXml); INVOKE_FN(FromXml); INVOKE_FN(ToObject); INVOKE_FN(FromObject); INVOKE_FN(ToHashString); int Typemaker2_Builder_WriteFile(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName, GWEN_STRINGLIST *sl, int acc) { GWEN_STRINGLISTENTRY *se; FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "/**********************************************************\n" " * This file has been automatically created by \"typemaker2\"\n" " * from the file \"%s\".\n" " * Please do not edit this file, all changes will be lost.\n" " * Better edit the mentioned source file instead.\n" " **********************************************************/\n" "\n", Typemaker2_Builder_GetSourceFileName(tb)); if (acc==TypeMaker2_Access_Unknown) { const char *s; TYPEMAKER2_HEADER_LIST *hl; fprintf(f, "#ifdef HAVE_CONFIG_H\n# include \n#endif\n\n"); s=tb->fileNamePrivate; if (s==NULL) s=tb->fileNameLibrary; if (s==NULL) s=tb->fileNameProtected; if (s==NULL) s=tb->fileNamePublic; if (s) { fprintf(f, "#include \"%s\"\n\n", s); } /* add some needed headers */ fprintf(f, "#include \n"); fprintf(f, "#include \n"); /* write code headers */ fprintf(f, "\n"); fprintf(f, "/* code headers */\n"); hl=Typemaker2_Type_GetHeaders(ty); if (hl) { TYPEMAKER2_HEADER *h; h=Typemaker2_Header_List_First(hl); while (h) { if (Typemaker2_Header_GetLocation(h)==Typemaker2_HeaderLocation_Code) { if (Typemaker2_Header_GetType(h)==Typemaker2_HeaderType_System) fprintf(f, "#include <%s>\n", Typemaker2_Header_GetFileName(h)); else fprintf(f, "#include \"%s\"\n", Typemaker2_Header_GetFileName(h)); } h=Typemaker2_Header_List_Next(h); } } fprintf(f, "\n"); } else { GWEN_BUFFER *xbuf; char *p; const char *s; xbuf=GWEN_Buffer_new(0, 256, 0, 1); s=Typemaker2_Type_GetName(ty); GWEN_Buffer_AppendString(xbuf, s); GWEN_Buffer_AppendString(xbuf, "_"); s=strrchr(fileName, GWEN_DIR_SEPARATOR); if (s && *s) GWEN_Buffer_AppendString(xbuf, s+1); else GWEN_Buffer_AppendString(xbuf, fileName); p=GWEN_Buffer_GetStart(xbuf); while (*p) { if (!isalnum(*p)) *p='_'; else *p=toupper(*p); p++; } fprintf(f, "#ifndef %s\n", GWEN_Buffer_GetStart(xbuf)); fprintf(f, "#define %s\n\n", GWEN_Buffer_GetStart(xbuf)); s=NULL; switch (acc) { case TypeMaker2_Access_Unknown: s=tb->fileNamePrivate; if (s) break; case TypeMaker2_Access_Private: s=tb->fileNameLibrary; if (s) break; case TypeMaker2_Access_Library: s=tb->fileNameProtected; if (s) break; case TypeMaker2_Access_Protected: s=tb->fileNamePublic; if (s) break; default: break; } if (s) { fprintf(f, "#include \"%s\"\n\n", s); } fprintf(f, "\n"); fprintf(f, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n"); GWEN_Buffer_free(xbuf); } se=GWEN_StringList_FirstEntry(sl); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); if (s) fprintf(f, "%s\n", s); se=GWEN_StringListEntry_Next(se); } if (acc==TypeMaker2_Access_Unknown) { TYPEMAKER2_HEADER_LIST *hl; /* write codeEnd headers */ fprintf(f, "\n"); fprintf(f, "/* code headers */\n"); hl=Typemaker2_Type_GetHeaders(ty); if (hl) { TYPEMAKER2_HEADER *h; h=Typemaker2_Header_List_First(hl); while (h) { if (Typemaker2_Header_GetLocation(h)==Typemaker2_HeaderLocation_CodeEnd) { if (Typemaker2_Header_GetType(h)==Typemaker2_HeaderType_System) fprintf(f, "#include <%s>\n", Typemaker2_Header_GetFileName(h)); else fprintf(f, "#include \"%s\"\n", Typemaker2_Header_GetFileName(h)); } h=Typemaker2_Header_List_Next(h); } } fprintf(f, "\n"); } if (acc!=TypeMaker2_Access_Unknown) { fprintf(f, "#ifdef __cplusplus\n}\n#endif\n\n"); fprintf(f, "#endif\n\n"); } if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_WriteTypedefFile(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName) { FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, " \n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s\n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s\n", Typemaker2_Type_GetPrefix(ty)); fprintf(f, " \n"); fprintf(f, "\n"); if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_WriteTypedefFile_List1(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName) { FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, " \n", Typemaker2_Type_GetName(ty), Typemaker2_Type_GetName(ty)); fprintf(f, " %s_LIST\n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s_List\n", Typemaker2_Type_GetPrefix(ty)); fprintf(f, " \n"); fprintf(f, "\n"); if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_WriteTypedefFile_List2(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName) { FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, " \n", Typemaker2_Type_GetName(ty), Typemaker2_Type_GetName(ty)); fprintf(f, " %s_LIST2\n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s_List2\n", Typemaker2_Type_GetPrefix(ty)); fprintf(f, " \n"); fprintf(f, "\n"); if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_WriteTypedefFile_Tree(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName) { FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, " \n", Typemaker2_Type_GetName(ty), Typemaker2_Type_GetName(ty)); fprintf(f, " %s_TREE\n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s_Tree\n", Typemaker2_Type_GetPrefix(ty)); fprintf(f, " \n"); fprintf(f, "\n"); if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_WriteTypedefFile_Tree2(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName) { FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, " \n", Typemaker2_Type_GetName(ty), Typemaker2_Type_GetName(ty)); fprintf(f, " %s_TREE2\n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s_Tree2\n", Typemaker2_Type_GetPrefix(ty)); fprintf(f, " \n"); fprintf(f, "\n"); if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_WriteTypedefFile_IdMap(GWEN_UNUSED TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName) { FILE *f; f=fopen(fileName, "w"); if (f==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "fopen(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, "\n"); fprintf(f, " \n", Typemaker2_Type_GetName(ty), Typemaker2_Type_GetName(ty)); fprintf(f, " %s_IDMAP\n", Typemaker2_Type_GetName(ty)); fprintf(f, " %s_IdMap\n", Typemaker2_Type_GetPrefix(ty)); fprintf(f, " \n"); fprintf(f, "\n"); if (fclose(f)) { DBG_ERROR(GWEN_LOGDOMAIN, "fclose(%s): %s (%d)", fileName, strerror(errno), errno); return GWEN_ERROR_IO; } return 0; } int Typemaker2_Builder_DetermineOutFileNames(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { const char *fname; if (GWEN_StringList_Count(tb->declarationsPublic)) { fname=tb->fileNamePublic; if (fname==NULL || *fname==0) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetBaseFileName(ty); if (s==NULL || *s==0) { s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, ".h"); fname=GWEN_Buffer_GetStart(tbuf); Typemaker2_Builder_SetFileNamePublic(tb, fname); GWEN_Buffer_free(tbuf); } } if (GWEN_StringList_Count(tb->declarationsLibrary)) { fname=tb->fileNameLibrary; if (fname==NULL || *fname==0) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetBaseFileName(ty); if (s==NULL || *s==0) { s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_l.h"); fname=GWEN_Buffer_GetStart(tbuf); Typemaker2_Builder_SetFileNameLibrary(tb, fname); GWEN_Buffer_free(tbuf); } } if (GWEN_StringList_Count(tb->declarationsProtected)) { fname=tb->fileNameProtected; if (fname==NULL || *fname==0) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetBaseFileName(ty); if (s==NULL || *s==0) { s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_be.h"); fname=GWEN_Buffer_GetStart(tbuf); Typemaker2_Builder_SetFileNameProtected(tb, fname); GWEN_Buffer_free(tbuf); } } if (GWEN_StringList_Count(tb->declarationsPrivate)) { fname=tb->fileNamePrivate; if (fname==NULL || *fname==0) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetBaseFileName(ty); if (s==NULL || *s==0) { s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_p.h"); fname=GWEN_Buffer_GetStart(tbuf); Typemaker2_Builder_SetFileNamePrivate(tb, fname); GWEN_Buffer_free(tbuf); } } if (GWEN_StringList_Count(tb->code)) { fname=tb->fileNameCode; if (fname==NULL || *fname==0) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetBaseFileName(ty); if (s==NULL || *s==0) { s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, ".c"); fname=GWEN_Buffer_GetStart(tbuf); Typemaker2_Builder_SetFileNameCode(tb, fname); GWEN_Buffer_free(tbuf); } } return 0; } int Typemaker2_Builder_WriteFiles(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, uint32_t writeFlags) { const char *fname; int rv; rv=Typemaker2_Builder_DetermineOutFileNames(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (writeFlags & TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_TYPE) { if (GWEN_StringList_Count(tb->declarationsPublic)) { fname=tb->fileNamePublic; assert(fname); rv=Typemaker2_Builder_WriteFile(tb, ty, fname, tb->declarationsPublic, TypeMaker2_Access_Public); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (GWEN_StringList_Count(tb->declarationsLibrary)) { fname=tb->fileNameLibrary; assert(fname); rv=Typemaker2_Builder_WriteFile(tb, ty, fname, tb->declarationsLibrary, TypeMaker2_Access_Library); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (GWEN_StringList_Count(tb->declarationsProtected)) { fname=tb->fileNameProtected; assert(fname); rv=Typemaker2_Builder_WriteFile(tb, ty, fname, tb->declarationsProtected, TypeMaker2_Access_Protected); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (GWEN_StringList_Count(tb->declarationsPrivate)) { fname=tb->fileNamePrivate; assert(fname); rv=Typemaker2_Builder_WriteFile(tb, ty, fname, tb->declarationsPrivate, TypeMaker2_Access_Private); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } if (GWEN_StringList_Count(tb->code)) { fname=tb->fileNameCode; assert(fname); rv=Typemaker2_Builder_WriteFile(tb, ty, fname, tb->code, TypeMaker2_Access_Unknown); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } /* write typedef file */ if (writeFlags & TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_DEFS) { if (1) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, ".tm2"); fname=GWEN_Buffer_GetStart(tbuf); rv=Typemaker2_Builder_WriteTypedefFile(tb, ty, fname); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } /* write typedef file for list1 */ if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_list.tm2"); fname=GWEN_Buffer_GetStart(tbuf); rv=Typemaker2_Builder_WriteTypedefFile_List1(tb, ty, fname); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } /* write typedef file for list2 */ if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_list2.tm2"); fname=GWEN_Buffer_GetStart(tbuf); rv=Typemaker2_Builder_WriteTypedefFile_List2(tb, ty, fname); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } /* write typedef file for tree */ if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_TREE) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_tree.tm2"); fname=GWEN_Buffer_GetStart(tbuf); rv=Typemaker2_Builder_WriteTypedefFile_Tree(tb, ty, fname); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } /* write typedef file for tree2 */ if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_TREE2) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_tree2.tm2"); fname=GWEN_Buffer_GetStart(tbuf); rv=Typemaker2_Builder_WriteTypedefFile_Tree2(tb, ty, fname); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } /* write typedef file for idmap */ if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_IDMAP) { const char *s; char *t; GWEN_BUFFER *tbuf; s=Typemaker2_Type_GetName(ty); if (s==NULL || *s==0) { DBG_ERROR(GWEN_LOGDOMAIN, "Type has no name"); return GWEN_ERROR_BAD_DATA; } tbuf=GWEN_Buffer_new(0, 256, 0, 1); if (tb->destFolder) { GWEN_Buffer_AppendString(tbuf, tb->destFolder); GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S); } GWEN_Buffer_AppendString(tbuf, s); t=GWEN_Buffer_GetStart(tbuf); while (*t) { *t=tolower(*t); t++; } GWEN_Buffer_AppendString(tbuf, "_idmap.tm2"); fname=GWEN_Buffer_GetStart(tbuf); rv=Typemaker2_Builder_WriteTypedefFile_IdMap(tb, ty, fname); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } return 0; } int Typemaker2_Builder_PrintFileNames(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty) { int rv; rv=Typemaker2_Builder_DetermineOutFileNames(tb, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } if (GWEN_StringList_Count(tb->declarationsPublic)) fprintf(stdout, "%s\n", tb->fileNamePublic); if (GWEN_StringList_Count(tb->declarationsLibrary)) fprintf(stdout, "%s\n", tb->fileNameLibrary); if (GWEN_StringList_Count(tb->declarationsProtected)) fprintf(stdout, "%s\n", tb->fileNameProtected); if (GWEN_StringList_Count(tb->declarationsPrivate)) fprintf(stdout, "%s\n", tb->fileNamePrivate); if (GWEN_StringList_Count(tb->code)) fprintf(stdout, "%s\n", tb->fileNameCode); return 0; } gwenhywfar-5.12.1/tools/typemaker2/tm_signal.h0000644000175000017500000000606713142134464016266 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_signal.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_SIGNAL_H #define TM_SIGNAL_H #ifdef __cplusplus extern "C" { #endif /* define TYPEMAKER2_SIGNAL_FLAGS */ #define TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM3 0x00000001 #define TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM4 0x00000002 /* needed system headers */ #include #include #include #include typedef struct TYPEMAKER2_SIGNAL TYPEMAKER2_SIGNAL; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_SIGNAL, Typemaker2_Signal) GWEN_LIST2_FUNCTION_DEFS(TYPEMAKER2_SIGNAL, Typemaker2_Signal) /** Constructor. */ TYPEMAKER2_SIGNAL *Typemaker2_Signal_new(void); /** Destructor. */ void Typemaker2_Signal_free(TYPEMAKER2_SIGNAL *p_struct); TYPEMAKER2_SIGNAL *Typemaker2_Signal_dup(const TYPEMAKER2_SIGNAL *p_struct); TYPEMAKER2_SIGNAL *Typemaker2_Signal_copy(TYPEMAKER2_SIGNAL *p_struct, const TYPEMAKER2_SIGNAL *p_src); /** Getter. * Use this function to get the member "name" */ const char *Typemaker2_Signal_GetName(const TYPEMAKER2_SIGNAL *p_struct); /** Getter. * Use this function to get the member "paramType1" */ const char *Typemaker2_Signal_GetParamType1(const TYPEMAKER2_SIGNAL *p_struct); /** Getter. * Use this function to get the member "paramType2" */ const char *Typemaker2_Signal_GetParamType2(const TYPEMAKER2_SIGNAL *p_struct); /** Getter. * Use this function to get the member "flags" */ uint32_t Typemaker2_Signal_GetFlags(const TYPEMAKER2_SIGNAL *p_struct); /** Setter. * Use this function to set the member "name" */ void Typemaker2_Signal_SetName(TYPEMAKER2_SIGNAL *p_struct, const char *p_src); /** Setter. * Use this function to set the member "paramType1" */ void Typemaker2_Signal_SetParamType1(TYPEMAKER2_SIGNAL *p_struct, const char *p_src); /** Setter. * Use this function to set the member "paramType2" */ void Typemaker2_Signal_SetParamType2(TYPEMAKER2_SIGNAL *p_struct, const char *p_src); /** Setter. * Use this function to set the member "flags" */ void Typemaker2_Signal_SetFlags(TYPEMAKER2_SIGNAL *p_struct, uint32_t p_src); /** Add flags. * Use this function to add flags to the member "flags" */ void Typemaker2_Signal_AddFlags(TYPEMAKER2_SIGNAL *p_struct, uint32_t p_src); /** Sub flags. * Use this function to sub flags to the member "flags" */ void Typemaker2_Signal_SubFlags(TYPEMAKER2_SIGNAL *p_struct, uint32_t p_src); TYPEMAKER2_SIGNAL_LIST *Typemaker2_Signal_List_dup(const TYPEMAKER2_SIGNAL_LIST *p_src); void Typemaker2_Signal_ReadXml(TYPEMAKER2_SIGNAL *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Signal_WriteXml(const TYPEMAKER2_SIGNAL *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Signal_toXml(const TYPEMAKER2_SIGNAL *p_struct, GWEN_XMLNODE *p_db); TYPEMAKER2_SIGNAL *Typemaker2_Signal_fromXml(GWEN_XMLNODE *p_db); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_header.c0000644000175000017500000000640213142134476016230 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_header_p.h" #include #include #include GWEN_LIST_FUNCTIONS(TYPEMAKER2_HEADER, Typemaker2_Header) TYPEMAKER2_HEADER *Typemaker2_Header_new() { TYPEMAKER2_HEADER *th; GWEN_NEW_OBJECT(TYPEMAKER2_HEADER, th); th->refCount=1; GWEN_LIST_INIT(TYPEMAKER2_HEADER, th); return th; } void Typemaker2_Header_free(TYPEMAKER2_HEADER *th) { if (th) { assert(th->refCount); if (th->refCount==1) { GWEN_LIST_FINI(TYPEMAKER2_HEADER, th); free(th->fileName); th->refCount=0; GWEN_FREE_OBJECT(th); } else th->refCount++; } } void Typemaker2_Header_Attach(TYPEMAKER2_HEADER *th) { assert(th); assert(th->refCount); th->refCount++; } const char *Typemaker2_Header_GetFileName(const TYPEMAKER2_HEADER *th) { assert(th); assert(th->refCount); return th->fileName; } void Typemaker2_Header_SetFileName(TYPEMAKER2_HEADER *th, const char *s) { assert(th); assert(th->refCount); free(th->fileName); if (s) th->fileName=strdup(s); else th->fileName=NULL; } int Typemaker2_Header_GetType(const TYPEMAKER2_HEADER *th) { assert(th); assert(th->refCount); return th->type; } void Typemaker2_Header_SetType(TYPEMAKER2_HEADER *th, int i) { assert(th); assert(th->refCount); th->type=i; } int Typemaker2_Header_GetLocation(const TYPEMAKER2_HEADER *th) { assert(th); assert(th->refCount); return th->location; } void Typemaker2_Header_SetLocation(TYPEMAKER2_HEADER *th, int i) { assert(th); assert(th->refCount); th->location=i; } int Typemaker2_Header_readXml(TYPEMAKER2_HEADER *th, GWEN_XMLNODE *node) { const char *s; GWEN_XMLNODE *n; assert(th); assert(th->refCount); n=GWEN_XMLNode_GetFirstData(node); if (n) { s=GWEN_XMLNode_GetData(n); Typemaker2_Header_SetFileName(th, s); } /* read header type */ s=GWEN_XMLNode_GetProperty(node, "type", "sys"); if (strcasecmp(s, "sys")==0 || strcasecmp(s, "system")==0) Typemaker2_Header_SetType(th, Typemaker2_HeaderType_System); else if (strcasecmp(s, "local")==0) Typemaker2_Header_SetType(th, Typemaker2_HeaderType_Local); /* read header location */ s=GWEN_XMLNode_GetProperty(node, "loc", "post"); if (strcasecmp(s, "pre")==0) Typemaker2_Header_SetLocation(th, Typemaker2_HeaderLocation_Pre); else if (strcasecmp(s, "post")==0) Typemaker2_Header_SetLocation(th, Typemaker2_HeaderLocation_Post); else if (strcasecmp(s, "code")==0) Typemaker2_Header_SetLocation(th, Typemaker2_HeaderLocation_Code); else if (strcasecmp(s, "codeEnd")==0) Typemaker2_Header_SetLocation(th, Typemaker2_HeaderLocation_CodeEnd); else if (strcasecmp(s, "headerEnd")==0) Typemaker2_Header_SetLocation(th, Typemaker2_HeaderLocation_HeaderEnd); return 0; } gwenhywfar-5.12.1/tools/typemaker2/tm_group.c0000644000175000017500000000523113606364450016135 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_group_p.h" #include #include #include GWEN_TREE_FUNCTIONS(TYPEMAKER2_GROUP, Typemaker2_Group) TYPEMAKER2_GROUP *Typemaker2_Group_new() { TYPEMAKER2_GROUP *gr; GWEN_NEW_OBJECT(TYPEMAKER2_GROUP, gr); gr->refCount=1; GWEN_TREE_INIT(TYPEMAKER2_GROUP, gr); return gr; } void Typemaker2_Group_free(TYPEMAKER2_GROUP *gr) { if (gr) { assert(gr->refCount); if (gr->refCount==1) { GWEN_TREE_FINI(TYPEMAKER2_GROUP, gr); free(gr->title); free(gr->description); gr->refCount=0; GWEN_FREE_OBJECT(gr); } else gr->refCount++; } } void Typemaker2_Group_Attach(TYPEMAKER2_GROUP *gr) { assert(gr); assert(gr->refCount); gr->refCount++; } const char *Typemaker2_Group_GetTitle(TYPEMAKER2_GROUP *gr) { assert(gr); assert(gr->refCount); return gr->title; } void Typemaker2_Group_SetTitle(TYPEMAKER2_GROUP *gr, const char *s) { assert(gr); assert(gr->refCount); free(gr->title); if (s && *s) gr->title=strdup(s); else gr->title=NULL; } const char *Typemaker2_Group_GetDescription(TYPEMAKER2_GROUP *gr) { assert(gr); assert(gr->refCount); return gr->description; } void Typemaker2_Group_SetDescription(TYPEMAKER2_GROUP *gr, const char *s) { assert(gr); assert(gr->refCount); free(gr->description); if (s && *s) gr->description=strdup(s); else gr->description=NULL; } int Typemaker2_Group_readXml(TYPEMAKER2_GROUP *gr, GWEN_XMLNODE *node, GWEN_UNUSED const char *wantedLang) { const char *s; GWEN_XMLNODE *n; assert(gr); assert(gr->refCount); /* read title */ s=GWEN_XMLNode_GetProperty(node, "title", NULL); if (s && *s) Typemaker2_Group_SetTitle(gr, s); /* read descr */ n=GWEN_XMLNode_FindFirstTag(node, "descr", NULL, NULL); if (n) { GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_XMLNode_toBuffer(n, tbuf, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_HANDLE_COMMENTS); if (rv<0) { DBG_ERROR(0, "here (%d)", rv); } else { Typemaker2_Group_SetDescription(gr, GWEN_Buffer_GetStart(tbuf)); } GWEN_Buffer_free(tbuf); } return 0; } gwenhywfar-5.12.1/tools/typemaker2/build.c0000644000175000017500000002004713440562630015376 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "typemaker2.h" #include "tm_typemanager.h" #include "tm_builder_c.h" #include #include #include int buildFile2(GWEN_DB_NODE *dbArgs, const char *fname) { TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_BUILDER *tb=NULL; TYPEMAKER2_TYPE *ty; GWEN_STRINGLIST *sl; TYPEMAKER2_TYPE_LIST2 *tlist; TYPEMAKER2_TYPE_LIST2_ITERATOR *it; int noDefs=0; const char *s; int i; int rv; tym=Typemaker2_TypeManager_new(); s=GWEN_DB_GetCharValue(dbArgs, "api", 0, NULL); if (s && *s) Typemaker2_TypeManager_SetApiDeclaration(tym, s); s=GWEN_DB_GetCharValue(dbArgs, "language", 0, "c"); if (s && *s) { Typemaker2_TypeManager_SetLanguage(tym, s); if (strcasecmp(s, "c")==0) { tb=Typemaker2_Builder_C_new(); Typemaker2_Builder_SetTypeManager(tb, tym); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Unsupported language [%s]", s); return 1; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Missing language specification"); return 1; } s = GWEN_DB_GetCharValue(dbArgs, "destFolder", 0, NULL); if (s) Typemaker2_Builder_SetDestFolderName(tb, s); Typemaker2_Builder_SetSourceFileName(tb, fname); noDefs=GWEN_DB_GetIntValue(dbArgs, "noDefs", 0, 0); for (i=0; i<99; i++) { s=GWEN_DB_GetCharValue(dbArgs, "include", i, NULL); if (s && *s) Typemaker2_TypeManager_AddFolder(tym, s); else break; } sl=GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_DATADIR); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while (se) { s=GWEN_StringListEntry_Data(se); if (s) { GWEN_BUFFER *xbuf; xbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(xbuf, s); GWEN_Buffer_AppendString(xbuf, "/typemaker2/"); s=Typemaker2_TypeManager_GetLanguage(tym); if (s && *s) GWEN_Buffer_AppendString(xbuf, s); Typemaker2_TypeManager_AddFolder(tym, GWEN_Buffer_GetStart(xbuf)); GWEN_Buffer_free(xbuf); } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } s=GWEN_DB_GetCharValue(dbArgs, "destFolder", 0, NULL); if (s) Typemaker2_Builder_SetDestFolderName(tb, s); tlist=Typemaker2_Type_List2_new(); rv=Typemaker2_TypeManager_LoadTypeFile2(tym, fname, tlist); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Unable to load file [%s] (%d)", fname, rv); return 2; } it=Typemaker2_Type_List2_First(tlist); if (it) { ty=Typemaker2_Type_List2Iterator_Data(it); while (ty) { /* DEBUG */ #if 0 Typemaker2_TypeManager_Dump(tym, stderr, 2); #endif /* build */ rv=Typemaker2_Builder_Build(tb, ty); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return 2; } /* only write typedef files */ if (!noDefs) { rv=Typemaker2_Builder_WriteFiles(tb, ty, TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_DEFS); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return 2; } } /* handle next type */ ty=Typemaker2_Type_List2Iterator_Next(it); } Typemaker2_Type_List2Iterator_free(it); s=GWEN_DB_GetCharValue(dbArgs, "publicFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNamePublic(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "libraryFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNameLibrary(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "protectedFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNameProtected(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "privateFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNamePrivate(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "codeFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNameCode(tb, s); ty=Typemaker2_Type_List2_GetFront(tlist); rv=Typemaker2_Builder_WriteFiles(tb, ty, TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_TYPE); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return 2; } } Typemaker2_Type_List2_free(tlist); return 0; } #if 0 int buildFile(GWEN_DB_NODE *dbArgs, const char *fname) { TYPEMAKER2_TYPEMANAGER *tym; TYPEMAKER2_BUILDER *tb=NULL; TYPEMAKER2_TYPE *ty; GWEN_STRINGLIST *sl; const char *s; int i; int rv; tym=Typemaker2_TypeManager_new(); s=GWEN_DB_GetCharValue(dbArgs, "api", 0, NULL); if (s && *s) Typemaker2_TypeManager_SetApiDeclaration(tym, s); s=GWEN_DB_GetCharValue(dbArgs, "language", 0, "c"); if (s && *s) { Typemaker2_TypeManager_SetLanguage(tym, s); if (strcasecmp(s, "c")==0) { tb=Typemaker2_Builder_C_new(); Typemaker2_Builder_SetTypeManager(tb, tym); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Unsupported language [%s]", s); return 1; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Missing language specification"); return 1; } Typemaker2_Builder_SetSourceFileName(tb, fname); for (i=0; i<99; i++) { s=GWEN_DB_GetCharValue(dbArgs, "include", i, NULL); if (s && *s) Typemaker2_TypeManager_AddFolder(tym, s); else break; } sl=GWEN_PathManager_GetPaths(GWEN_PM_LIBNAME, GWEN_PM_DATADIR); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while (se) { s=GWEN_StringListEntry_Data(se); if (s) { GWEN_BUFFER *xbuf; xbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(xbuf, s); GWEN_Buffer_AppendString(xbuf, "/typemaker2/"); s=Typemaker2_TypeManager_GetLanguage(tym); if (s && *s) GWEN_Buffer_AppendString(xbuf, s); Typemaker2_TypeManager_AddFolder(tym, GWEN_Buffer_GetStart(xbuf)); GWEN_Buffer_free(xbuf); } se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } s=GWEN_DB_GetCharValue(dbArgs, "publicFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNamePublic(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "libraryFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNameLibrary(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "protectedFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNameProtected(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "privateFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNamePrivate(tb, s); s=GWEN_DB_GetCharValue(dbArgs, "codeFile", 0, NULL); if (s) Typemaker2_Builder_SetFileNameCode(tb, s); s = GWEN_DB_GetCharValue(dbArgs, "destFolder", 0, NULL); if (s) Typemaker2_Builder_SetDestFolderName(tb, s); ty=Typemaker2_TypeManager_LoadTypeFile(tym, fname); if (ty==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Unable to load file [%s]", fname); return 2; } /* DEBUG */ #if 0 Typemaker2_TypeManager_Dump(tym, stderr, 2); #endif /* build */ rv=Typemaker2_Builder_Build(tb, ty); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return 2; } rv=Typemaker2_Builder_WriteFiles(tb, ty, TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_DEFS | TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_TYPE); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return 2; } return 0; } #endif int build(GWEN_DB_NODE *dbArgs) { int i; for (i=0; i<99; i++) { const char *fileName; fileName=GWEN_DB_GetCharValue(dbArgs, "params", i, NULL); if (fileName) { int rv=buildFile2(dbArgs, fileName); if (rv != 0) { DBG_ERROR(GWEN_LOGDOMAIN, "Error building type from [%s]", fileName); return 2; } } else { if (i==0) { DBG_ERROR(GWEN_LOGDOMAIN, "No input"); return 1; } } } return 0; } gwenhywfar-5.12.1/tools/typemaker2/README0000664000175000017500000002460614460564441015027 00000000000000TODO: - maybe define inlines to be used when used as member of other types (using the normal element doesn't work in structs because that duplicates code) TEST Test with_db with_xml with_object with_list1 with_list2 with_inherit with_idmap
gwenhywfar/types.h
test/user.h
test_l.h
0 0 library volatile NULL NULL public own const dup const NULL NULL public own const dup const NULL NULL protected own nodup const dup const NULL NULL private own const dup const Test_Enum_Mode_Unknown Test_Enum_Mode_Unknown public attribute enum none none
int AQDB_DataType_Int int $(memberName); $(dest)=$(src) $(dest)=$(src) $(dest)=0; $(api) int $(typePrefix)_Get$(memberNameToUpper)(const $(typeId) *p_struct); int $(typePrefix)_Get$(memberNameToUpper)(const $(typeId) *p_struct) { return p_struct->$(memberName); } $(api) void $(typePrefix)_Set$(memberNameToUpper)($(typeId) *p_struct, int p_src); void $(typePrefix)_Set$(memberNameToUpper)($(typeId) *p_struct, int p_src) { p_struct->$(memberName); } 0 0 int AQDB_DataType_String if ($(src)) $(dest)=strdup($(src)); else $(dest)=NULL; if ($(src)) $(dest)=strdup($(src)); else $(dest)=NULL; $(dest)=NULL; if ($(src)) free($(src)) $(src)=NULL; extending types: { int64_t v64=(int64_t) ($(src)); $(retval)=AQDB_Object_SetFieldInt64($(object), $(fieldId), v64); } { int64_t v64; $(retval)=AQDB_Object_GetFieldInt64($(object), $(fieldId), &v64); if ($(retval)>=0) $(dst)=(int) v64; } init fini get set toDb fromDb $(api) int $(typePrefix)_toDb(const $(typeId) *p_struct, GWEN_DB_NODE *p_db); int $(typePrefix)_toDb(const $(typeId) *p_struct, GWEN_DB_NODE *p_db) { if (p_struct->$(memberName)) { int p_rv; if (p_rv<0) { DBG_ERROR($(logdomain), "here (%d)", p_rv); return p_rv; } } return 0; } char *$(memberName); p_struct->$(memberName)=$(preset); if (p_struct->$(memberName)) free(p_struct->$(memberName)); p_struct->$(memberName)=NULL; $(api) const char *$(typePrefix)_Get$(memberNameToUpper)(const $(typeId) *p_struct); const char *$(typePrefix)_Get$(memberNameToUpper)(const $(typeId) *p_struct) { return p_struct->$(memberName); } $(api) void $(typePrefix)_Set$(memberNameToUpper)($(typeId) *p_struct, const char *p_src); $(api) void $(typePrefix)_Set$(memberNameToUpper)($(typeId) *p_struct, char *p_src); void $(typePrefix)_Set$(memberNameToUpper)($(typeId) *p_struct, const char *p_src) void $(typePrefix)_Set$(memberNameToUpper)($(typeId) *p_struct, char *p_src) { if (p_struct->$(memberName)) free(p_struct->$(memberName)); if (p_src) p_struct->$(memberName)=strdup(p_src); else p_struct->$(memberName)=NULL; p_struct->$(memberName)=p_src; } if ($(struct_data)->$(memberName)) { int rv; rv=GWEN_DB_SetCharValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, "$(memberName)", $(src)); if (rv<0) { DBG_INFO($(logdomain), "here (%d)", rv); return rv; } } else GWEN_DB_DeleteVar($(db), "$(name)"); { const char *s; if (p_struct->$(memberName)) free(p_struct->$(memberName)); s=GWEN_DB_GetCharValue($(db), "$(memberName)", 0, $(default)); if (s) $(dst)=strdup(s); else $(dst)=NULL; } 0 0 $(api) int $(typePrefix)_toDb(const $(typeId) *p_struct, GWEN_DB_NODE *p_db); int $(typePrefix)_toDb(const $(typeId) *p_struct, GWEN_DB_NODE *p_db) { if (p_struct->$(memberName)) { int p_rv; if (p_rv<0) { DBG_ERROR($(logdomain), "here (%d)", p_rv); return p_rv; } } return 0; } gwenhywfar-5.12.1/tools/typemaker2/tm_type.c0000664000175000017500000007703014460564441015773 00000000000000/*************************************************************************** begin : Wed Jul 01 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_type_p.h" #include "tm_util.h" #include #include #include GWEN_LIST_FUNCTIONS(TYPEMAKER2_TYPE, Typemaker2_Type); GWEN_LIST2_FUNCTIONS(TYPEMAKER2_TYPE, Typemaker2_Type); TYPEMAKER2_TYPE *Typemaker2_Type_new() { TYPEMAKER2_TYPE *ty; GWEN_NEW_OBJECT(TYPEMAKER2_TYPE, ty); ty->refCount=1; GWEN_LIST_INIT(TYPEMAKER2_TYPE, ty); ty->headers=Typemaker2_Header_List_new(); ty->enums=Typemaker2_Enum_List_new(); ty->defines=Typemaker2_Define_List_new(); ty->codeDefs=Typemaker2_Code_List_new(); ty->inlines=Typemaker2_Inline_List_new(); ty->virtualFns=Typemaker2_VirtualFn_List_new(); ty->signals=Typemaker2_Signal_List_new(); ty->slots=Typemaker2_Slot_List_new(); ty->structIncludes=GWEN_StringList_new(); ty->privateIncludes=GWEN_StringList_new(); ty->libraryIncludes=GWEN_StringList_new(); ty->publicIncludes=GWEN_StringList_new(); ty->codeIncludes=GWEN_StringList_new(); ty->members=Typemaker2_Member_List_new(); ty->groupTree=Typemaker2_Group_Tree_new(); return ty; } void Typemaker2_Type_free(TYPEMAKER2_TYPE *ty) { if (ty) { assert(ty->refCount); if (ty->refCount==1) { GWEN_LIST_FINI(TYPEMAKER2_TYPE, ty); free(ty->name); free(ty->extends); free(ty->baseType); free(ty->inherits); free(ty->identifier); free(ty->prefix); free(ty->defaultValue); free(ty->presetValue); free(ty->aqdb_type); free(ty->baseFileName); free(ty->freeHook); free(ty->descr); Typemaker2_Header_List_free(ty->headers); Typemaker2_Enum_List_free(ty->enums); Typemaker2_Define_List_free(ty->defines); Typemaker2_Code_List_free(ty->codeDefs); Typemaker2_Inline_List_free(ty->inlines); Typemaker2_VirtualFn_List_free(ty->virtualFns); Typemaker2_Signal_List_free(ty->signals); Typemaker2_Slot_List_free(ty->slots); GWEN_StringList_free(ty->structIncludes); GWEN_StringList_free(ty->privateIncludes); GWEN_StringList_free(ty->libraryIncludes); GWEN_StringList_free(ty->publicIncludes); GWEN_StringList_free(ty->codeIncludes); Typemaker2_Member_List_free(ty->members); Typemaker2_Group_Tree_free(ty->groupTree); free(ty->fieldCountId); ty->refCount=0; GWEN_FREE_OBJECT(ty); } else ty->refCount--; } } void Typemaker2_Type_Attach(TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); ty->refCount++; } const char *Typemaker2_Type_GetName(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->name; } void Typemaker2_Type_SetName(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->name); if (s && *s) ty->name=strdup(s); else ty->name=NULL; } const char *Typemaker2_Type_GetDescription(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->descr; } void Typemaker2_Type_SetDescription(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->descr); if (s && *s) ty->descr=strdup(s); else ty->descr=NULL; } int Typemaker2_Type_GetType(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); /* nothing here? ask extended type */ if (ty->type==TypeMaker2_Type_Unknown && ty->extendsPtr) return Typemaker2_Type_GetType(ty->extendsPtr); return ty->type; } void Typemaker2_Type_SetType(TYPEMAKER2_TYPE *ty, int i) { assert(ty); assert(ty->refCount); ty->type=i; } const char *Typemaker2_Type_GetAqDbType(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->aqdb_type==NULL && ty->extendsPtr) return Typemaker2_Type_GetAqDbType(ty->extendsPtr); return ty->aqdb_type; } void Typemaker2_Type_SetAqDbType(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->aqdb_type); if (s && *s) ty->aqdb_type=strdup(s); else ty->aqdb_type=NULL; } const char *Typemaker2_Type_GetBaseFileName(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->baseFileName; } void Typemaker2_Type_SetBaseFileName(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->baseFileName); if (s && *s) ty->baseFileName=strdup(s); else ty->baseFileName=NULL; } const char *Typemaker2_Type_GetFreeHook(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->freeHook; } void Typemaker2_Type_SetFreeHook(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->freeHook); if (s && *s) ty->freeHook=strdup(s); else ty->freeHook=NULL; } const char *Typemaker2_Type_GetExtends(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->extends; } void Typemaker2_Type_SetExtends(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->extends); if (s && *s) ty->extends=strdup(s); else ty->extends=NULL; } int Typemaker2_Type_GetPack(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->pack; } void Typemaker2_Type_SetPack(TYPEMAKER2_TYPE *ty, int i) { assert(ty); assert(ty->refCount); ty->pack=i; } const char *Typemaker2_Type_GetBaseType(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->baseType==NULL && ty->extendsPtr) return Typemaker2_Type_GetBaseType(ty->extendsPtr); return ty->baseType; } void Typemaker2_Type_SetBaseType(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->baseType); if (s && *s) ty->baseType=strdup(s); else ty->baseType=NULL; } const char *Typemaker2_Type_GetInherits(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->inherits==NULL && ty->extendsPtr) return Typemaker2_Type_GetInherits(ty->extendsPtr); return ty->inherits; } void Typemaker2_Type_SetInherits(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->inherits); if (s && *s) ty->inherits=strdup(s); else ty->inherits=NULL; } uint32_t Typemaker2_Type_GetFlags(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->flags==0 && ty->extendsPtr) return Typemaker2_Type_GetFlags(ty->extendsPtr); return ty->flags; } void Typemaker2_Type_SetFlags(TYPEMAKER2_TYPE *ty, uint32_t i) { assert(ty); assert(ty->refCount); ty->flags=i; } uint32_t Typemaker2_Type_GetSetFlags(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->setFlags==0 && ty->extendsPtr) return Typemaker2_Type_GetSetFlags(ty->extendsPtr); return ty->setFlags; } void Typemaker2_Type_SetSetFlags(TYPEMAKER2_TYPE *ty, uint32_t i) { assert(ty); assert(ty->refCount); ty->setFlags=i; } uint32_t Typemaker2_Type_GetGetFlags(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->getFlags==0 && ty->extendsPtr) return Typemaker2_Type_GetGetFlags(ty->extendsPtr); return ty->getFlags; } void Typemaker2_Type_SetGetFlags(TYPEMAKER2_TYPE *ty, uint32_t i) { assert(ty); assert(ty->refCount); ty->getFlags=i; } uint32_t Typemaker2_Type_GetDupFlags(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->dupFlags==0 && ty->extendsPtr) return Typemaker2_Type_GetDupFlags(ty->extendsPtr); return ty->dupFlags; } void Typemaker2_Type_SetDupFlags(TYPEMAKER2_TYPE *ty, uint32_t i) { assert(ty); assert(ty->refCount); ty->dupFlags=i; } uint32_t Typemaker2_Type_GetCopyFlags(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->copyFlags==0 && ty->extendsPtr) return Typemaker2_Type_GetCopyFlags(ty->extendsPtr); return ty->copyFlags; } void Typemaker2_Type_SetCopyFlags(TYPEMAKER2_TYPE *ty, uint32_t i) { assert(ty); assert(ty->refCount); ty->copyFlags=i; } int Typemaker2_Type_GetAccess(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->access==TypeMaker2_Access_Unknown && ty->extendsPtr) return Typemaker2_Type_GetAccess(ty->extendsPtr); return ty->access; } void Typemaker2_Type_SetAccess(TYPEMAKER2_TYPE *ty, int i) { assert(ty); assert(ty->refCount); ty->access=i; } int Typemaker2_Type_GetStructAccess(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->structAccess==TypeMaker2_Access_Unknown && ty->extendsPtr) return Typemaker2_Type_GetStructAccess(ty->extendsPtr); return ty->structAccess; } void Typemaker2_Type_SetStructAccess(TYPEMAKER2_TYPE *ty, int i) { assert(ty); assert(ty->refCount); ty->structAccess=i; } int Typemaker2_Type_GetUsePrivateConstructor(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->usePrivateConstructor; } void Typemaker2_Type_SetUsePrivateConstructor(TYPEMAKER2_TYPE *ty, int i) { assert(ty); assert(ty->refCount); ty->usePrivateConstructor=i; } const char *Typemaker2_Type_GetDefaultValue(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->defaultValue==NULL && ty->extendsPtr) return Typemaker2_Type_GetDefaultValue(ty->extendsPtr); return ty->defaultValue; } void Typemaker2_Type_SetDefaultValue(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->defaultValue); if (s && *s) ty->defaultValue=strdup(s); else ty->defaultValue=NULL; } const char *Typemaker2_Type_GetPresetValue(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); if (ty->presetValue==NULL && ty->extendsPtr) return Typemaker2_Type_GetPresetValue(ty->extendsPtr); return ty->presetValue; } void Typemaker2_Type_SetPresetValue(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->presetValue); if (s && *s) ty->presetValue=strdup(s); else ty->presetValue=NULL; } const char *Typemaker2_Type_GetIdentifier(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->identifier; } void Typemaker2_Type_SetIdentifier(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->identifier); if (s && *s) ty->identifier=strdup(s); else ty->identifier=NULL; } const char *Typemaker2_Type_GetPrefix(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->prefix; } void Typemaker2_Type_SetPrefix(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->prefix); if (s && *s) ty->prefix=strdup(s); else ty->prefix=NULL; } TYPEMAKER2_TYPE *Typemaker2_Type_GetExtendsPtr(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->extendsPtr; } void Typemaker2_Type_SetExtendsPtr(TYPEMAKER2_TYPE *ty, TYPEMAKER2_TYPE *p) { assert(ty); assert(ty->refCount); ty->extendsPtr=p; } TYPEMAKER2_TYPE *Typemaker2_Type_GetInheritsPtr(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->inheritsPtr; } void Typemaker2_Type_SetInheritsPtr(TYPEMAKER2_TYPE *ty, TYPEMAKER2_TYPE *p) { assert(ty); assert(ty->refCount); ty->inheritsPtr=p; } TYPEMAKER2_TYPE *Typemaker2_Type_GetBaseTypePtr(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->baseTypePtr; } void Typemaker2_Type_SetBaseTypePtr(TYPEMAKER2_TYPE *ty, TYPEMAKER2_TYPE *p) { assert(ty); assert(ty->refCount); ty->baseTypePtr=p; } TYPEMAKER2_MEMBER_LIST *Typemaker2_Type_GetMembers(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->members; } TYPEMAKER2_HEADER_LIST *Typemaker2_Type_GetHeaders(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->headers; } TYPEMAKER2_ENUM_LIST *Typemaker2_Type_GetEnums(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->enums; } TYPEMAKER2_DEFINE_LIST *Typemaker2_Type_GetDefines(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->defines; } TYPEMAKER2_CODE_LIST *Typemaker2_Type_GetCodeDefs(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->codeDefs; } TYPEMAKER2_INLINE_LIST *Typemaker2_Type_GetInlines(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->inlines; } TYPEMAKER2_VIRTUALFN_LIST *Typemaker2_Type_GetVirtualFns(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->virtualFns; } TYPEMAKER2_SIGNAL_LIST *Typemaker2_Type_GetSignals(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->signals; } TYPEMAKER2_SLOT_LIST *Typemaker2_Type_GetSlots(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->slots; } TYPEMAKER2_GROUP_TREE *Typemaker2_Type_GetGroupTree(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->groupTree; } int Typemaker2_Type_GetNonVolatileMemberCount(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->nonVolatileMemberCount; } void Typemaker2_Type_SetNonVolatileMemberCount(TYPEMAKER2_TYPE *ty, int i) { assert(ty); assert(ty->refCount); ty->nonVolatileMemberCount=i; } const char *Typemaker2_Type_GetFieldCountId(const TYPEMAKER2_TYPE *ty) { assert(ty); assert(ty->refCount); return ty->fieldCountId; } void Typemaker2_Type_SetFieldCountId(TYPEMAKER2_TYPE *ty, const char *s) { assert(ty); assert(ty->refCount); free(ty->fieldCountId); if (s) ty->fieldCountId=strdup(s); else ty->fieldCountId=NULL; } int Typemaker2_Type_readMembersAndGroupsXml(TYPEMAKER2_TYPE *ty, GWEN_XMLNODE *node, TYPEMAKER2_GROUP *parentGroup, const char *wantedLang) { GWEN_XMLNODE *n; /* read members */ n=GWEN_XMLNode_GetFirstTag(node); while (n) { const char *s; /* get tag name */ s=GWEN_XMLNode_GetData(n); if (s) { if (strcasecmp(s, "member")==0) { TYPEMAKER2_MEMBER *tm; int rv; tm=Typemaker2_Member_new(); rv=Typemaker2_Member_readXml(tm, n, wantedLang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Member_free(tm); return rv; } /* set current parentGroup as group */ Typemaker2_Member_SetGroupPtr(tm, parentGroup); Typemaker2_Member_List_Add(tm, ty->members); } else if (strcasecmp(s, "group")==0) { TYPEMAKER2_GROUP *group; int rv; /* create and read group */ group=Typemaker2_Group_new(); rv=Typemaker2_Group_readXml(group, n, wantedLang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Group_free(group); return rv; } Typemaker2_Group_Tree_AddChild(parentGroup, group); /* read sub-groups and -members */ rv=Typemaker2_Type_readMembersAndGroupsXml(ty, n, group, wantedLang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } } n=GWEN_XMLNode_GetNextTag(n); } return 0; } int Typemaker2_Type_readXml(TYPEMAKER2_TYPE *ty, GWEN_XMLNODE *node, const char *wantedLang) { GWEN_XMLNODE *langNode=NULL; GWEN_XMLNODE *n; const char *s; TYPEMAKER2_GROUP *rootGroup=NULL; /* parse type */ s=GWEN_XMLNode_GetProperty(node, "type", "opaque"); if (strcasecmp(s, "opaque")==0) Typemaker2_Type_SetType(ty, TypeMaker2_Type_Opaque); else if (strcasecmp(s, "pointer")==0) Typemaker2_Type_SetType(ty, TypeMaker2_Type_Pointer); else if (strcasecmp(s, "array")==0) Typemaker2_Type_SetType(ty, TypeMaker2_Type_Array); else { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown type [%s]", s); return GWEN_ERROR_BAD_DATA; } s=GWEN_XMLNode_GetProperty(node, "id", NULL); Typemaker2_Type_SetName(ty, s); s=GWEN_XMLNode_GetProperty(node, "extends", NULL); Typemaker2_Type_SetExtends(ty, s); s=GWEN_XMLNode_GetProperty(node, "basetype", NULL); Typemaker2_Type_SetBaseType(ty, s); if (wantedLang) langNode=GWEN_XMLNode_FindFirstTag(node, "lang", "id", wantedLang); if (langNode==NULL) langNode=node; /* read identifier and prefix */ s=GWEN_XMLNode_GetCharValue(langNode, "identifier", NULL); Typemaker2_Type_SetIdentifier(ty, s); s=GWEN_XMLNode_GetCharValue(langNode, "prefix", NULL); Typemaker2_Type_SetPrefix(ty, s); s=GWEN_XMLNode_GetCharValue(langNode, "aqdb_type", NULL); Typemaker2_Type_SetAqDbType(ty, s); /* read base file name (used to derive other output filenames) */ s=GWEN_XMLNode_GetCharValue(langNode, "basefilename", NULL); Typemaker2_Type_SetBaseFileName(ty, s); s=GWEN_XMLNode_GetCharValue(langNode, "freeHook", NULL); Typemaker2_Type_SetFreeHook(ty, s); ty->pack=GWEN_XMLNode_GetIntValue(langNode, "pack", 0); s=GWEN_XMLNode_GetCharValue(langNode, "structAccess", "private"); if (s && *s) { ty->structAccess=Typemaker2_AccessFromString(s); if (ty->structAccess==TypeMaker2_Access_Unknown) { DBG_ERROR(0, "Invalid structAcces entry [%s]", s); return GWEN_ERROR_BAD_DATA; } } else ty->structAccess=TypeMaker2_Access_Private; /* read flags. this element exists for elements. * For elements the flags are stored in the group. */ s=GWEN_XMLNode_GetCharValue(langNode, "flags", NULL); if (s && *s) Typemaker2_Type_SetFlags(ty, Typemaker2_TypeFlagsFromString(s)); /* read headers */ n=GWEN_XMLNode_FindFirstTag(langNode, "headers", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "header", NULL, NULL); while (nn) { TYPEMAKER2_HEADER *th; int rv; th=Typemaker2_Header_new(); rv=Typemaker2_Header_readXml(th, nn); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Header_free(th); return rv; } Typemaker2_Header_List_Add(th, ty->headers); nn=GWEN_XMLNode_FindNextTag(nn, "header", NULL, NULL); } } /* read description */ n=GWEN_XMLNode_FindFirstTag(node, "descr", NULL, NULL); if (n) { GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_XMLNode_toBuffer(n, tbuf, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_HANDLE_COMMENTS); if (rv<0) { DBG_ERROR(0, "here (%d)", rv); } else { Typemaker2_Type_SetDescription(ty, GWEN_Buffer_GetStart(tbuf)); } GWEN_Buffer_free(tbuf); } /* create and add root group */ Typemaker2_Group_Tree_Clear(ty->groupTree); rootGroup=Typemaker2_Group_new(); Typemaker2_Group_SetTitle(rootGroup, Typemaker2_Type_GetName(ty)); Typemaker2_Group_SetDescription(rootGroup, Typemaker2_Type_GetDescription(ty)); Typemaker2_Group_Tree_Add(ty->groupTree, rootGroup); /* read members */ n=GWEN_XMLNode_FindFirstTag(node, "members", NULL, NULL); if (n) { int rv; rv=Typemaker2_Type_readMembersAndGroupsXml(ty, n, rootGroup, wantedLang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } } /* read codedefs */ n=GWEN_XMLNode_FindFirstTag(langNode, "codedefs", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "codedef", NULL, NULL); while (nn) { TYPEMAKER2_CODE *tc; tc=Typemaker2_Code_fromXml(nn); if (tc) { const char *s; s=Typemaker2_Code_GetMemberFlagsMask(tc); if (s && *s) Typemaker2_Code_SetMemberFlagsMaskInt(tc, Typemaker2_FlagsFromString(s)); s=Typemaker2_Code_GetMemberFlagsValue(tc); if (s && *s) Typemaker2_Code_SetMemberFlagsValueInt(tc, Typemaker2_FlagsFromString(s)); } Typemaker2_Code_List_Add(tc, ty->codeDefs); nn=GWEN_XMLNode_FindNextTag(nn, "codedef", NULL, NULL); } } /* read inlines */ n=GWEN_XMLNode_FindFirstTag(langNode, "inlines", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "inline", NULL, NULL); while (nn) { TYPEMAKER2_INLINE *ti; ti=Typemaker2_Inline_fromXml(nn); Typemaker2_Inline_List_Add(ti, ty->inlines); nn=GWEN_XMLNode_FindNextTag(nn, "inline", NULL, NULL); } } /* read enums */ n=GWEN_XMLNode_FindFirstTag(node, "enums", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "enum", NULL, NULL); while (nn) { TYPEMAKER2_ENUM *te; GWEN_XMLNODE *nnn; te=Typemaker2_Enum_fromXml(nn); /* read items */ nnn=GWEN_XMLNode_FindFirstTag(nn, "item", NULL, NULL); while (nnn) { TYPEMAKER2_ITEM *ti; ti=Typemaker2_Item_fromXml(nnn); Typemaker2_Item_List_Add(ti, Typemaker2_Enum_GetItems(te)); nnn=GWEN_XMLNode_FindNextTag(nnn, "item", NULL, NULL); } Typemaker2_Enum_List_Add(te, ty->enums); nn=GWEN_XMLNode_FindNextTag(nn, "enum", NULL, NULL); } } /* read defines */ n=GWEN_XMLNode_FindFirstTag(node, "defines", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "define", NULL, NULL); while (nn) { TYPEMAKER2_DEFINE *td; GWEN_XMLNODE *nnn; td=Typemaker2_Define_fromXml(nn); /* read items */ nnn=GWEN_XMLNode_FindFirstTag(nn, "item", NULL, NULL); while (nnn) { TYPEMAKER2_ITEM *ti; ti=Typemaker2_Item_fromXml(nnn); Typemaker2_Item_List_Add(ti, Typemaker2_Define_GetItems(td)); nnn=GWEN_XMLNode_FindNextTag(nnn, "item", NULL, NULL); } Typemaker2_Define_List_Add(td, ty->defines); nn=GWEN_XMLNode_FindNextTag(nn, "define", NULL, NULL); } } /* read virtual functions */ n=GWEN_XMLNode_FindFirstTag(node, "virtualFns", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "fn", NULL, NULL); while (nn) { TYPEMAKER2_VIRTUALFN *vf; int rv; vf=Typemaker2_VirtualFn_new(); rv=Typemaker2_VirtualFn_readXml(vf, nn); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_VirtualFn_free(vf); return rv; } Typemaker2_VirtualFn_List_Add(vf, ty->virtualFns); nn=GWEN_XMLNode_FindNextTag(nn, "fn", NULL, NULL); } } /* read signals */ n=GWEN_XMLNode_FindFirstTag(node, "signals", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "signal", NULL, NULL); while (nn) { TYPEMAKER2_SIGNAL *sig; GWEN_XMLNODE *nnn; int i; s=GWEN_XMLNode_GetProperty(nn, "name", NULL); if (!(s && *s)) { DBG_ERROR(GWEN_LOGDOMAIN, "Unnamed signal"); return GWEN_ERROR_INVALID; } sig=Typemaker2_Signal_new(); Typemaker2_Signal_SetName(sig, s); Typemaker2_Signal_SetParamType1(sig, "none"); Typemaker2_Signal_SetParamType2(sig, "none"); i=GWEN_XMLNode_GetIntProperty(nn, "useParam3", 0); if (i) Typemaker2_Signal_AddFlags(sig, TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM3); i=GWEN_XMLNode_GetIntProperty(nn, "useParam4", 0); if (i) Typemaker2_Signal_AddFlags(sig, TYPEMAKER2_SIGNAL_FLAGS_USE_PARAM4); nnn=GWEN_XMLNode_FindFirstTag(nn, "params", NULL, NULL); if (nnn) { GWEN_XMLNODE *nnnn; int i; nnnn=GWEN_XMLNode_FindFirstTag(nnn, "param", NULL, NULL); i=1; while (nnnn && i<3) { const char *s; s=GWEN_XMLNode_GetProperty(nnnn, "type", "none"); if (i==1) Typemaker2_Signal_SetParamType1(sig, s); else Typemaker2_Signal_SetParamType2(sig, s); i++; nnnn=GWEN_XMLNode_FindNextTag(nnnn, "param", NULL, NULL); } } Typemaker2_Signal_List_Add(sig, ty->signals); nn=GWEN_XMLNode_FindNextTag(nn, "signal", NULL, NULL); } } /* read slots */ n=GWEN_XMLNode_FindFirstTag(node, "slots", NULL, NULL); if (n) { GWEN_XMLNODE *nn; nn=GWEN_XMLNode_FindFirstTag(n, "slot", NULL, NULL); while (nn) { TYPEMAKER2_SLOT *slot; GWEN_XMLNODE *nnn; int i; s=GWEN_XMLNode_GetProperty(nn, "name", NULL); if (!(s && *s)) { DBG_ERROR(GWEN_LOGDOMAIN, "Unnamed slot"); return GWEN_ERROR_INVALID; } slot=Typemaker2_Slot_new(); Typemaker2_Slot_SetName(slot, s); Typemaker2_Slot_SetParamType1(slot, "none"); Typemaker2_Slot_SetParamType2(slot, "none"); i=GWEN_XMLNode_GetIntProperty(nn, "useParam3", 0); if (i) Typemaker2_Slot_AddFlags(slot, TYPEMAKER2_SLOT_FLAGS_USE_PARAM3); i=GWEN_XMLNode_GetIntProperty(nn, "useParam4", 0); if (i) Typemaker2_Slot_AddFlags(slot, TYPEMAKER2_SLOT_FLAGS_USE_PARAM4); nnn=GWEN_XMLNode_FindFirstTag(nn, "params", NULL, NULL); if (nnn) { GWEN_XMLNODE *nnnn; int i; nnnn=GWEN_XMLNode_FindFirstTag(nnn, "param", NULL, NULL); i=1; while (nnnn && i<3) { const char *s; s=GWEN_XMLNode_GetProperty(nnnn, "type", "none"); if (i==1) Typemaker2_Slot_SetParamType1(slot, s); else Typemaker2_Slot_SetParamType2(slot, s); i++; nnnn=GWEN_XMLNode_FindNextTag(nnnn, "param", NULL, NULL); } } Typemaker2_Slot_List_Add(slot, ty->slots); nn=GWEN_XMLNode_FindNextTag(nn, "slot", NULL, NULL); } } /* read defaults */ n=GWEN_XMLNode_FindFirstTag(langNode, "defaults", NULL, NULL); if (n) { s=GWEN_XMLNode_GetCharValue(n, "default", NULL); Typemaker2_Type_SetDefaultValue(ty, s); s=GWEN_XMLNode_GetCharValue(n, "preset", NULL); Typemaker2_Type_SetPresetValue(ty, s); /* read flags */ s=GWEN_XMLNode_GetCharValue(n, "flags", NULL); if (s && *s) Typemaker2_Type_SetFlags(ty, Typemaker2_TypeFlagsFromString(s)); /* read setflags */ s=GWEN_XMLNode_GetCharValue(n, "setflags", NULL); if (s && *s) Typemaker2_Type_SetSetFlags(ty, Typemaker2_FlagsFromString(s)); /* read getflags */ s=GWEN_XMLNode_GetCharValue(n, "getflags", NULL); if (s && *s) Typemaker2_Type_SetGetFlags(ty, Typemaker2_FlagsFromString(s)); /* read dupflags */ s=GWEN_XMLNode_GetCharValue(n, "dupflags", NULL); if (s && *s) Typemaker2_Type_SetDupFlags(ty, Typemaker2_FlagsFromString(s)); /* read copyflags */ s=GWEN_XMLNode_GetCharValue(n, "copyflags", NULL); if (s && *s) Typemaker2_Type_SetCopyFlags(ty, Typemaker2_FlagsFromString(s)); /* read access */ s=GWEN_XMLNode_GetCharValue(n, "access", NULL); if (s && *s) { int i=Typemaker2_AccessFromString(s); if (i==TypeMaker2_Access_Unknown) { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown access type [%s]", s); return GWEN_ERROR_BAD_DATA; } Typemaker2_Type_SetAccess(ty, i); } } s=GWEN_XMLNode_GetProperty(langNode, "usePrivateConstructor", "0"); if (s && *s) Typemaker2_Type_SetUsePrivateConstructor(ty, atoi(s)); return 0; } void Typemaker2_Type_Dump(TYPEMAKER2_TYPE *ty, FILE *f, int indent) { if (ty) { int i; TYPEMAKER2_MEMBER *tm; const char *s1, *s2; for (i=0; iname)?(ty->name):""); for (i=0; iidentifier)?(ty->identifier):""); for (i=0; iaqdb_type)?(ty->aqdb_type):""); for (i=0; iextends)?(ty->extends):""); for (i=0; iinherits; s2=Typemaker2_Type_GetInherits(ty); fprintf(f, "Inherits : %s [%s]\n", s1?s1:"", s2?s2:""); for (i=0; ibaseType)?(ty->baseType):""); for (i=0; iprefix)?(ty->prefix):""); for (i=0; iaccess, Typemaker2_Type_GetAccess(ty)); for (i=0; iflags, Typemaker2_Type_GetFlags(ty)); for (i=0; isetFlags, Typemaker2_Type_GetSetFlags(ty)); for (i=0; igetFlags, Typemaker2_Type_GetGetFlags(ty)); for (i=0; idupFlags, Typemaker2_Type_GetDupFlags(ty)); for (i=0; icopyFlags, Typemaker2_Type_GetCopyFlags(ty)); for (i=0; idefaultValue; s2=Typemaker2_Type_GetDefaultValue(ty); fprintf(f, "Default : %s [%s]\n", s1?s1:"", s2?s2:""); for (i=0; ipresetValue; s2=Typemaker2_Type_GetPresetValue(ty); fprintf(f, "Preset : %s [%s]\n", s1?s1:"", s2?s2:""); for (i=0; imembers); if (tm==NULL) { for (i=0; ifieldCountId)?(ty->fieldCountId):""); for (i=0; idescr)?(ty->descr):""); } } TYPEMAKER2_ENUM *Typemaker2_Type_FindEnum(TYPEMAKER2_TYPE *ty, const char *s) { TYPEMAKER2_ENUM *te; assert(ty); te=Typemaker2_Enum_List_First(ty->enums); while (te) { const char *n; n=Typemaker2_Enum_GetId(te); if (n && strcasecmp(s, n)==0) break; te=Typemaker2_Enum_List_Next(te); } return te; } TYPEMAKER2_CODE *Typemaker2_Type_FindCodeForMember(const TYPEMAKER2_TYPE *ty, const TYPEMAKER2_MEMBER *tm, const char *id) { TYPEMAKER2_CODE *tc=NULL; uint32_t flags=0; if (tm) flags=Typemaker2_Member_GetFlags(tm); /* try code within member definition first, if any */ if (tm) { tc=Typemaker2_Code_List_First(Typemaker2_Member_GetCodeDefs(tm)); while (tc) { const char *s; s=Typemaker2_Code_GetId(tc); if (s && strcasecmp(s, id)==0) { if ((flags & Typemaker2_Code_GetMemberFlagsMaskInt(tc))==Typemaker2_Code_GetMemberFlagsValueInt(tc)) return tc; } tc=Typemaker2_Code_List_Next(tc); } } while (ty) { tc=Typemaker2_Code_List_First(ty->codeDefs); while (tc) { const char *s; s=Typemaker2_Code_GetId(tc); if (s && strcasecmp(s, id)==0) { if ((flags & Typemaker2_Code_GetMemberFlagsMaskInt(tc))==Typemaker2_Code_GetMemberFlagsValueInt(tc)) return tc; } tc=Typemaker2_Code_List_Next(tc); } ty=ty->extendsPtr; } return NULL; } gwenhywfar-5.12.1/tools/typemaker2/tm_slot.h0000644000175000017500000000571313142134464015767 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_slot.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_SLOT_H #define TM_SLOT_H #ifdef __cplusplus extern "C" { #endif /* define TYPEMAKER2_SLOT_FLAGS */ #define TYPEMAKER2_SLOT_FLAGS_USE_PARAM3 0x00000001 #define TYPEMAKER2_SLOT_FLAGS_USE_PARAM4 0x00000002 /* needed system headers */ #include #include #include #include typedef struct TYPEMAKER2_SLOT TYPEMAKER2_SLOT; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_SLOT, Typemaker2_Slot) GWEN_LIST2_FUNCTION_DEFS(TYPEMAKER2_SLOT, Typemaker2_Slot) /** Constructor. */ TYPEMAKER2_SLOT *Typemaker2_Slot_new(void); /** Destructor. */ void Typemaker2_Slot_free(TYPEMAKER2_SLOT *p_struct); TYPEMAKER2_SLOT *Typemaker2_Slot_dup(const TYPEMAKER2_SLOT *p_struct); TYPEMAKER2_SLOT *Typemaker2_Slot_copy(TYPEMAKER2_SLOT *p_struct, const TYPEMAKER2_SLOT *p_src); /** Getter. * Use this function to get the member "name" */ const char *Typemaker2_Slot_GetName(const TYPEMAKER2_SLOT *p_struct); /** Getter. * Use this function to get the member "paramType1" */ const char *Typemaker2_Slot_GetParamType1(const TYPEMAKER2_SLOT *p_struct); /** Getter. * Use this function to get the member "paramType2" */ const char *Typemaker2_Slot_GetParamType2(const TYPEMAKER2_SLOT *p_struct); /** Getter. * Use this function to get the member "flags" */ uint32_t Typemaker2_Slot_GetFlags(const TYPEMAKER2_SLOT *p_struct); /** Setter. * Use this function to set the member "name" */ void Typemaker2_Slot_SetName(TYPEMAKER2_SLOT *p_struct, const char *p_src); /** Setter. * Use this function to set the member "paramType1" */ void Typemaker2_Slot_SetParamType1(TYPEMAKER2_SLOT *p_struct, const char *p_src); /** Setter. * Use this function to set the member "paramType2" */ void Typemaker2_Slot_SetParamType2(TYPEMAKER2_SLOT *p_struct, const char *p_src); /** Setter. * Use this function to set the member "flags" */ void Typemaker2_Slot_SetFlags(TYPEMAKER2_SLOT *p_struct, uint32_t p_src); /** Add flags. * Use this function to add flags to the member "flags" */ void Typemaker2_Slot_AddFlags(TYPEMAKER2_SLOT *p_struct, uint32_t p_src); /** Sub flags. * Use this function to sub flags to the member "flags" */ void Typemaker2_Slot_SubFlags(TYPEMAKER2_SLOT *p_struct, uint32_t p_src); TYPEMAKER2_SLOT_LIST *Typemaker2_Slot_List_dup(const TYPEMAKER2_SLOT_LIST *p_src); void Typemaker2_Slot_ReadXml(TYPEMAKER2_SLOT *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Slot_WriteXml(const TYPEMAKER2_SLOT *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Slot_toXml(const TYPEMAKER2_SLOT *p_struct, GWEN_XMLNODE *p_db); TYPEMAKER2_SLOT *Typemaker2_Slot_fromXml(GWEN_XMLNODE *p_db); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_slot_p.h0000644000175000017500000000113213142134464016275 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_slot.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_SLOT_P_H #define TM_SLOT_P_H #include "tm_slot.h" #ifdef __cplusplus extern "C" { #endif struct TYPEMAKER2_SLOT { GWEN_LIST_ELEMENT(TYPEMAKER2_SLOT) char *name; char *paramType1; char *paramType2; uint32_t flags; }; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_item.h0000644000175000017500000000371613142134464015745 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_item.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_ITEM_H #define TM_ITEM_H #ifdef __cplusplus extern "C" { #endif /* needed system headers */ #include #include #include #include typedef struct TYPEMAKER2_ITEM TYPEMAKER2_ITEM; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_ITEM, Typemaker2_Item) GWEN_LIST2_FUNCTION_DEFS(TYPEMAKER2_ITEM, Typemaker2_Item) /** Constructor. */ TYPEMAKER2_ITEM *Typemaker2_Item_new(void); /** Destructor. */ void Typemaker2_Item_free(TYPEMAKER2_ITEM *p_struct); TYPEMAKER2_ITEM *Typemaker2_Item_dup(const TYPEMAKER2_ITEM *p_struct); TYPEMAKER2_ITEM *Typemaker2_Item_copy(TYPEMAKER2_ITEM *p_struct, const TYPEMAKER2_ITEM *p_src); /** Getter. * Use this function to get the member "name" */ const char *Typemaker2_Item_GetName(const TYPEMAKER2_ITEM *p_struct); /** Getter. * Use this function to get the member "value" */ const char *Typemaker2_Item_GetValue(const TYPEMAKER2_ITEM *p_struct); /** Setter. * Use this function to set the member "name" */ void Typemaker2_Item_SetName(TYPEMAKER2_ITEM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "value" */ void Typemaker2_Item_SetValue(TYPEMAKER2_ITEM *p_struct, const char *p_src); TYPEMAKER2_ITEM_LIST *Typemaker2_Item_List_dup(const TYPEMAKER2_ITEM_LIST *p_src); void Typemaker2_Item_ReadXml(TYPEMAKER2_ITEM *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Item_WriteXml(const TYPEMAKER2_ITEM *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Item_toXml(const TYPEMAKER2_ITEM *p_struct, GWEN_XMLNODE *p_db); TYPEMAKER2_ITEM *Typemaker2_Item_fromXml(GWEN_XMLNODE *p_db); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_member.c0000644000175000017500000003633713312252201016243 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_member_p.h" #include "tm_util.h" #include #include #include GWEN_LIST_FUNCTIONS(TYPEMAKER2_MEMBER, Typemaker2_Member) TYPEMAKER2_MEMBER *Typemaker2_Member_new() { TYPEMAKER2_MEMBER *tm; GWEN_NEW_OBJECT(TYPEMAKER2_MEMBER, tm); tm->refCount=1; GWEN_LIST_INIT(TYPEMAKER2_MEMBER, tm); tm->codeDefs=Typemaker2_Code_List_new(); return tm; } void Typemaker2_Member_free(TYPEMAKER2_MEMBER *tm) { if (tm) { assert(tm->refCount); if (tm->refCount==1) { GWEN_LIST_FINI(TYPEMAKER2_MEMBER, tm); Typemaker2_Code_List_free(tm->codeDefs); free(tm->name); free(tm->typeName); free(tm->elementName); free(tm->descr); free(tm->fieldId); free(tm->defaultValue); free(tm->presetValue); free(tm->aedb_type); free(tm->enumId); free(tm->defineId); tm->refCount=0; GWEN_FREE_OBJECT(tm); } else { tm->refCount--; } } } void Typemaker2_Member_Attach(TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); tm->refCount++; } const char *Typemaker2_Member_GetName(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->name; } void Typemaker2_Member_SetName(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->name); if (s && *s) tm->name=strdup(s); else tm->name=NULL; } const char *Typemaker2_Member_GetTypeName(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->typeName; } void Typemaker2_Member_SetTypeName(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->typeName); if (s && *s) tm->typeName=strdup(s); else tm->typeName=NULL; } const char *Typemaker2_Member_GetElementName(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->elementName; } void Typemaker2_Member_SetElementName(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->elementName); if (s && *s) tm->elementName=strdup(s); else tm->elementName=NULL; } const char *Typemaker2_Member_GetDescription(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->descr; } void Typemaker2_Member_SetDescription(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->descr); if (s && *s) tm->descr=strdup(s); else tm->descr=NULL; } const char *Typemaker2_Member_GetFieldId(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->fieldId; } void Typemaker2_Member_SetFieldId(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->fieldId); if (s && *s) tm->fieldId=strdup(s); else tm->fieldId=NULL; } const char *Typemaker2_Member_GetEnumId(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->enumId; } void Typemaker2_Member_SetEnumId(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->enumId); if (s && *s) tm->enumId=strdup(s); else tm->enumId=NULL; } const char *Typemaker2_Member_GetDefineId(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->defineId; } void Typemaker2_Member_SetDefineId(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->defineId); if (s && *s) tm->defineId=strdup(s); else tm->defineId=NULL; } uint32_t Typemaker2_Member_GetFlags(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->flags==0 && tm->typePtr) return Typemaker2_Type_GetFlags(tm->typePtr); return tm->flags; } void Typemaker2_Member_SetFlags(TYPEMAKER2_MEMBER *tm, uint32_t i) { assert(tm); assert(tm->refCount); tm->flags=i; } uint32_t Typemaker2_Member_GetSetFlags(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->setFlags==0 && tm->typePtr) return Typemaker2_Type_GetSetFlags(tm->typePtr); return tm->setFlags; } void Typemaker2_Member_SetSetFlags(TYPEMAKER2_MEMBER *tm, uint32_t i) { assert(tm); assert(tm->refCount); tm->setFlags=i; } uint32_t Typemaker2_Member_GetGetFlags(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->getFlags==0 && tm->typePtr) return Typemaker2_Type_GetGetFlags(tm->typePtr); return tm->getFlags; } void Typemaker2_Member_SetGetFlags(TYPEMAKER2_MEMBER *tm, uint32_t i) { assert(tm); assert(tm->refCount); tm->getFlags=i; } uint32_t Typemaker2_Member_GetDupFlags(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->dupFlags==0 && tm->typePtr) return Typemaker2_Type_GetDupFlags(tm->typePtr); return tm->dupFlags; } void Typemaker2_Member_SetDupFlags(TYPEMAKER2_MEMBER *tm, uint32_t i) { assert(tm); assert(tm->refCount); tm->dupFlags=i; } uint32_t Typemaker2_Member_GetCopyFlags(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->copyFlags==0 && tm->typePtr) return Typemaker2_Type_GetCopyFlags(tm->typePtr); return tm->copyFlags; } void Typemaker2_Member_SetCopyFlags(TYPEMAKER2_MEMBER *tm, uint32_t i) { assert(tm); assert(tm->refCount); tm->copyFlags=i; } int Typemaker2_Member_GetAccess(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->access==TypeMaker2_Access_Unknown && tm->typePtr) return Typemaker2_Type_GetAccess(tm->typePtr); return tm->access; } void Typemaker2_Member_SetAccess(TYPEMAKER2_MEMBER *tm, int i) { assert(tm); assert(tm->refCount); tm->access=i; } int Typemaker2_Member_GetMaxLen(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->maxLen; } void Typemaker2_Member_SetMaxLen(TYPEMAKER2_MEMBER *tm, int i) { assert(tm); assert(tm->refCount); tm->maxLen=i; } const char *Typemaker2_Member_GetDefaultValue(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->defaultValue==NULL && tm->typePtr) return Typemaker2_Type_GetDefaultValue(tm->typePtr); return tm->defaultValue; } void Typemaker2_Member_SetDefaultValue(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->defaultValue); if (s) tm->defaultValue=strdup(s); else tm->defaultValue=NULL; } const char *Typemaker2_Member_GetPresetValue(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->presetValue==NULL && tm->typePtr) return Typemaker2_Type_GetPresetValue(tm->typePtr); return tm->presetValue; } void Typemaker2_Member_SetPresetValue(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->presetValue); if (s) tm->presetValue=strdup(s); else tm->presetValue=NULL; } const char *Typemaker2_Member_GetAqDbType(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); if (tm->aedb_type==NULL && tm->typePtr) return Typemaker2_Type_GetAqDbType(tm->typePtr); return tm->aedb_type; } void Typemaker2_Member_SetAqDbType(TYPEMAKER2_MEMBER *tm, const char *s) { assert(tm); assert(tm->refCount); free(tm->aedb_type); if (s) tm->aedb_type=strdup(s); else tm->aedb_type=NULL; } TYPEMAKER2_TYPE *Typemaker2_Member_GetTypePtr(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->typePtr; } void Typemaker2_Member_SetTypePtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_TYPE *ty) { assert(tm); assert(tm->refCount); tm->typePtr=ty; } TYPEMAKER2_ENUM *Typemaker2_Member_GetEnumPtr(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->enumPtr; } void Typemaker2_Member_SetEnumPtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_ENUM *te) { assert(tm); assert(tm->refCount); tm->enumPtr=te; } TYPEMAKER2_DEFINE *Typemaker2_Member_GetDefinePtr(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->definePtr; } void Typemaker2_Member_SetDefinePtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_DEFINE *td) { assert(tm); assert(tm->refCount); tm->definePtr=td; } TYPEMAKER2_GROUP *Typemaker2_Member_GetGroupPtr(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->groupPtr; } void Typemaker2_Member_SetGroupPtr(TYPEMAKER2_MEMBER *tm, TYPEMAKER2_GROUP *gr) { assert(tm); assert(tm->refCount); tm->groupPtr=gr; } int Typemaker2_Member_GetMemberPosition(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->memberPosition; } void Typemaker2_Member_SetMemberPosition(TYPEMAKER2_MEMBER *tm, int i) { assert(tm); assert(tm->refCount); tm->memberPosition=i; } TYPEMAKER2_CODE_LIST *Typemaker2_Member_GetCodeDefs(const TYPEMAKER2_MEMBER *tm) { assert(tm); assert(tm->refCount); return tm->codeDefs; } int Typemaker2_Member_readXml(TYPEMAKER2_MEMBER *tm, GWEN_XMLNODE *node, const char *wantedLang) { const char *s; GWEN_XMLNODE *langNode=NULL; GWEN_XMLNODE *nn; assert(tm); assert(tm->refCount); if (wantedLang) langNode=GWEN_XMLNode_FindFirstTag(node, "lang", "id", wantedLang); if (langNode==NULL) langNode=node; s=GWEN_XMLNode_GetProperty(node, "name", NULL); if (s==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Member has no id"); return GWEN_ERROR_BAD_DATA; } Typemaker2_Member_SetName(tm, s); s=GWEN_XMLNode_GetProperty(node, "type", NULL); if (s==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Member has no type"); return GWEN_ERROR_BAD_DATA; } Typemaker2_Member_SetTypeName(tm, s); s=GWEN_XMLNode_GetProperty(node, "elementName", NULL); Typemaker2_Member_SetElementName(tm, s); s=GWEN_XMLNode_GetProperty(node, "enum", NULL); Typemaker2_Member_SetEnumId(tm, s); s=GWEN_XMLNode_GetProperty(node, "define", NULL); Typemaker2_Member_SetDefineId(tm, s); s=GWEN_XMLNode_GetProperty(node, "maxlen", NULL); if (s && *s) { int i; if (1==sscanf(s, "%i", &i)) tm->maxLen=i; else { DBG_ERROR(GWEN_LOGDOMAIN, "Bad value for maxlen [%s]", s); return GWEN_ERROR_BAD_DATA; } } /* read flags */ s=GWEN_XMLNode_GetCharValue(node, "flags", NULL); if (s && *s) Typemaker2_Member_SetFlags(tm, Typemaker2_FlagsFromString(s)); /* read setflags */ s=GWEN_XMLNode_GetCharValue(node, "setflags", NULL); if (s && *s) Typemaker2_Member_SetSetFlags(tm, Typemaker2_FlagsFromString(s)); /* read getflags */ s=GWEN_XMLNode_GetCharValue(node, "getflags", NULL); if (s && *s) Typemaker2_Member_SetGetFlags(tm, Typemaker2_FlagsFromString(s)); /* read dupflags */ s=GWEN_XMLNode_GetCharValue(node, "dupflags", NULL); if (s && *s) Typemaker2_Member_SetDupFlags(tm, Typemaker2_FlagsFromString(s)); /* read copyflags */ s=GWEN_XMLNode_GetCharValue(node, "copyflags", NULL); if (s && *s) Typemaker2_Member_SetCopyFlags(tm, Typemaker2_FlagsFromString(s)); /* read access */ s=GWEN_XMLNode_GetCharValue(node, "access", NULL); if (s && *s) { int i=Typemaker2_AccessFromString(s); if (i==TypeMaker2_Access_Unknown) { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown access type [%s]", s); return GWEN_ERROR_BAD_DATA; } Typemaker2_Member_SetAccess(tm, i); } /* read default value */ s=GWEN_XMLNode_GetCharValue(node, "default", NULL); if (s && *s) Typemaker2_Member_SetDefaultValue(tm, s); /* read preset value */ s=GWEN_XMLNode_GetCharValue(node, "preset", NULL); if (s && *s) Typemaker2_Member_SetPresetValue(tm, s); /* read AEDB type */ s=GWEN_XMLNode_GetCharValue(node, "aedb_type", NULL); if (s && *s) Typemaker2_Member_SetAqDbType(tm, s); /* read description */ nn=GWEN_XMLNode_FindFirstTag(node, "descr", NULL, NULL); if (nn) { GWEN_BUFFER *tbuf; int rv; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_XMLNode_toBuffer(nn, tbuf, GWEN_XML_FLAGS_SIMPLE | GWEN_XML_FLAGS_HANDLE_COMMENTS); if (rv<0) { DBG_ERROR(0, "here (%d)", rv); } else { Typemaker2_Member_SetDescription(tm, GWEN_Buffer_GetStart(tbuf)); } GWEN_Buffer_free(tbuf); } /* read codedefs */ nn=GWEN_XMLNode_FindFirstTag(langNode, "codedefs", NULL, NULL); if (nn) { GWEN_XMLNODE *nnn; nnn=GWEN_XMLNode_FindFirstTag(nn, "codedef", NULL, NULL); while (nnn) { TYPEMAKER2_CODE *tc; tc=Typemaker2_Code_fromXml(nnn); if (tc) { const char *s; s=Typemaker2_Code_GetMemberFlagsMask(tc); if (s && *s) Typemaker2_Code_SetMemberFlagsMaskInt(tc, Typemaker2_FlagsFromString(s)); s=Typemaker2_Code_GetMemberFlagsValue(tc); if (s && *s) Typemaker2_Code_SetMemberFlagsValueInt(tc, Typemaker2_FlagsFromString(s)); } Typemaker2_Code_List_Add(tc, tm->codeDefs); nnn=GWEN_XMLNode_FindNextTag(nnn, "codedef", NULL, NULL); } } return 0; } void Typemaker2_Member_Dump(TYPEMAKER2_MEMBER *tm, FILE *f, int indent) { if (tm) { int i; const char *s1, *s2; for (i=0; iname)?(tm->name):""); for (i=0; itypeName)?(tm->typeName):""); for (i=0; ielementName)?(tm->elementName):""); for (i=0; ifieldId)?(tm->fieldId):""); for (i=0; iaccess, Typemaker2_Member_GetAccess(tm)); for (i=0; iflags, Typemaker2_Member_GetFlags(tm)); for (i=0; isetFlags, Typemaker2_Member_GetSetFlags(tm)); for (i=0; igetFlags, Typemaker2_Member_GetGetFlags(tm)); for (i=0; idupFlags, Typemaker2_Member_GetDupFlags(tm)); for (i=0; idefaultValue; s2=Typemaker2_Member_GetDefaultValue(tm); fprintf(f, "Default : %s [%s]\n", s1?s1:"", s2?s2:""); for (i=0; ipresetValue; s2=Typemaker2_Member_GetPresetValue(tm); fprintf(f, "Preset : %s [%s]\n", s1?s1:"", s2?s2:""); for (i=0; imemberPosition); for (i=0; idescr)?(tm->descr):""); } } gwenhywfar-5.12.1/tools/typemaker2/tm_slot.xml0000644000175000017500000000327413142134464016340 00000000000000 TYPEMAKER2_SLOT Typemaker2_Slot tm_slot with_list1 with_list2 with_xml NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const 0 0 public with_flags gwenhywfar-5.12.1/tools/typemaker2/tm_header_p.h0000644000175000017500000000122713142134464016551 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_HEADER_P_H #define TYPEMAKER2_HEADER_P_H #include "tm_header.h" struct TYPEMAKER2_HEADER { GWEN_LIST_ELEMENT(TYPEMAKER2_HEADER) char *fileName; int type; int location; int refCount; }; #endif gwenhywfar-5.12.1/tools/typemaker2/tm_enum.h0000644000175000017500000000607213142134464015751 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_enum.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_ENUM_H #define TM_ENUM_H #ifdef __cplusplus extern "C" { #endif /* needed system headers */ #include #include #include /* pre-headers */ #include "tm_item.h" typedef struct TYPEMAKER2_ENUM TYPEMAKER2_ENUM; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_ENUM, Typemaker2_Enum) /* post-headers */ /** Constructor. */ TYPEMAKER2_ENUM *Typemaker2_Enum_new(void); /** Destructor. */ void Typemaker2_Enum_free(TYPEMAKER2_ENUM *p_struct); TYPEMAKER2_ENUM *Typemaker2_Enum_dup(const TYPEMAKER2_ENUM *p_struct); TYPEMAKER2_ENUM *Typemaker2_Enum_copy(TYPEMAKER2_ENUM *p_struct, const TYPEMAKER2_ENUM *p_src); /** Getter. * Use this function to get the member "id" */ const char *Typemaker2_Enum_GetId(const TYPEMAKER2_ENUM *p_struct); /** Getter. * Use this function to get the member "prefix" */ const char *Typemaker2_Enum_GetPrefix(const TYPEMAKER2_ENUM *p_struct); /** Getter. * Use this function to get the member "type" */ const char *Typemaker2_Enum_GetType(const TYPEMAKER2_ENUM *p_struct); /** Getter. * Use this function to get the member "items" */ TYPEMAKER2_ITEM_LIST *Typemaker2_Enum_GetItems(const TYPEMAKER2_ENUM *p_struct); /** Getter. * Use this function to get the member "toStringFn" */ const char *Typemaker2_Enum_GetToStringFn(const TYPEMAKER2_ENUM *p_struct); /** Getter. * Use this function to get the member "fromStringFn" */ const char *Typemaker2_Enum_GetFromStringFn(const TYPEMAKER2_ENUM *p_struct); /** Setter. * Use this function to set the member "id" */ void Typemaker2_Enum_SetId(TYPEMAKER2_ENUM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "prefix" */ void Typemaker2_Enum_SetPrefix(TYPEMAKER2_ENUM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "type" */ void Typemaker2_Enum_SetType(TYPEMAKER2_ENUM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "items" */ void Typemaker2_Enum_SetItems(TYPEMAKER2_ENUM *p_struct, const TYPEMAKER2_ITEM_LIST *p_src); /** Setter. * Use this function to set the member "toStringFn" */ void Typemaker2_Enum_SetToStringFn(TYPEMAKER2_ENUM *p_struct, const char *p_src); /** Setter. * Use this function to set the member "fromStringFn" */ void Typemaker2_Enum_SetFromStringFn(TYPEMAKER2_ENUM *p_struct, const char *p_src); TYPEMAKER2_ENUM_LIST *Typemaker2_Enum_List_dup(const TYPEMAKER2_ENUM_LIST *p_src); void Typemaker2_Enum_ReadXml(TYPEMAKER2_ENUM *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Enum_WriteXml(const TYPEMAKER2_ENUM *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Enum_toXml(const TYPEMAKER2_ENUM *p_struct, GWEN_XMLNODE *p_db); TYPEMAKER2_ENUM *Typemaker2_Enum_fromXml(GWEN_XMLNODE *p_db); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_code.c0000644000175000017500000002145613142134476015720 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_code.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_code_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(TYPEMAKER2_CODE, Typemaker2_Code) TYPEMAKER2_CODE *Typemaker2_Code_new(void) { TYPEMAKER2_CODE *p_struct; GWEN_NEW_OBJECT(TYPEMAKER2_CODE, p_struct) GWEN_LIST_INIT(TYPEMAKER2_CODE, p_struct) /* members */ p_struct->id=NULL; p_struct->memberFlagsMask=NULL; p_struct->memberFlagsValue=NULL; p_struct->code=NULL; p_struct->memberFlagsMaskInt=0; p_struct->memberFlagsValueInt=0; /* virtual functions */ return p_struct; } void Typemaker2_Code_free(TYPEMAKER2_CODE *p_struct) { if (p_struct) { GWEN_LIST_FINI(TYPEMAKER2_CODE, p_struct) /* members */ free(p_struct->id); free(p_struct->memberFlagsMask); free(p_struct->memberFlagsValue); free(p_struct->code); GWEN_FREE_OBJECT(p_struct); } } TYPEMAKER2_CODE *Typemaker2_Code_dup(const TYPEMAKER2_CODE *p_src) { TYPEMAKER2_CODE *p_struct; assert(p_src); p_struct=Typemaker2_Code_new(); /* member "id" */ if (p_struct->id) { free(p_struct->id); p_struct->id=NULL; } if (p_src->id) { p_struct->id=strdup(p_src->id); } /* member "memberFlagsMask" */ if (p_struct->memberFlagsMask) { free(p_struct->memberFlagsMask); p_struct->memberFlagsMask=NULL; } if (p_src->memberFlagsMask) { p_struct->memberFlagsMask=strdup(p_src->memberFlagsMask); } /* member "memberFlagsValue" */ if (p_struct->memberFlagsValue) { free(p_struct->memberFlagsValue); p_struct->memberFlagsValue=NULL; } if (p_src->memberFlagsValue) { p_struct->memberFlagsValue=strdup(p_src->memberFlagsValue); } /* member "code" */ if (p_struct->code) { free(p_struct->code); p_struct->code=NULL; } if (p_src->code) { p_struct->code=strdup(p_src->code); } /* member "memberFlagsMaskInt" */ p_struct->memberFlagsMaskInt=p_src->memberFlagsMaskInt; /* member "memberFlagsValueInt" */ p_struct->memberFlagsValueInt=p_src->memberFlagsValueInt; return p_struct; } TYPEMAKER2_CODE *Typemaker2_Code_copy(TYPEMAKER2_CODE *p_struct, const TYPEMAKER2_CODE *p_src) { assert(p_struct); assert(p_src); /* member "id" */ if (p_struct->id) { free(p_struct->id); p_struct->id=NULL; } if (p_src->id) { p_struct->id=strdup(p_src->id); } /* member "memberFlagsMask" */ if (p_struct->memberFlagsMask) { free(p_struct->memberFlagsMask); p_struct->memberFlagsMask=NULL; } if (p_src->memberFlagsMask) { p_struct->memberFlagsMask=strdup(p_src->memberFlagsMask); } /* member "memberFlagsValue" */ if (p_struct->memberFlagsValue) { free(p_struct->memberFlagsValue); p_struct->memberFlagsValue=NULL; } if (p_src->memberFlagsValue) { p_struct->memberFlagsValue=strdup(p_src->memberFlagsValue); } /* member "code" */ if (p_struct->code) { free(p_struct->code); p_struct->code=NULL; } if (p_src->code) { p_struct->code=strdup(p_src->code); } /* member "memberFlagsMaskInt" */ p_struct->memberFlagsMaskInt=p_src->memberFlagsMaskInt; /* member "memberFlagsValueInt" */ p_struct->memberFlagsValueInt=p_src->memberFlagsValueInt; return p_struct; } const char *Typemaker2_Code_GetId(const TYPEMAKER2_CODE *p_struct) { assert(p_struct); return p_struct->id; } const char *Typemaker2_Code_GetMemberFlagsMask(const TYPEMAKER2_CODE *p_struct) { assert(p_struct); return p_struct->memberFlagsMask; } const char *Typemaker2_Code_GetMemberFlagsValue(const TYPEMAKER2_CODE *p_struct) { assert(p_struct); return p_struct->memberFlagsValue; } const char *Typemaker2_Code_GetCode(const TYPEMAKER2_CODE *p_struct) { assert(p_struct); return p_struct->code; } uint32_t Typemaker2_Code_GetMemberFlagsMaskInt(const TYPEMAKER2_CODE *p_struct) { assert(p_struct); return p_struct->memberFlagsMaskInt; } uint32_t Typemaker2_Code_GetMemberFlagsValueInt(const TYPEMAKER2_CODE *p_struct) { assert(p_struct); return p_struct->memberFlagsValueInt; } void Typemaker2_Code_SetId(TYPEMAKER2_CODE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->id) { free(p_struct->id); } if (p_src) { p_struct->id=strdup(p_src); } else { p_struct->id=NULL; } } void Typemaker2_Code_SetMemberFlagsMask(TYPEMAKER2_CODE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->memberFlagsMask) { free(p_struct->memberFlagsMask); } if (p_src) { p_struct->memberFlagsMask=strdup(p_src); } else { p_struct->memberFlagsMask=NULL; } } void Typemaker2_Code_SetMemberFlagsValue(TYPEMAKER2_CODE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->memberFlagsValue) { free(p_struct->memberFlagsValue); } if (p_src) { p_struct->memberFlagsValue=strdup(p_src); } else { p_struct->memberFlagsValue=NULL; } } void Typemaker2_Code_SetCode(TYPEMAKER2_CODE *p_struct, const char *p_src) { assert(p_struct); if (p_struct->code) { free(p_struct->code); } if (p_src) { p_struct->code=strdup(p_src); } else { p_struct->code=NULL; } } void Typemaker2_Code_SetMemberFlagsMaskInt(TYPEMAKER2_CODE *p_struct, uint32_t p_src) { assert(p_struct); p_struct->memberFlagsMaskInt=p_src; } void Typemaker2_Code_SetMemberFlagsValueInt(TYPEMAKER2_CODE *p_struct, uint32_t p_src) { assert(p_struct); p_struct->memberFlagsValueInt=p_src; } TYPEMAKER2_CODE_LIST *Typemaker2_Code_List_dup(const TYPEMAKER2_CODE_LIST *p_src) { TYPEMAKER2_CODE_LIST *p_dest; TYPEMAKER2_CODE *p_elem; assert(p_src); p_dest=Typemaker2_Code_List_new(); p_elem=Typemaker2_Code_List_First(p_src); while (p_elem) { TYPEMAKER2_CODE *p_cpy; p_cpy=Typemaker2_Code_dup(p_elem); Typemaker2_Code_List_Add(p_cpy, p_dest); p_elem=Typemaker2_Code_List_Next(p_elem); } return p_dest; } void Typemaker2_Code_ReadXml(TYPEMAKER2_CODE *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "id" */ if (p_struct->id) { free(p_struct->id); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "id", NULL); if (s) p_struct->id=strdup(s); } if (p_struct->id==NULL) { /* member "id" is volatile, just presetting */ p_struct->id=NULL; } /* member "memberFlagsMask" */ if (p_struct->memberFlagsMask) { free(p_struct->memberFlagsMask); } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "memberFlagsMask", NULL); if (s) p_struct->memberFlagsMask=strdup(s); } if (p_struct->memberFlagsMask==NULL) { /* member "memberFlagsMask" is volatile, just presetting */ p_struct->memberFlagsMask=NULL; } /* member "memberFlagsValue" */ if (p_struct->memberFlagsValue) { free(p_struct->memberFlagsValue); } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "memberFlagsValue", NULL); if (s) p_struct->memberFlagsValue=strdup(s); } if (p_struct->memberFlagsValue==NULL) { /* member "memberFlagsValue" is volatile, just presetting */ p_struct->memberFlagsValue=NULL; } /* member "code" */ if (p_struct->code) { free(p_struct->code); } { const char *s; s=GWEN_XMLNode_GetCharValue(p_db, "code", NULL); if (s) p_struct->code=strdup(s); } if (p_struct->code==NULL) { /* member "code" is volatile, just presetting */ p_struct->code=NULL; } /* member "memberFlagsMaskInt" */ /* member "memberFlagsMaskInt" is volatile, just presetting */ p_struct->memberFlagsMaskInt=0; /* member "memberFlagsValueInt" */ /* member "memberFlagsValueInt" is volatile, just presetting */ p_struct->memberFlagsValueInt=0; } void Typemaker2_Code_WriteXml(const TYPEMAKER2_CODE *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "id" */ GWEN_XMLNode_SetProperty(p_db, "id", p_struct->id); /* member "memberFlagsMask" */ GWEN_XMLNode_SetCharValue(p_db, "memberFlagsMask", p_struct->memberFlagsMask); /* member "memberFlagsValue" */ GWEN_XMLNode_SetCharValue(p_db, "memberFlagsValue", p_struct->memberFlagsValue); /* member "code" */ GWEN_XMLNode_SetCharValue(p_db, "code", p_struct->code); /* member "memberFlagsMaskInt" is volatile, not writing to xml */ /* member "memberFlagsValueInt" is volatile, not writing to xml */ } void Typemaker2_Code_toXml(const TYPEMAKER2_CODE *p_struct, GWEN_XMLNODE *p_db) { Typemaker2_Code_WriteXml(p_struct, p_db); } TYPEMAKER2_CODE *Typemaker2_Code_fromXml(GWEN_XMLNODE *p_db) { TYPEMAKER2_CODE *p_struct; p_struct=Typemaker2_Code_new(); Typemaker2_Code_ReadXml(p_struct, p_db); return p_struct; } /* code headers */ gwenhywfar-5.12.1/tools/typemaker2/tm_group.h0000644000175000017500000000224113312244643016133 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_GROUP_H #define TYPEMAKER2_GROUP_H #include #include typedef struct TYPEMAKER2_GROUP TYPEMAKER2_GROUP; GWEN_TREE_FUNCTION_DEFS(TYPEMAKER2_GROUP, Typemaker2_Group) TYPEMAKER2_GROUP *Typemaker2_Group_new(); void Typemaker2_Group_free(TYPEMAKER2_GROUP *gr); void Typemaker2_Group_Attach(TYPEMAKER2_GROUP *gr); const char *Typemaker2_Group_GetTitle(TYPEMAKER2_GROUP *gr); void Typemaker2_Group_SetTitle(TYPEMAKER2_GROUP *gr, const char *s); const char *Typemaker2_Group_GetDescription(TYPEMAKER2_GROUP *gr); void Typemaker2_Group_SetDescription(TYPEMAKER2_GROUP *gr, const char *s); int Typemaker2_Group_readXml(TYPEMAKER2_GROUP *gr, GWEN_XMLNODE *node, const char *wantedLang); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_builder.h0000664000175000017500000002145614144206313016434 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2021 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_BUILDER_H #define TYPEMAKER2_BUILDER_H #include #include #include #include #define TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_DEFS 0x0001 #define TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_TYPE 0x0002 typedef struct TYPEMAKER2_BUILDER TYPEMAKER2_BUILDER; GWEN_INHERIT_FUNCTION_DEFS(TYPEMAKER2_BUILDER) #include "tm_typemanager.h" #include "tm_type.h" #include "tm_member.h" typedef int (*TYPEMAKER2_BUILDER_BUILD_FN)(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); TYPEMAKER2_BUILDER *Typemaker2_Builder_new(); void Typemaker2_Builder_free(TYPEMAKER2_BUILDER *tb); int Typemaker2_Builder_PrintFileNames(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); GWEN_STRINGLIST *Typemaker2_Builder_GetPublicDeclarations(const TYPEMAKER2_BUILDER *tb); GWEN_STRINGLIST *Typemaker2_Builder_GetLibraryDeclarations(const TYPEMAKER2_BUILDER *tb); GWEN_STRINGLIST *Typemaker2_Builder_GetProtectedDeclarations(const TYPEMAKER2_BUILDER *tb); GWEN_STRINGLIST *Typemaker2_Builder_GetPrivateDeclarations(const TYPEMAKER2_BUILDER *tb); GWEN_STRINGLIST *Typemaker2_Builder_GetCode(const TYPEMAKER2_BUILDER *tb); TYPEMAKER2_TYPEMANAGER *Typemaker2_Builder_GetTypeManager(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetTypeManager(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPEMANAGER *tm); void Typemaker2_Builder_AddPublicDeclaration(TYPEMAKER2_BUILDER *tb, const char *s); void Typemaker2_Builder_AddLibraryDeclaration(TYPEMAKER2_BUILDER *tb, const char *s); void Typemaker2_Builder_AddProtectedDeclaration(TYPEMAKER2_BUILDER *tb, const char *s); void Typemaker2_Builder_AddPrivateDeclaration(TYPEMAKER2_BUILDER *tb, const char *s); void Typemaker2_Builder_AddDeclaration(TYPEMAKER2_BUILDER *tb, int access, const char *s); void Typemaker2_Builder_AddCode(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetFileNamePublic(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetFileNamePublic(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetFileNameLibrary(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetFileNameLibrary(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetFileNameProtected(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetFileNameProtected(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetFileNamePrivate(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetFileNamePrivate(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetFileNameCode(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetFileNameCode(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetSourceFileName(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetSourceFileName(TYPEMAKER2_BUILDER *tb, const char *s); const char *Typemaker2_Builder_GetTypedefFileName(const TYPEMAKER2_BUILDER *tb); void Typemaker2_Builder_SetTypedefFileName(TYPEMAKER2_BUILDER *tb, const char *s); void Typemaker2_Builder_SetDestFolderName(TYPEMAKER2_BUILDER *tb, const char *s); void Typemaker2_Builder_SetBuildFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_BUILDER_BUILD_FN fn); int Typemaker2_Builder_Build(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int Typemaker2_Builder_WriteFiles(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, uint32_t writeFlags); int Typemaker2_Builder_MakeTypeList1(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int Typemaker2_Builder_MakeTypeList2(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); int Typemaker2_Builder_MakeTypeTree(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); GWEN_DB_NODE *Typemaker2_Builder_CreateDbForCall(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst); int Typemaker2_Builder_ReplaceVars(const char *s, GWEN_DB_NODE *db, GWEN_BUFFER *dbuf); /* see INVOKE_FN macro in tm_builder.c */ int Typemaker2_Builder_Invoke_ConstructFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_DestructFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_AssignFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_DupFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_CompareFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_ToDbFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_FromDbFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_ToXmlFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_FromXmlFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_ToObjectFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_FromObjectFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_ToHashStringFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_builder_p.h0000644000175000017500000000634413142134476016757 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_BUILDER_P_H #define TYPEMAKER2_BUILDER_P_H #include "tm_builder.h" struct TYPEMAKER2_BUILDER { GWEN_INHERIT_ELEMENT(TYPEMAKER2_BUILDER) GWEN_STRINGLIST *declarationsPublic; GWEN_STRINGLIST *declarationsLibrary; GWEN_STRINGLIST *declarationsProtected; GWEN_STRINGLIST *declarationsPrivate; GWEN_STRINGLIST *code; char *fileNamePublic; char *fileNameLibrary; char *fileNameProtected; char *fileNamePrivate; char *fileNameCode; char *sourceFileName; char *destFolder; TYPEMAKER2_TYPEMANAGER *typeManager; TYPEMAKER2_BUILDER_BUILD_FN buildFn; }; GWEN_DB_NODE *Typemaker2_Builder_CreateDbForCall(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst); int Typemaker2_Builder_ReplaceVars(const char *s, GWEN_DB_NODE *db, GWEN_BUFFER *dbuf); int Typemaker2_Builder_Invoke_Fn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *code, const char *src, const char *dst, GWEN_BUFFER *dbuf); int Typemaker2_Builder_WriteFile(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName, GWEN_STRINGLIST *sl, int acc); int Typemaker2_Builder_WriteTypedefFile(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName); int Typemaker2_Builder_WriteTypedefFile_List1(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName); int Typemaker2_Builder_WriteTypedefFile_List2(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName); int Typemaker2_Builder_WriteTypedefFile_Tree(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName); int Typemaker2_Builder_WriteTypedefFile_IdMap(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, const char *fileName); int Typemaker2_Builder_DetermineOutFileNames(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_item.xml0000644000175000017500000000175213142134464016314 00000000000000 TYPEMAKER2_ITEM Typemaker2_Item tm_item with_list1 with_list2 with_xml NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const gwenhywfar-5.12.1/tools/typemaker2/tm_signal.c0000644000175000017500000001564713142134476016270 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_signal.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_signal_p.h" #include #include /* code headers */ /* macro functions */ GWEN_LIST_FUNCTIONS(TYPEMAKER2_SIGNAL, Typemaker2_Signal) GWEN_LIST2_FUNCTIONS(TYPEMAKER2_SIGNAL, Typemaker2_Signal) TYPEMAKER2_SIGNAL *Typemaker2_Signal_new(void) { TYPEMAKER2_SIGNAL *p_struct; GWEN_NEW_OBJECT(TYPEMAKER2_SIGNAL, p_struct) GWEN_LIST_INIT(TYPEMAKER2_SIGNAL, p_struct) /* members */ p_struct->name=NULL; p_struct->paramType1=NULL; p_struct->paramType2=NULL; p_struct->flags=0; /* virtual functions */ return p_struct; } void Typemaker2_Signal_free(TYPEMAKER2_SIGNAL *p_struct) { if (p_struct) { GWEN_LIST_FINI(TYPEMAKER2_SIGNAL, p_struct) /* members */ free(p_struct->name); free(p_struct->paramType1); free(p_struct->paramType2); GWEN_FREE_OBJECT(p_struct); } } TYPEMAKER2_SIGNAL *Typemaker2_Signal_dup(const TYPEMAKER2_SIGNAL *p_src) { TYPEMAKER2_SIGNAL *p_struct; assert(p_src); p_struct=Typemaker2_Signal_new(); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "paramType1" */ if (p_struct->paramType1) { free(p_struct->paramType1); p_struct->paramType1=NULL; } if (p_src->paramType1) { p_struct->paramType1=strdup(p_src->paramType1); } /* member "paramType2" */ if (p_struct->paramType2) { free(p_struct->paramType2); p_struct->paramType2=NULL; } if (p_src->paramType2) { p_struct->paramType2=strdup(p_src->paramType2); } /* member "flags" */ p_struct->flags=p_src->flags; return p_struct; } TYPEMAKER2_SIGNAL *Typemaker2_Signal_copy(TYPEMAKER2_SIGNAL *p_struct, const TYPEMAKER2_SIGNAL *p_src) { assert(p_struct); assert(p_src); /* member "name" */ if (p_struct->name) { free(p_struct->name); p_struct->name=NULL; } if (p_src->name) { p_struct->name=strdup(p_src->name); } /* member "paramType1" */ if (p_struct->paramType1) { free(p_struct->paramType1); p_struct->paramType1=NULL; } if (p_src->paramType1) { p_struct->paramType1=strdup(p_src->paramType1); } /* member "paramType2" */ if (p_struct->paramType2) { free(p_struct->paramType2); p_struct->paramType2=NULL; } if (p_src->paramType2) { p_struct->paramType2=strdup(p_src->paramType2); } /* member "flags" */ p_struct->flags=p_src->flags; return p_struct; } const char *Typemaker2_Signal_GetName(const TYPEMAKER2_SIGNAL *p_struct) { assert(p_struct); return p_struct->name; } const char *Typemaker2_Signal_GetParamType1(const TYPEMAKER2_SIGNAL *p_struct) { assert(p_struct); return p_struct->paramType1; } const char *Typemaker2_Signal_GetParamType2(const TYPEMAKER2_SIGNAL *p_struct) { assert(p_struct); return p_struct->paramType2; } uint32_t Typemaker2_Signal_GetFlags(const TYPEMAKER2_SIGNAL *p_struct) { assert(p_struct); return p_struct->flags; } void Typemaker2_Signal_SetName(TYPEMAKER2_SIGNAL *p_struct, const char *p_src) { assert(p_struct); if (p_struct->name) { free(p_struct->name); } if (p_src) { p_struct->name=strdup(p_src); } else { p_struct->name=NULL; } } void Typemaker2_Signal_SetParamType1(TYPEMAKER2_SIGNAL *p_struct, const char *p_src) { assert(p_struct); if (p_struct->paramType1) { free(p_struct->paramType1); } if (p_src) { p_struct->paramType1=strdup(p_src); } else { p_struct->paramType1=NULL; } } void Typemaker2_Signal_SetParamType2(TYPEMAKER2_SIGNAL *p_struct, const char *p_src) { assert(p_struct); if (p_struct->paramType2) { free(p_struct->paramType2); } if (p_src) { p_struct->paramType2=strdup(p_src); } else { p_struct->paramType2=NULL; } } void Typemaker2_Signal_SetFlags(TYPEMAKER2_SIGNAL *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags=p_src; } void Typemaker2_Signal_AddFlags(TYPEMAKER2_SIGNAL *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags|=p_src; } void Typemaker2_Signal_SubFlags(TYPEMAKER2_SIGNAL *p_struct, uint32_t p_src) { assert(p_struct); p_struct->flags&=~p_src; } TYPEMAKER2_SIGNAL_LIST *Typemaker2_Signal_List_dup(const TYPEMAKER2_SIGNAL_LIST *p_src) { TYPEMAKER2_SIGNAL_LIST *p_dest; TYPEMAKER2_SIGNAL *p_elem; assert(p_src); p_dest=Typemaker2_Signal_List_new(); p_elem=Typemaker2_Signal_List_First(p_src); while (p_elem) { TYPEMAKER2_SIGNAL *p_cpy; p_cpy=Typemaker2_Signal_dup(p_elem); Typemaker2_Signal_List_Add(p_cpy, p_dest); p_elem=Typemaker2_Signal_List_Next(p_elem); } return p_dest; } void Typemaker2_Signal_ReadXml(TYPEMAKER2_SIGNAL *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ if (p_struct->name) { free(p_struct->name); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "name", NULL); if (s) p_struct->name=strdup(s); } if (p_struct->name==NULL) { /* member "name" is volatile, just presetting */ p_struct->name=NULL; } /* member "paramType1" */ if (p_struct->paramType1) { free(p_struct->paramType1); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "paramType1", NULL); if (s) p_struct->paramType1=strdup(s); } if (p_struct->paramType1==NULL) { /* member "paramType1" is volatile, just presetting */ p_struct->paramType1=NULL; } /* member "paramType2" */ if (p_struct->paramType2) { free(p_struct->paramType2); } { const char *s; s=GWEN_XMLNode_GetProperty(p_db, "paramType2", NULL); if (s) p_struct->paramType2=strdup(s); } if (p_struct->paramType2==NULL) { /* member "paramType2" is volatile, just presetting */ p_struct->paramType2=NULL; } /* member "flags" */ p_struct->flags=GWEN_XMLNode_GetIntValue(p_db, "flags", 0); } void Typemaker2_Signal_WriteXml(const TYPEMAKER2_SIGNAL *p_struct, GWEN_XMLNODE *p_db) { assert(p_struct); /* member "name" */ GWEN_XMLNode_SetProperty(p_db, "name", p_struct->name); /* member "paramType1" */ GWEN_XMLNode_SetProperty(p_db, "paramType1", p_struct->paramType1); /* member "paramType2" */ GWEN_XMLNode_SetProperty(p_db, "paramType2", p_struct->paramType2); /* member "flags" */ GWEN_XMLNode_SetIntValue(p_db, "flags", p_struct->flags); } void Typemaker2_Signal_toXml(const TYPEMAKER2_SIGNAL *p_struct, GWEN_XMLNODE *p_db) { Typemaker2_Signal_WriteXml(p_struct, p_db); } TYPEMAKER2_SIGNAL *Typemaker2_Signal_fromXml(GWEN_XMLNODE *p_db) { TYPEMAKER2_SIGNAL *p_struct; p_struct=Typemaker2_Signal_new(); Typemaker2_Signal_ReadXml(p_struct, p_db); return p_struct; } /* code headers */ gwenhywfar-5.12.1/tools/typemaker2/tm_item_p.h0000644000175000017500000000105713142134464016260 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_item.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_ITEM_P_H #define TM_ITEM_P_H #include "tm_item.h" #ifdef __cplusplus extern "C" { #endif struct TYPEMAKER2_ITEM { GWEN_LIST_ELEMENT(TYPEMAKER2_ITEM) char *name; char *value; }; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_header.h0000644000175000017500000000315513142134464016234 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_HEADER_H #define TYPEMAKER2_HEADER_H #include #include typedef struct TYPEMAKER2_HEADER TYPEMAKER2_HEADER; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_HEADER, Typemaker2_Header) enum { Typemaker2_HeaderType_Unknown=-1, Typemaker2_HeaderType_System=0, Typemaker2_HeaderType_Local }; enum { Typemaker2_HeaderLocation_Unknown=-1, Typemaker2_HeaderLocation_Pre=0, Typemaker2_HeaderLocation_Post, Typemaker2_HeaderLocation_Code, Typemaker2_HeaderLocation_CodeEnd, Typemaker2_HeaderLocation_HeaderEnd }; TYPEMAKER2_HEADER *Typemaker2_Header_new(); void Typemaker2_Header_free(TYPEMAKER2_HEADER *th); void Typemaker2_Header_Attach(TYPEMAKER2_HEADER *th); const char *Typemaker2_Header_GetFileName(const TYPEMAKER2_HEADER *th); void Typemaker2_Header_SetFileName(TYPEMAKER2_HEADER *th, const char *s); int Typemaker2_Header_GetType(const TYPEMAKER2_HEADER *th); void Typemaker2_Header_SetType(TYPEMAKER2_HEADER *th, int i); int Typemaker2_Header_GetLocation(const TYPEMAKER2_HEADER *th); void Typemaker2_Header_SetLocation(TYPEMAKER2_HEADER *th, int i); int Typemaker2_Header_readXml(TYPEMAKER2_HEADER *th, GWEN_XMLNODE *node); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_typemanager_p.h0000644000175000017500000000171613142134464017640 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_TYPEMANAGER_P_H #define TYPEMAKER2_TYPEMANAGER_P_H #include "tm_typemanager.h" struct TYPEMAKER2_TYPEMANAGER { TYPEMAKER2_TYPE_LIST *typeList; GWEN_STRINGLIST *folders; char *lang; char *apiDeclaration; }; TYPEMAKER2_TYPE *Typemaker2_TypeManager_LoadType(TYPEMAKER2_TYPEMANAGER *tym, const char *typeName); int Typemaker2_TypeManager_SetTypePtrs(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty); int Typemaker2_TypeManager_SetMemberTypePtrs(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_util.c0000644000175000017500000001275613605722707015772 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_util.h" #include "tm_type.h" #include #include uint32_t Typemaker2_FlagsFromString(const char *t) { GWEN_STRINGLIST *sl; uint32_t flags=0; assert(t && *t); sl=GWEN_StringList_fromString(t, " ,:/", 1); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); assert(s); if (strcasecmp(s, "own")==0) flags|=TYPEMAKER2_FLAGS_OWN; else if (strcasecmp(s, "volatile")==0) flags|=TYPEMAKER2_FLAGS_VOLATILE; else if (strcasecmp(s, "const")==0) flags|=TYPEMAKER2_FLAGS_CONST; else if (strcasecmp(s, "static")==0) flags|=TYPEMAKER2_FLAGS_STATIC; else if (strcasecmp(s, "dup")==0) flags|=TYPEMAKER2_FLAGS_DUP; else if (strcasecmp(s, "nodup")==0) flags|=TYPEMAKER2_FLAGS_NODUP; else if (strcasecmp(s, "copy")==0) flags|=TYPEMAKER2_FLAGS_COPY; else if (strcasecmp(s, "nocopy")==0) flags|=TYPEMAKER2_FLAGS_NOCOPY; else if (strcasecmp(s, "attribute")==0) flags|=TYPEMAKER2_FLAGS_ATTRIBUTE; else if (strcasecmp(s, "enum")==0) flags|=TYPEMAKER2_FLAGS_ENUM; else if (strcasecmp(s, "define")==0) flags|=TYPEMAKER2_FLAGS_DEFINE; else if (strcasecmp(s, "with_getbymember")==0) flags|=TYPEMAKER2_FLAGS_WITH_GETBYMEMBER; else if (strcasecmp(s, "with_hash")==0) flags|=TYPEMAKER2_FLAGS_WITH_HASH; else if (strcasecmp(s, "with_hashnum")==0) flags|=TYPEMAKER2_FLAGS_WITH_HASHNUM; else if (strcasecmp(s, "with_flags")==0) flags|=TYPEMAKER2_FLAGS_WITH_FLAGS; else if (strcasecmp(s, "assign")==0) flags|=TYPEMAKER2_FLAGS_ASSIGN; else if (strcasecmp(s, "omit")==0) flags|=TYPEMAKER2_FLAGS_OMIT; else if (strcasecmp(s, "sortByMember")==0) flags|=TYPEMAKER2_FLAGS_SORTBYMEMBER; else if (strcasecmp(s, "noConstObject")==0) flags|=TYPEMAKER2_FLAGS_NOCONSTOBJECT; else if (strcasecmp(s, "none")==0) flags|=TYPEMAKER2_FLAGS_NONE; else if (strcasecmp(s, "gwen_cb")==0) flags|=TYPEMAKER2_FLAGS_GWEN_CB; se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } return flags; } uint32_t Typemaker2_TypeFlagsFromString(const char *t) { GWEN_STRINGLIST *sl; uint32_t flags=0; assert(t && *t); sl=GWEN_StringList_fromString(t, " ,:/", 1); if (sl) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(sl); while (se) { const char *s; s=GWEN_StringListEntry_Data(se); assert(s); if (strcasecmp(s, "with_db")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_DB; else if (strcasecmp(s, "with_xml")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_XML; else if (strcasecmp(s, "with_object")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_OBJECT; else if (strcasecmp(s, "with_list1")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_LIST1; else if (strcasecmp(s, "with_list2")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_LIST2; else if (strcasecmp(s, "with_inherit")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_INHERIT; else if (strcasecmp(s, "with_idmap")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_IDMAP; else if (strcasecmp(s, "with_tree")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_TREE; else if (strcasecmp(s, "with_hash")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_HASH; else if (strcasecmp(s, "with_refcount")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_REFCOUNT; else if (strcasecmp(s, "with_signals")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_SIGNALS; else if (strcasecmp(s, "with_slots")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_SLOTS; else if (strcasecmp(s, "with_cachefns")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_CACHEFNS; else if (strcasecmp(s, "dup")==0) flags|=TYPEMAKER2_TYPEFLAGS_DUP; else if (strcasecmp(s, "nodup")==0) flags|=TYPEMAKER2_TYPEFLAGS_NODUP; else if (strcasecmp(s, "copy")==0) flags|=TYPEMAKER2_TYPEFLAGS_COPY; else if (strcasecmp(s, "nocopy")==0) flags|=TYPEMAKER2_TYPEFLAGS_NOCOPY; else if (strcasecmp(s, "with_constlist2")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_CONSTLIST2; else if (strcasecmp(s, "with_tree2")==0) flags|=TYPEMAKER2_TYPEFLAGS_WITH_TREE2; se=GWEN_StringListEntry_Next(se); } GWEN_StringList_free(sl); } return flags; } int Typemaker2_AccessFromString(const char *s) { assert(s); if (strcasecmp(s, "pub")==0 || strcasecmp(s, "public")==0) return TypeMaker2_Access_Public; else if (strcasecmp(s, "library")==0 || strcasecmp(s, "lib")==0) return TypeMaker2_Access_Library; else if (strcasecmp(s, "protected")==0 || strcasecmp(s, "prot")==0) return TypeMaker2_Access_Protected; else if (strcasecmp(s, "private")==0 || strcasecmp(s, "priv")==0) return TypeMaker2_Access_Private; return TypeMaker2_Access_Unknown; } gwenhywfar-5.12.1/tools/typemaker2/tm_group_p.h0000644000175000017500000000121013142134464016445 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_GROUP_P_H #define TYPEMAKER2_GROUP_P_H #include "tm_group.h" struct TYPEMAKER2_GROUP { GWEN_TREE_ELEMENT(TYPEMAKER2_GROUP) char *title; char *description; int refCount; }; #endif gwenhywfar-5.12.1/tools/typemaker2/tm_define.xml0000644000175000017500000000522613142134464016610 00000000000000 TYPEMAKER2_DEFINE Typemaker2_Define tm_define with_list1 with_xml
tm_item.h
NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const NULL NULL public own attribute const dup const NULL Typemaker2_Item_List_new() public own volatile const dup none Typemaker2_Define_Mode_Unknown Typemaker2_Define_Mode_Unknown public attribute enum none none 0 0 public attribute none none 0 0 public volatile none none
gwenhywfar-5.12.1/tools/typemaker2/tm_define_p.h0000644000175000017500000000126413142134464016554 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_define.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_DEFINE_P_H #define TM_DEFINE_P_H #include "tm_define.h" #ifdef __cplusplus extern "C" { #endif struct TYPEMAKER2_DEFINE { GWEN_LIST_ELEMENT(TYPEMAKER2_DEFINE) char *id; char *prefix; char *type; TYPEMAKER2_ITEM_LIST *items; /* volatile */ int mode; int startValue; int lastValue; /* volatile */ }; #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_define.h0000644000175000017500000000715213142134464016237 00000000000000/********************************************************** * This file has been automatically created by "typemaker2" * from the file "tm_define.xml". * Please do not edit this file, all changes will be lost. * Better edit the mentioned source file instead. **********************************************************/ #ifndef TM_DEFINE_H #define TM_DEFINE_H #ifdef __cplusplus extern "C" { #endif /* needed system headers */ #include #include #include /* pre-headers */ #include "tm_item.h" typedef struct TYPEMAKER2_DEFINE TYPEMAKER2_DEFINE; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_DEFINE, Typemaker2_Define) enum { Typemaker2_Define_Mode_Unknown = -1, Typemaker2_Define_Mode_Sequence = 1, Typemaker2_Define_Mode_BitField }; /* post-headers */ int Typemaker2_Define_Mode_fromString(const char *p_s); const char *Typemaker2_Define_Mode_toString(int p_i); /** Constructor. */ TYPEMAKER2_DEFINE *Typemaker2_Define_new(void); /** Destructor. */ void Typemaker2_Define_free(TYPEMAKER2_DEFINE *p_struct); TYPEMAKER2_DEFINE *Typemaker2_Define_dup(const TYPEMAKER2_DEFINE *p_struct); TYPEMAKER2_DEFINE *Typemaker2_Define_copy(TYPEMAKER2_DEFINE *p_struct, const TYPEMAKER2_DEFINE *p_src); /** Getter. * Use this function to get the member "id" */ const char *Typemaker2_Define_GetId(const TYPEMAKER2_DEFINE *p_struct); /** Getter. * Use this function to get the member "prefix" */ const char *Typemaker2_Define_GetPrefix(const TYPEMAKER2_DEFINE *p_struct); /** Getter. * Use this function to get the member "type" */ const char *Typemaker2_Define_GetType(const TYPEMAKER2_DEFINE *p_struct); /** Getter. * Use this function to get the member "items" */ TYPEMAKER2_ITEM_LIST *Typemaker2_Define_GetItems(const TYPEMAKER2_DEFINE *p_struct); /** Getter. * Use this function to get the member "mode" */ int Typemaker2_Define_GetMode(const TYPEMAKER2_DEFINE *p_struct); /** Getter. * Use this function to get the member "startValue" */ int Typemaker2_Define_GetStartValue(const TYPEMAKER2_DEFINE *p_struct); /** Getter. * Use this function to get the member "lastValue" */ int Typemaker2_Define_GetLastValue(const TYPEMAKER2_DEFINE *p_struct); /** Setter. * Use this function to set the member "id" */ void Typemaker2_Define_SetId(TYPEMAKER2_DEFINE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "prefix" */ void Typemaker2_Define_SetPrefix(TYPEMAKER2_DEFINE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "type" */ void Typemaker2_Define_SetType(TYPEMAKER2_DEFINE *p_struct, const char *p_src); /** Setter. * Use this function to set the member "items" */ void Typemaker2_Define_SetItems(TYPEMAKER2_DEFINE *p_struct, const TYPEMAKER2_ITEM_LIST *p_src); /** Setter. * Use this function to set the member "mode" */ void Typemaker2_Define_SetMode(TYPEMAKER2_DEFINE *p_struct, int p_src); /** Setter. * Use this function to set the member "startValue" */ void Typemaker2_Define_SetStartValue(TYPEMAKER2_DEFINE *p_struct, int p_src); /** Setter. * Use this function to set the member "lastValue" */ void Typemaker2_Define_SetLastValue(TYPEMAKER2_DEFINE *p_struct, int p_src); TYPEMAKER2_DEFINE_LIST *Typemaker2_Define_List_dup(const TYPEMAKER2_DEFINE_LIST *p_src); void Typemaker2_Define_ReadXml(TYPEMAKER2_DEFINE *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Define_WriteXml(const TYPEMAKER2_DEFINE *p_struct, GWEN_XMLNODE *p_db); void Typemaker2_Define_toXml(const TYPEMAKER2_DEFINE *p_struct, GWEN_XMLNODE *p_db); TYPEMAKER2_DEFINE *Typemaker2_Define_fromXml(GWEN_XMLNODE *p_db); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/tools/typemaker2/tm_inline.h0000644000175000017500000000303113142134464016253 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2009 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef TYPEMAKER2_INLINE_H #define TYPEMAKER2_INLINE_H #include #include typedef struct TYPEMAKER2_INLINE TYPEMAKER2_INLINE; GWEN_LIST_FUNCTION_DEFS(TYPEMAKER2_INLINE, Typemaker2_Inline) enum { Typemaker2_InlineLocation_Unknown=-1, Typemaker2_InlineLocation_Header=0, Typemaker2_InlineLocation_Code }; TYPEMAKER2_INLINE *Typemaker2_Inline_new(); void Typemaker2_Inline_free(TYPEMAKER2_INLINE *th); void Typemaker2_Inline_Attach(TYPEMAKER2_INLINE *th); const char *Typemaker2_Inline_GetContent(const TYPEMAKER2_INLINE *th); void Typemaker2_Inline_SetContent(TYPEMAKER2_INLINE *th, const char *s); int Typemaker2_Inline_GetAccess(const TYPEMAKER2_INLINE *th); void Typemaker2_Inline_SetAccess(TYPEMAKER2_INLINE *th, int i); int Typemaker2_Inline_GetLocation(const TYPEMAKER2_INLINE *th); void Typemaker2_Inline_SetLocation(TYPEMAKER2_INLINE *th, int i); int Typemaker2_Inline_GetTypeFlagsMask(const TYPEMAKER2_INLINE *th); int Typemaker2_Inline_GetTypeFlagsValue(const TYPEMAKER2_INLINE *th); TYPEMAKER2_INLINE *Typemaker2_Inline_fromXml(GWEN_XMLNODE *node); #endif gwenhywfar-5.12.1/tools/typemaker2/tm_virtualfn.c0000644000175000017500000002177013142134476017017 00000000000000/*************************************************************************** begin : Mon Jun 28 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_virtualfn_p.h" #include "tm_util.h" #include "tm_type.h" #include #include #include GWEN_LIST_FUNCTIONS(TYPEMAKER2_VIRTUALFN, Typemaker2_VirtualFn); GWEN_LIST_FUNCTIONS(TYPEMAKER2_VIRTUALFN_PARAM, Typemaker2_VirtualFn_Param); TYPEMAKER2_VIRTUALFN *Typemaker2_VirtualFn_new() { TYPEMAKER2_VIRTUALFN *vf; GWEN_NEW_OBJECT(TYPEMAKER2_VIRTUALFN, vf); vf->refCount=1; GWEN_LIST_INIT(TYPEMAKER2_VIRTUALFN, vf); vf->access=TypeMaker2_Access_Public; vf->paramList=Typemaker2_VirtualFn_Param_List_new(); return vf; } void Typemaker2_VirtualFn_free(TYPEMAKER2_VIRTUALFN *vf) { if (vf) { if (vf->refCount==1) { GWEN_LIST_FINI(TYPEMAKER2_VIRTUALFN, vf); free(vf->preset); free(vf->name); free(vf->descr); free(vf->returnType); free(vf->defaultReturnValue); free(vf->location); Typemaker2_VirtualFn_Param_List_free(vf->paramList); vf->refCount=0; GWEN_FREE_OBJECT(vf); } else vf->refCount--; } } void Typemaker2_VirtualFn_Attach(TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); vf->refCount++; } int Typemaker2_VirtualFn_readXml(TYPEMAKER2_VIRTUALFN *vf, GWEN_XMLNODE *node) { const char *s; GWEN_XMLNODE *n; assert(vf); assert(vf->refCount); s=GWEN_XMLNode_GetProperty(node, "name", NULL); if (s==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Member has no id"); return GWEN_ERROR_BAD_DATA; } Typemaker2_VirtualFn_SetName(vf, s); s=GWEN_XMLNode_GetProperty(node, "location", "pre"); Typemaker2_VirtualFn_SetLocation(vf, s); /* read flags */ s=GWEN_XMLNode_GetCharValue(node, "flags", NULL); if (s && *s) Typemaker2_VirtualFn_SetFlags(vf, Typemaker2_FlagsFromString(s)); /* read access */ s=GWEN_XMLNode_GetCharValue(node, "access", NULL); if (s && *s) { int i=Typemaker2_AccessFromString(s); if (i==TypeMaker2_Access_Unknown) { DBG_ERROR(GWEN_LOGDOMAIN, "Unknown access type [%s]", s); return GWEN_ERROR_BAD_DATA; } Typemaker2_VirtualFn_SetAccess(vf, i); } /* read default value */ s=GWEN_XMLNode_GetCharValue(node, "defaultReturnValue", NULL); if (s && *s) Typemaker2_VirtualFn_SetDefaultReturnValue(vf, s); s=GWEN_XMLNode_GetCharValue(node, "preset", NULL); if (s && *s) Typemaker2_VirtualFn_SetPreset(vf, s); /* read return type */ s=GWEN_XMLNode_GetCharValue(node, "returnType", NULL); if (s && *s) Typemaker2_VirtualFn_SetReturnType(vf, s); /* read returnType description */ n=GWEN_XMLNode_FindFirstTag(node, "returnType", NULL, NULL); if (n) { s=GWEN_XMLNode_GetCharValue(n, "descr", NULL); Typemaker2_VirtualFn_SetReturnTypeDescr(vf, s); } n=GWEN_XMLNode_FindFirstTag(node, "params", NULL, NULL); if (n) { n=GWEN_XMLNode_FindFirstTag(n, "param", NULL, NULL); while (n) { const char *paramName; const char *paramType; const char *paramDescr; TYPEMAKER2_VIRTUALFN_PARAM *prm; paramType=GWEN_XMLNode_GetProperty(n, "type", NULL); paramName=GWEN_XMLNode_GetProperty(n, "name", NULL); paramDescr=GWEN_XMLNode_GetCharValue(n, "descr", NULL); if (!(paramType && *paramType)) { DBG_ERROR(GWEN_LOGDOMAIN, "Parameter has no type"); return GWEN_ERROR_BAD_DATA; } prm=Typemaker2_VirtualFn_Param_new(); Typemaker2_VirtualFn_Param_SetName(prm, paramName); Typemaker2_VirtualFn_Param_SetType(prm, paramType); Typemaker2_VirtualFn_Param_SetDescr(prm, paramDescr); Typemaker2_VirtualFn_Param_List_Add(prm, vf->paramList); n=GWEN_XMLNode_FindNextTag(n, "param", NULL, NULL); } } /* read descr */ s=GWEN_XMLNode_GetCharValue(node, "descr", NULL); Typemaker2_VirtualFn_SetDescr(vf, s); return 0; } const char *Typemaker2_VirtualFn_GetName(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->name; } void Typemaker2_VirtualFn_SetName(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); assert(vf->refCount); free(vf->name); if (s) vf->name=strdup(s); else vf->name=NULL; } const char *Typemaker2_VirtualFn_GetLocation(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->location; } void Typemaker2_VirtualFn_SetLocation(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); assert(vf->refCount); free(vf->location); if (s) vf->location=strdup(s); else vf->location=NULL; } const char *Typemaker2_VirtualFn_GetDescr(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->descr; } void Typemaker2_VirtualFn_SetDescr(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); assert(vf->refCount); free(vf->descr); if (s) vf->descr=strdup(s); else vf->descr=NULL; } uint32_t Typemaker2_VirtualFn_GetFlags(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->flags; } void Typemaker2_VirtualFn_SetFlags(TYPEMAKER2_VIRTUALFN *vf, uint32_t fl) { assert(vf); assert(vf->refCount); vf->flags=fl; } void Typemaker2_VirtualFn_AddFlags(TYPEMAKER2_VIRTUALFN *vf, uint32_t fl) { assert(vf); assert(vf->refCount); vf->flags|=fl; } void Typemaker2_VirtualFn_SubFlags(TYPEMAKER2_VIRTUALFN *vf, uint32_t fl) { assert(vf); assert(vf->refCount); vf->flags&=~fl; } int Typemaker2_VirtualFn_GetAccess(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->access; } void Typemaker2_VirtualFn_SetAccess(TYPEMAKER2_VIRTUALFN *vf, int i) { assert(vf); assert(vf->refCount); vf->access=i; } const char *Typemaker2_VirtualFn_GetReturnType(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->returnType; } void Typemaker2_VirtualFn_SetReturnType(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); assert(vf->refCount); free(vf->returnType); if (s) vf->returnType=strdup(s); else vf->returnType=NULL; } const char *Typemaker2_VirtualFn_GetReturnTypeDescr(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); return vf->returnTypeDescr; } void Typemaker2_VirtualFn_SetReturnTypeDescr(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); free(vf->returnTypeDescr); if (s) vf->returnTypeDescr=strdup(s); else vf->returnTypeDescr=NULL; } const char *Typemaker2_VirtualFn_GetDefaultReturnValue(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->defaultReturnValue; } void Typemaker2_VirtualFn_SetDefaultReturnValue(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); assert(vf->refCount); free(vf->defaultReturnValue); if (s) vf->defaultReturnValue=strdup(s); else vf->defaultReturnValue=NULL; } TYPEMAKER2_VIRTUALFN_PARAM_LIST *Typemaker2_VirtualFn_GetParamTypeList(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->paramList; } const char *Typemaker2_VirtualFn_GetPreset(const TYPEMAKER2_VIRTUALFN *vf) { assert(vf); assert(vf->refCount); return vf->preset; } void Typemaker2_VirtualFn_SetPreset(TYPEMAKER2_VIRTUALFN *vf, const char *s) { assert(vf); assert(vf->refCount); free(vf->preset); if (s) vf->preset=strdup(s); else vf->preset=NULL; } TYPEMAKER2_VIRTUALFN_PARAM *Typemaker2_VirtualFn_Param_new() { TYPEMAKER2_VIRTUALFN_PARAM *prm; GWEN_NEW_OBJECT(TYPEMAKER2_VIRTUALFN_PARAM, prm); GWEN_LIST_INIT(TYPEMAKER2_VIRTUALFN_PARAM, prm); return prm; } void Typemaker2_VirtualFn_Param_free(TYPEMAKER2_VIRTUALFN_PARAM *prm) { if (prm) { free(prm->name); free(prm->type); free(prm->descr); GWEN_FREE_OBJECT(prm); } } const char *Typemaker2_VirtualFn_Param_GetName(const TYPEMAKER2_VIRTUALFN_PARAM *prm) { assert(prm); return prm->name; } void Typemaker2_VirtualFn_Param_SetName(TYPEMAKER2_VIRTUALFN_PARAM *prm, const char *s) { assert(prm); free(prm->name); if (s) prm->name=strdup(s); else prm->name=NULL; } const char *Typemaker2_VirtualFn_Param_GetType(const TYPEMAKER2_VIRTUALFN_PARAM *prm) { assert(prm); return prm->type; } void Typemaker2_VirtualFn_Param_SetType(TYPEMAKER2_VIRTUALFN_PARAM *prm, const char *s) { assert(prm); free(prm->type); if (s) prm->type=strdup(s); else prm->type=NULL; } const char *Typemaker2_VirtualFn_Param_GetDescr(const TYPEMAKER2_VIRTUALFN_PARAM *prm) { assert(prm); return prm->descr; } void Typemaker2_VirtualFn_Param_SetDescr(TYPEMAKER2_VIRTUALFN_PARAM *prm, const char *s) { assert(prm); free(prm->descr); if (s) prm->descr=strdup(s); else prm->descr=NULL; } gwenhywfar-5.12.1/tools/typemaker2/tm_typemanager.c0000664000175000017500000005243713314434371017325 00000000000000/*************************************************************************** begin : Thu Jul 02 2009 copyright : (C) 2018 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "tm_typemanager_p.h" #include #include #include #include #include #define TM_TYPEMANAGER_XMLFLAGS (\ GWEN_XML_FLAGS_DEFAULT | \ GWEN_XML_FLAGS_HANDLE_HEADERS | \ GWEN_XML_FLAGS_HANDLE_OPEN_HTMLTAGS \ ) TYPEMAKER2_TYPEMANAGER *Typemaker2_TypeManager_new() { TYPEMAKER2_TYPEMANAGER *tym; GWEN_NEW_OBJECT(TYPEMAKER2_TYPEMANAGER, tym); tym->typeList=Typemaker2_Type_List_new(); tym->folders=GWEN_StringList_new(); tym->lang=strdup("c"); return tym; } void Typemaker2_TypeManager_free(TYPEMAKER2_TYPEMANAGER *tym) { if (tym) { Typemaker2_Type_List_free(tym->typeList); GWEN_StringList_free(tym->folders); GWEN_FREE_OBJECT(tym); } } const char *Typemaker2_TypeManager_GetLanguage(const TYPEMAKER2_TYPEMANAGER *tym) { assert(tym); return tym->lang; } void Typemaker2_TypeManager_SetLanguage(TYPEMAKER2_TYPEMANAGER *tym, const char *s) { assert(tym); free(tym->lang); if (s) tym->lang=strdup(s); else tym->lang=NULL; } const char *Typemaker2_TypeManager_GetApiDeclaration(const TYPEMAKER2_TYPEMANAGER *tym) { assert(tym); return tym->apiDeclaration; } void Typemaker2_TypeManager_SetApiDeclaration(TYPEMAKER2_TYPEMANAGER *tym, const char *s) { assert(tym); free(tym->apiDeclaration); if (s) tym->apiDeclaration=strdup(s); else tym->apiDeclaration=NULL; } void Typemaker2_TypeManager_AddFolder(TYPEMAKER2_TYPEMANAGER *tym, const char *s) { assert(tym); GWEN_StringList_AppendString(tym->folders, s, 0, 1); } void Typemaker2_TypeManager_AddType(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty) { assert(tym); Typemaker2_Type_List_Add(ty, tym->typeList); } TYPEMAKER2_TYPE *Typemaker2_TypeManager_FindType(TYPEMAKER2_TYPEMANAGER *tym, const char *s) { TYPEMAKER2_TYPE *ty; assert(tym); ty=Typemaker2_Type_List_First(tym->typeList); while (ty) { const char *n; n=Typemaker2_Type_GetName(ty); if (n && strcasecmp(s, n)==0) break; ty=Typemaker2_Type_List_Next(ty); } return ty; } TYPEMAKER2_TYPE *Typemaker2_TypeManager_LoadType(TYPEMAKER2_TYPEMANAGER *tym, const char *typeName) { GWEN_BUFFER *tbuf; GWEN_BUFFER *nbuf; char *p; int rv; TYPEMAKER2_TYPE *ty=NULL; GWEN_XMLNODE *root; GWEN_XMLNODE *node; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, typeName); p=GWEN_Buffer_GetStart(tbuf); while (*p) { *p=tolower(*p); p++; } GWEN_Buffer_AppendString(tbuf, ".tm2"); nbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(tym->folders, GWEN_Buffer_GetStart(tbuf), nbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Typefile [%s] not found (%d)", GWEN_Buffer_GetStart(tbuf), rv); GWEN_Buffer_free(nbuf); GWEN_Buffer_free(tbuf); return NULL; } /* read XML file */ root=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "xml"); rv=GWEN_XML_ReadFile(root, GWEN_Buffer_GetStart(nbuf), TM_TYPEMANAGER_XMLFLAGS); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not load typefile [%s] (%d)", GWEN_Buffer_GetStart(nbuf), rv); GWEN_XMLNode_free(root); GWEN_Buffer_free(nbuf); GWEN_Buffer_free(tbuf); return NULL; } /* get element */ node=GWEN_XMLNode_FindFirstTag(root, "tm2", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a tm2 element", GWEN_Buffer_GetStart(nbuf)); GWEN_XMLNode_free(root); GWEN_Buffer_free(nbuf); GWEN_Buffer_free(tbuf); return NULL; } /* get element with id==typeName and wanted language */ node=GWEN_XMLNode_FindFirstTag(node, "typedef", "id", typeName); while (node) { const char *s=GWEN_XMLNode_GetProperty(node, "lang", NULL); if (s && *s && strcasecmp(s, tym->lang)==0) break; node=GWEN_XMLNode_FindNextTag(node, "typedef", "id", typeName); } if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a element for type [%s] and language [%s]", GWEN_Buffer_GetStart(nbuf), typeName, tym->lang); GWEN_XMLNode_free(root); GWEN_Buffer_free(nbuf); GWEN_Buffer_free(tbuf); return NULL; } /* load typedef from XML element */ ty=Typemaker2_Type_new(); rv=Typemaker2_Type_readXml(ty, node, NULL); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error reading type [%s] from file [%s] (%d)", typeName, GWEN_Buffer_GetStart(nbuf), rv); Typemaker2_Type_free(ty); GWEN_XMLNode_free(root); GWEN_Buffer_free(nbuf); GWEN_Buffer_free(tbuf); return NULL; } GWEN_XMLNode_free(root); GWEN_Buffer_free(nbuf); GWEN_Buffer_free(tbuf); return ty; } int Typemaker2_TypeManager_MakeTypeDerivatives(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty, const char *baseType, const char *nType, const char *nPrefix) { TYPEMAKER2_TYPE *t2; char tbuf[256]; int rv; t2=Typemaker2_Type_new(); Typemaker2_Type_SetExtends(t2, baseType); Typemaker2_Type_SetType(t2, TypeMaker2_Type_Pointer); Typemaker2_Type_SetBaseType(t2, Typemaker2_Type_GetName(ty)); snprintf(tbuf, sizeof(tbuf)-1, "%s_%s", Typemaker2_Type_GetName(ty), nType); tbuf[sizeof(tbuf)-1]=0; Typemaker2_Type_SetName(t2, tbuf); snprintf(tbuf, sizeof(tbuf)-1, "%s_%s", Typemaker2_Type_GetIdentifier(ty), nType); tbuf[sizeof(tbuf)-1]=0; Typemaker2_Type_SetIdentifier(t2, tbuf); snprintf(tbuf, sizeof(tbuf)-1, "%s_%s", Typemaker2_Type_GetPrefix(ty), nPrefix); tbuf[sizeof(tbuf)-1]=0; Typemaker2_Type_SetPrefix(t2, tbuf); Typemaker2_TypeManager_AddType(tym, t2); /* set type pointers in this type structure */ rv=Typemaker2_TypeManager_SetTypePtrs(tym, t2); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=Typemaker2_TypeManager_SetMemberTypePtrs(tym, t2); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return 0; } int Typemaker2_TypeManager_MakeTypeList1(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty) { return Typemaker2_TypeManager_MakeTypeDerivatives(tym, ty, "list1_base", "LIST", "List"); } int Typemaker2_TypeManager_MakeTypeList2(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty) { return Typemaker2_TypeManager_MakeTypeDerivatives(tym, ty, "list2_base", "LIST2", "List2"); } int Typemaker2_TypeManager_MakeTypeTree(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty) { return Typemaker2_TypeManager_MakeTypeDerivatives(tym, ty, "tree_base", "TREE", "Tree"); } TYPEMAKER2_TYPE *Typemaker2_TypeManager_LoadTypeFile(TYPEMAKER2_TYPEMANAGER *tym, const char *fileName) { int rv; TYPEMAKER2_TYPE *ty=NULL; GWEN_XMLNODE *root; GWEN_XMLNODE *node; /* read XML file */ root=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "xml"); rv=GWEN_XML_ReadFile(root, fileName, TM_TYPEMANAGER_XMLFLAGS); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not load typefile [%s] (%d)", fileName, rv); GWEN_XMLNode_free(root); return NULL; } /* get element */ node=GWEN_XMLNode_FindFirstTag(root, "tm2", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a tm2 element", fileName); GWEN_XMLNode_free(root); return NULL; } /* get element with id==typeName and wanted language */ node=GWEN_XMLNode_FindFirstTag(node, "type", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a type element", fileName); GWEN_XMLNode_free(root); return NULL; } /* load type from XML element */ ty=Typemaker2_Type_new(); rv=Typemaker2_Type_readXml(ty, node, tym->lang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error reading type from file [%s] (%d)", fileName, rv); Typemaker2_Type_free(ty); GWEN_XMLNode_free(root); return NULL; } GWEN_XMLNode_free(root); /* preset some stuff */ if (1) { const char *x; x=Typemaker2_Type_GetExtends(ty); if (!x || !(*x)) Typemaker2_Type_SetExtends(ty, "struct_base"); } /* add first, because other types might want to refer to this one */ Typemaker2_Type_List_Add(ty, tym->typeList); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) Typemaker2_TypeManager_MakeTypeList1(tym, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) Typemaker2_TypeManager_MakeTypeList2(tym, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_TREE) Typemaker2_TypeManager_MakeTypeTree(tym, ty); //Typemaker2_TypeManager_Dump(tym, stderr, 2); /* set type pointers in this type structure */ rv=Typemaker2_TypeManager_SetTypePtrs(tym, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Type_free(ty); return NULL; } /* set type pointers in the member structures */ rv=Typemaker2_TypeManager_SetMemberTypePtrs(tym, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Type_free(ty); return NULL; } return ty; } int Typemaker2_TypeManager_LoadTypeFile2(TYPEMAKER2_TYPEMANAGER *tym, const char *fileName, TYPEMAKER2_TYPE_LIST2 *tlist2) { int rv; TYPEMAKER2_TYPE *ty=NULL; GWEN_XMLNODE *root; GWEN_XMLNODE *node; TYPEMAKER2_TYPE_LIST2 *tl; TYPEMAKER2_TYPE_LIST2_ITERATOR *it; /* read XML file */ root=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "xml"); rv=GWEN_XML_ReadFile(root, fileName, TM_TYPEMANAGER_XMLFLAGS); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not load typefile [%s] (%d)", fileName, rv); GWEN_XMLNode_free(root); return rv; } /* get element */ node=GWEN_XMLNode_FindFirstTag(root, "tm2", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a tm2 element", fileName); GWEN_XMLNode_free(root); return GWEN_ERROR_NO_DATA; } /* get element with id==typeName and wanted language */ node=GWEN_XMLNode_FindFirstTag(node, "type", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a type element", fileName); GWEN_XMLNode_free(root); return GWEN_ERROR_NO_DATA; } /* read all types from the file */ tl=Typemaker2_Type_List2_new(); while (node) { /* load type from XML element */ ty=Typemaker2_Type_new(); rv=Typemaker2_Type_readXml(ty, node, tym->lang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error reading type from file [%s] (%d)", fileName, rv); Typemaker2_Type_free(ty); GWEN_XMLNode_free(root); Typemaker2_Type_List2_free(tl); return rv; } /* preset some stuff */ if (1) { const char *x; x=Typemaker2_Type_GetExtends(ty); if (!x || !(*x)) Typemaker2_Type_SetExtends(ty, "struct_base"); } /* add first, because other types might want to refer to this one */ Typemaker2_Type_List_Add(ty, tym->typeList); Typemaker2_Type_List2_PushBack(tl, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) Typemaker2_TypeManager_MakeTypeList1(tym, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) Typemaker2_TypeManager_MakeTypeList2(tym, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_TREE) Typemaker2_TypeManager_MakeTypeTree(tym, ty); node=GWEN_XMLNode_FindNextTag(node, "type", NULL, NULL); } GWEN_XMLNode_free(root); //Typemaker2_TypeManager_Dump(tym, stderr, 2); /* set type pointers first */ it=Typemaker2_Type_List2_First(tl); if (it) { ty=Typemaker2_Type_List2Iterator_Data(it); while (ty) { /* set type pointers in this type structure */ rv=Typemaker2_TypeManager_SetTypePtrs(tym, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Type_List2Iterator_free(it); Typemaker2_Type_List2_free(tl); return rv; } /* handle next type */ ty=Typemaker2_Type_List2Iterator_Next(it); } Typemaker2_Type_List2Iterator_free(it); } /* now set member pointers */ it=Typemaker2_Type_List2_First(tl); if (it) { ty=Typemaker2_Type_List2Iterator_Data(it); while (ty) { /* set type pointers in the member structures */ rv=Typemaker2_TypeManager_SetMemberTypePtrs(tym, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Typemaker2_Type_List2Iterator_free(it); Typemaker2_Type_List2_free(tl); return rv; } /* add to provided list2 */ Typemaker2_Type_List2_PushBack(tlist2, ty); /* handle next type */ ty=Typemaker2_Type_List2Iterator_Next(it); } Typemaker2_Type_List2Iterator_free(it); } /* done, free list */ Typemaker2_Type_List2_free(tl); return 0; } int Typemaker2_TypeManager_LoadTypeFileNoLookup(TYPEMAKER2_TYPEMANAGER *tym, const char *fileName, TYPEMAKER2_TYPE_LIST2 *tlist2) { int rv; TYPEMAKER2_TYPE *ty=NULL; GWEN_XMLNODE *root; GWEN_XMLNODE *node; /* read XML file */ root=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "xml"); rv=GWEN_XML_ReadFile(root, fileName, TM_TYPEMANAGER_XMLFLAGS); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not load typefile [%s] (%d)", fileName, rv); GWEN_XMLNode_free(root); return rv; } /* get element */ node=GWEN_XMLNode_FindFirstTag(root, "tm2", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a tm2 element", fileName); GWEN_XMLNode_free(root); return GWEN_ERROR_NO_DATA; } /* get element with id==typeName and wanted language */ node=GWEN_XMLNode_FindFirstTag(node, "type", NULL, NULL); if (node==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "File [%s] does not contain a type element", fileName); GWEN_XMLNode_free(root); return GWEN_ERROR_NO_DATA; } /* read all types from the file */ while (node) { /* load type from XML element */ ty=Typemaker2_Type_new(); rv=Typemaker2_Type_readXml(ty, node, tym->lang); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error reading type from file [%s] (%d)", fileName, rv); Typemaker2_Type_free(ty); GWEN_XMLNode_free(root); return rv; } /* preset some stuff */ if (1) { const char *x; x=Typemaker2_Type_GetExtends(ty); if (!x || !(*x)) Typemaker2_Type_SetExtends(ty, "struct_base"); } /* add first, because other types might want to refer to this one */ Typemaker2_Type_List_Add(ty, tym->typeList); Typemaker2_Type_List2_PushBack(tlist2, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST1) Typemaker2_TypeManager_MakeTypeList1(tym, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_LIST2) Typemaker2_TypeManager_MakeTypeList2(tym, ty); if (Typemaker2_Type_GetFlags(ty) & TYPEMAKER2_TYPEFLAGS_WITH_TREE) Typemaker2_TypeManager_MakeTypeTree(tym, ty); node=GWEN_XMLNode_FindNextTag(node, "type", NULL, NULL); } GWEN_XMLNode_free(root); //Typemaker2_TypeManager_Dump(tym, stderr, 2); return 0; } int Typemaker2_TypeManager_SetTypePtrs(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty) { if (Typemaker2_Type_GetExtendsPtr(ty)==NULL) { const char *s; s=Typemaker2_Type_GetExtends(ty); if (s && *s) { TYPEMAKER2_TYPE *tt; tt=Typemaker2_TypeManager_GetType(tym, s); if (tt==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Type for \"extends\" not found [%s]", s); return GWEN_ERROR_NOT_FOUND; } Typemaker2_Type_SetExtendsPtr(ty, tt); } } if (Typemaker2_Type_GetBaseTypePtr(ty)==NULL) { const char *s; s=Typemaker2_Type_GetBaseType(ty); if (s && *s) { TYPEMAKER2_TYPE *tt; tt=Typemaker2_TypeManager_GetType(tym, s); if (tt==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Type for \"basetype\" not found [%s]", s); return GWEN_ERROR_NOT_FOUND; } Typemaker2_Type_SetBaseTypePtr(ty, tt); } } if (Typemaker2_Type_GetInheritsPtr(ty)==NULL) { const char *s; s=Typemaker2_Type_GetInherits(ty); if (s && *s) { TYPEMAKER2_TYPE *tt; tt=Typemaker2_TypeManager_GetType(tym, s); if (tt==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Type for \"inherits\" not found [%s]", s); return GWEN_ERROR_NOT_FOUND; } Typemaker2_Type_SetInheritsPtr(ty, tt); } } return 0; } int Typemaker2_TypeManager_SetMemberTypePtrs(TYPEMAKER2_TYPEMANAGER *tym, TYPEMAKER2_TYPE *ty) { TYPEMAKER2_MEMBER_LIST *ml; ml=Typemaker2_Type_GetMembers(ty); if (ml) { TYPEMAKER2_MEMBER *m; int pos=0; /* set pointers */ m=Typemaker2_Member_List_First(ml); while (m) { if (Typemaker2_Member_GetTypePtr(m)==NULL) { const char *s; /* set type pointer */ s=Typemaker2_Member_GetTypeName(m); if (s && *s) { TYPEMAKER2_TYPE *tt; tt=Typemaker2_TypeManager_GetType(tym, s); if (tt==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Type for \"type\" not found [%s]", s); return GWEN_ERROR_NOT_FOUND; } Typemaker2_Member_SetTypePtr(m, tt); } /* set enum pointer (if any) */ if ((Typemaker2_Member_GetFlags(m) & TYPEMAKER2_FLAGS_ENUM) && Typemaker2_Member_GetEnumPtr(m)==NULL) { s=Typemaker2_Member_GetEnumId(m); if (s && *s) { TYPEMAKER2_ENUM *te=Typemaker2_Type_FindEnum(ty, s); if (te) Typemaker2_Member_SetEnumPtr(m, te); else { DBG_ERROR(GWEN_LOGDOMAIN, "Enum [%s] not found", s); return GWEN_ERROR_NOT_FOUND; } } } } m=Typemaker2_Member_List_Next(m); } /* update member positions (needed for toObject/fromObject functions) */ m=Typemaker2_Member_List_First(ml); while (m) { if (!(Typemaker2_Member_GetFlags(m) & TYPEMAKER2_FLAGS_VOLATILE)) { const char *s; Typemaker2_Member_SetMemberPosition(m, pos++); /* create field id */ s=Typemaker2_Type_GetName(ty); if (s && *s) { GWEN_BUFFER *tbuf; char *p; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_FIELD_"); s=Typemaker2_Member_GetName(m); GWEN_Buffer_AppendString(tbuf, s); /* all in capitals */ p=GWEN_Buffer_GetStart(tbuf); while (*p) { *p=toupper(*p); p++; } Typemaker2_Member_SetFieldId(m, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } } m=Typemaker2_Member_List_Next(m); } Typemaker2_Type_SetNonVolatileMemberCount(ty, pos); if (pos) { const char *s; /* create field id */ s=Typemaker2_Type_GetName(ty); if (s && *s) { GWEN_BUFFER *tbuf; char *p; tbuf=GWEN_Buffer_new(0, 256, 0, 1); GWEN_Buffer_AppendString(tbuf, s); GWEN_Buffer_AppendString(tbuf, "_FIELD_COUNT"); /* all in capitals */ p=GWEN_Buffer_GetStart(tbuf); while (*p) { *p=toupper(*p); p++; } Typemaker2_Type_SetFieldCountId(ty, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); } } } return 0; } TYPEMAKER2_TYPE *Typemaker2_TypeManager_GetType(TYPEMAKER2_TYPEMANAGER *tym, const char *s) { TYPEMAKER2_TYPE *ty; ty=Typemaker2_TypeManager_FindType(tym, s); if (ty==NULL) { ty=Typemaker2_TypeManager_LoadType(tym, s); if (ty) { int rv; /* add first, because other types might want to refer to this one */ Typemaker2_Type_List_Add(ty, tym->typeList); /* set type pointers in this type structure */ rv=Typemaker2_TypeManager_SetTypePtrs(tym, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return NULL; } /* set type pointers in the member structures */ rv=Typemaker2_TypeManager_SetMemberTypePtrs(tym, ty); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return NULL; } } else { DBG_INFO(GWEN_LOGDOMAIN, "here"); } } if (ty==NULL) { DBG_INFO(GWEN_LOGDOMAIN, "Type [%s] not found", s); } return ty; } void Typemaker2_TypeManager_Dump(TYPEMAKER2_TYPEMANAGER *tym, FILE *f, int indent) { TYPEMAKER2_TYPE *ty; int i; for (i=0; itypeList); while (ty) { Typemaker2_Type_Dump(ty, f, indent+2); ty=Typemaker2_Type_List_Next(ty); } } gwenhywfar-5.12.1/tools/Makefile.am0000664000175000017500000000031114453561202014075 00000000000000DIST_SUBDIRS=xmlmerge typemaker typemaker2 gcttool gsa gwenbuild SUBDIRS=xmlmerge typemaker typemaker2 gcttool gsa @gwenbuild_tool@ sources: for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/tools/xmlmerge/0000755000175000017500000000000015032533714013745 500000000000000gwenhywfar-5.12.1/tools/xmlmerge/Makefile.am0000664000175000017500000000073514170115332015722 00000000000000AM_CPPFLAGS=@all_includes@ -I$(gwenhywfar_symlinkdir) bin_PROGRAMS=xmlmerge noinst_HEADERS=args.h xmlmerge_SOURCES=args.c main.c xmlmerge_LDADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) xmlmerge_LDFLAGS=@i18n_libs@ if IS_WINDOWS xmlmerge_LDFLAGS+=-mconsole xmlmerge_LDADD+=$(PROG_LIBRARIES) endif sources: for f in $(xmlmerge_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/tools/xmlmerge/Makefile.in0000644000175000017500000006460115032533615015741 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = xmlmerge$(EXEEXT) @IS_WINDOWS_TRUE@am__append_1 = -mconsole @IS_WINDOWS_TRUE@am__append_2 = $(PROG_LIBRARIES) subdir = tools/xmlmerge ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_xmlmerge_OBJECTS = args.$(OBJEXT) main.$(OBJEXT) xmlmerge_OBJECTS = $(am_xmlmerge_OBJECTS) am__DEPENDENCIES_1 = @IS_WINDOWS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) xmlmerge_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = xmlmerge_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(xmlmerge_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/args.Po ./$(DEPDIR)/main.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(xmlmerge_SOURCES) DIST_SOURCES = $(xmlmerge_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = @all_includes@ -I$(gwenhywfar_symlinkdir) noinst_HEADERS = args.h xmlmerge_SOURCES = args.c main.c xmlmerge_LDADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__append_2) xmlmerge_LDFLAGS = @i18n_libs@ $(am__append_1) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/xmlmerge/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/xmlmerge/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list xmlmerge$(EXEEXT): $(xmlmerge_OBJECTS) $(xmlmerge_DEPENDENCIES) $(EXTRA_xmlmerge_DEPENDENCIES) @rm -f xmlmerge$(EXEEXT) $(AM_V_CCLD)$(xmlmerge_LINK) $(xmlmerge_OBJECTS) $(xmlmerge_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/args.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/args.Po -rm -f ./$(DEPDIR)/main.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/args.Po -rm -f ./$(DEPDIR)/main.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile sources: for f in $(xmlmerge_SOURCES); do \ echo $(subdir)/$$f >>$(top_srcdir)/i18nsources; \ done for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/tools/xmlmerge/args.c0000644000175000017500000001065013606364303014770 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif /* Internationalization */ #ifdef ENABLE_NLS # include # include # define I18N(m) dgettext("gwenhywfar", m) # define I18S(m) m #else # define I18N(m) m # define I18S(m) m #endif #include "args.h" #include #include #include #include ARGUMENTS *Arguments_new() { ARGUMENTS *ar; ar=(ARGUMENTS *)malloc(sizeof(ARGUMENTS)); assert(ar); memset(ar, 0, sizeof(ARGUMENTS)); ar->verbous=0; ar->logLevel=GWEN_LoggerLevel_Notice; ar->logType=GWEN_LoggerType_Console; ar->compact=0; ar->header=0; return ar; } FREEPARAM *FreeParam_new(const char *s) { FREEPARAM *fr; fr=(FREEPARAM *)malloc(sizeof(FREEPARAM)); assert(fr); memset(fr, 0, sizeof(FREEPARAM)); fr->param=s; return fr; } void FreeParam_free(FREEPARAM *fr) { if (fr) free(fr); } void Arguments_AddParam(ARGUMENTS *ar, const char *pr) { FREEPARAM *curr; FREEPARAM *nfp; DBG_ENTER; assert(ar); assert(pr); nfp=FreeParam_new(pr); curr=ar->params; if (!curr) { ar->params=nfp; } else { /* find last */ while (curr->next) { curr=curr->next; } /* while */ curr->next=nfp; } DBG_LEAVE; } void Arguments_free(ARGUMENTS *ar) { if (ar) { FREEPARAM *fr; FREEPARAM *next; fr=ar->params; while (fr) { next=fr->next; FreeParam_free(fr); fr=next; } /* while */ free(ar); } } void usage(GWEN_UNUSED const char *prgname) { fprintf(stdout, "%s%s", k_PRG_VERSION_INFO "\n", I18N( "-v verbous\n" "--logfile ARG name of the logfile\n" "--logtype ARG log type\n" "--loglevel ARG log level\n" "-o ARG name of output file (stdout if omitted)\n" "--compact write a more compact file\n" ) ); } int checkArgs(ARGUMENTS *args, int argc, char **argv) { int i; i=1; while (i=argc) return RETURNVALUE_PARAM; args->logFile=argv[i]; } else if (strcmp(argv[i], "--logtype")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->logType=GWEN_Logger_Name2Logtype(argv[i]); if (args->logType==GWEN_LoggerType_Unknown) { fprintf(stderr, I18N("Unknown log type \"%s\"\n"), argv[i]); return RETURNVALUE_PARAM; } } else if (strcmp(argv[i], "--loglevel")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->logLevel=GWEN_Logger_Name2Level(argv[i]); if (args->logLevel==GWEN_LoggerLevel_Unknown) { fprintf(stderr, I18N("Unknown log level \"%s\"\n"), argv[i]); return RETURNVALUE_PARAM; } } else if (strcmp(argv[i], "-o")==0) { i++; if (i>=argc) return RETURNVALUE_PARAM; args->outputFile=argv[i]; } else if (strcmp(argv[i], "--compact")==0) { args->compact=1; } else if (strcmp(argv[i], "--header")==0) { args->header=1; } else if (strcmp(argv[i], "-h")==0 || strcmp(argv[i], "--help")==0) { usage(argv[0]); return -2; } else if (strcmp(argv[i], "-V")==0 || strcmp(argv[i], "--version")==0) { fprintf(stdout, k_PRG_VERSION_INFO); return -2; } else if (strcmp(argv[i], "-v")==0) { args->verbous=1; } else { /* otherwise add param */ if (argv[i][0]=='-') { fprintf(stderr, I18N("Unknown option \"%s\"\n"), argv[i]); return RETURNVALUE_PARAM; } else Arguments_AddParam(args, argv[i]); } i++; } /* while */ if (args->outputFile==NULL) { fprintf(stderr, "%s\n", I18N("Please specify the name of the output file.")); return RETURNVALUE_PARAM; } /* that's it */ return 0; } gwenhywfar-5.12.1/tools/xmlmerge/args.h0000644000175000017500000000314013142134465014770 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef XMLMERGE_ARGS_H #define XMLMERGE_ARGS_H #include #define k_PRG "xmlmerge" #define k_PRG_VERSION_INFO \ "xmlmerge v0.1\n"\ "(c) 2004 Martin Preuss\n"\ "This program is free software licensed under GPL.\n"\ "See COPYING for details.\n" #define RETURNVALUE_PARAM 1 #define RETURNVALUE_SETUP 2 #define RETURNVALUE_NOSTART 3 #define RETURNVALUE_DEINIT 4 #define RETURNVALUE_HANGUP 9 typedef struct _S_PARAM FREEPARAM; typedef struct _S_ARGS ARGUMENTS; struct _S_PARAM { FREEPARAM *next; const char *param; }; struct _S_ARGS { FREEPARAM *params; int verbous; /* -v */ char *logFile; /* --logfile ARG */ GWEN_LOGGER_LOGTYPE logType; /* --logtype ARG */ GWEN_LOGGER_LEVEL logLevel; /* --loglevel ARG */ const char *outputFile; /* -o ARG */ int compact; /* --compact */ int header; /* --header */ }; ARGUMENTS *Arguments_new(); void Arguments_free(ARGUMENTS *ar); int checkArgs(ARGUMENTS *args, int argc, char **argv); #endif /* XMLMERGE_ARGS_H */ gwenhywfar-5.12.1/tools/xmlmerge/main.c0000644000175000017500000001324213142134477014762 00000000000000/*************************************************************************** $RCSfile$ ------------------- cvs : $Id$ begin : Mon Mar 01 2004 copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif /* Internationalization */ #ifdef ENABLE_NLS # include # include # define I18N(m) dgettext("gwenhywfar", m) # define I18S(m) m #else # define I18N(m) m # define I18S(m) m #endif #include "args.h" #include #include #include #include #include #include #include #include #include #include #include #include int addDefinitions(GWEN_XMLNODE *top, GWEN_XMLNODE *node) { GWEN_XMLNODE *nsrc, *ndst; assert(top); assert(node); nsrc=GWEN_XMLNode_GetChild(node); while (nsrc) { if (GWEN_XMLNode_GetType(nsrc)==GWEN_XMLNodeTypeTag) { ndst=GWEN_XMLNode_FindNode(top, GWEN_XMLNodeTypeTag, GWEN_XMLNode_GetData(nsrc)); if (ndst) { GWEN_XMLNODE *n; n=GWEN_XMLNode_GetChild(nsrc); while (n) { GWEN_XMLNODE *newNode; DBG_DEBUG(0, "Adding node \"%s\"", GWEN_XMLNode_GetData(n)); newNode=GWEN_XMLNode_dup(n); GWEN_XMLNode_AddChild(ndst, newNode); n=GWEN_XMLNode_Next(n); } /* while n */ } else { GWEN_XMLNODE *newNode; DBG_DEBUG(0, "Adding branch \"%s\"", GWEN_XMLNode_GetData(nsrc)); newNode=GWEN_XMLNode_dup(nsrc); GWEN_XMLNode_AddChild(top, newNode); } } /* if TAG */ nsrc=GWEN_XMLNode_Next(nsrc); } /* while */ return 0; } int main(int argc, char **argv) { ARGUMENTS *args; int rv; FREEPARAM *inFile; GWEN_XMLNODE *top; GWEN_XMLNODE *comment; GWEN_SYNCIO *sio; GWEN_XML_CONTEXT *ctx; uint32_t flags; rv=GWEN_Init(); if (rv) { fprintf(stderr, "Could not initialize Gwenhywfar.\n"); return 2; } args=Arguments_new(); rv=checkArgs(args, argc, argv); if (rv==-1) { fprintf(stderr, "Parameter error\n"); return rv; } else if (rv==-2) { return 0; } GWEN_Logger_Open(0, "xmlmerge", args->logFile, args->logType, GWEN_LoggerFacility_User); GWEN_Logger_SetLevel(0, args->logLevel); inFile=args->params; if (!inFile) { fprintf(stderr, "No input file given.\n"); Arguments_free(args); return 1; } top=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root"); /* add comment */ comment=GWEN_XMLNode_new(GWEN_XMLNodeTypeComment, "This is an automatically generated file, " "do not edit"); GWEN_XMLNode_AddChild(top, comment); /* add header */ if (args->header) { GWEN_XMLNODE *header; header=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "?xml"); GWEN_XMLNode_SetProperty(header, "version", "1.0"); GWEN_XMLNode_SetProperty(header, "encoding", "utf8"); GWEN_XMLNode_AddHeader(top, header); } /* read all files */ while (inFile) { GWEN_XMLNODE *n; n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "inFile"); if (GWEN_XML_ReadFile(n, inFile->param, GWEN_XML_FLAGS_DEFAULT | GWEN_XML_FLAGS_HANDLE_HEADERS)) { fprintf(stderr, "ERROR: Error reading file \"%s\"\n", inFile->param); GWEN_XMLNode_free(n); GWEN_XMLNode_free(top); return 2; } if (addDefinitions(top, n)) { fprintf(stderr, "ERROR: Error merging file \"%s\"\n", inFile->param); GWEN_XMLNode_free(n); GWEN_XMLNode_free(top); return 3; } GWEN_XMLNode_free(n); inFile=inFile->next; } /* while */ /* write file */ if (args->compact) { flags=GWEN_XML_FLAGS_SIMPLE; } else { flags=GWEN_XML_FLAGS_INDENT; } flags|=GWEN_XML_FLAGS_HANDLE_HEADERS; ctx=GWEN_XmlCtxStore_new(NULL, flags); sio=GWEN_SyncIo_File_new(args->outputFile, GWEN_SyncIo_File_CreationMode_CreateAlways); GWEN_SyncIo_AddFlags(sio, GWEN_SYNCIO_FILE_FLAGS_READ | GWEN_SYNCIO_FILE_FLAGS_WRITE | GWEN_SYNCIO_FILE_FLAGS_UREAD | GWEN_SYNCIO_FILE_FLAGS_UWRITE | GWEN_SYNCIO_FILE_FLAGS_GREAD | GWEN_SYNCIO_FILE_FLAGS_GWRITE); rv=GWEN_SyncIo_Connect(sio); if (rv<0) { fprintf(stderr, "Error opening file \"%s\": %s\n", args->outputFile, strerror(errno)); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return 5; } rv=GWEN_XMLNode_WriteToStream(top, ctx, sio); if (rv<0) { fprintf(stderr, "Error writing to file \"%s\": %s\n", args->outputFile, strerror(errno)); GWEN_SyncIo_Disconnect(sio); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return 5; } /* close file */ rv=GWEN_SyncIo_Disconnect(sio); if (rv<0) { fprintf(stderr, "Error closing output stream (%d)\n", rv); DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); return 5; } GWEN_SyncIo_free(sio); GWEN_XmlCtx_free(ctx); GWEN_XMLNode_free(top); Arguments_free(args); return 0; } gwenhywfar-5.12.1/tools/Makefile.in0000644000175000017500000006062715032533614014124 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ DIST_SUBDIRS = xmlmerge typemaker typemaker2 gcttool gsa gwenbuild SUBDIRS = xmlmerge typemaker typemaker2 gcttool gsa @gwenbuild_tool@ all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile sources: for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/0000755000175000017500000000000015032533716011553 500000000000000gwenhywfar-5.12.1/gui/qt4/0000755000175000017500000000000015032533716012263 500000000000000gwenhywfar-5.12.1/gui/qt4/w_listbox.cpp0000666000175000017500000002000413560102056014712 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_ListBox: public Qt4_W_Widget { public: Qt4_W_ListBox(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_ListBox() { } virtual int setup() { QTreeWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QTreeWidget(); qw->setAllColumnsShowFocus(true); qw->setSortingEnabled(true); qw->setRootIsDecorated(false); qw->setItemsExpandable(false); qw->setSelectionBehavior(QAbstractItemView::SelectRows); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QTreeWidget *qw; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; case GWEN_DialogProperty_Value: { QTreeWidgetItem *item; item=qw->topLevelItem(index); if (item==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Value %d out of range", value); return GWEN_ERROR_INVALID; } qw->setCurrentItem(item); return 0; } case GWEN_DialogProperty_ColumnWidth: qw->setColumnWidth(index, value); return 0; case GWEN_DialogProperty_SelectionMode: switch(value) { case GWEN_Dialog_SelectionMode_None: qw->setSelectionMode(QAbstractItemView::NoSelection); return 0; case GWEN_Dialog_SelectionMode_Single: qw->setSelectionMode(QAbstractItemView::SingleSelection); return 0; case GWEN_Dialog_SelectionMode_Multi: qw->setSelectionMode(QAbstractItemView::ExtendedSelection); return 0; ; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", value); return GWEN_ERROR_INVALID; case GWEN_DialogProperty_SortDirection: switch(value) { case GWEN_DialogSortDirection_None: qw->sortByColumn(-1, Qt::AscendingOrder); break; case GWEN_DialogSortDirection_Up: qw->sortByColumn(index, Qt::AscendingOrder); break; case GWEN_DialogSortDirection_Down: qw->sortByColumn(index, Qt::DescendingOrder); break; } return 0; case GWEN_DialogProperty_Sort: { int c; c=qw->sortColumn(); if (c!=-1) { QHeaderView *h; h=qw->header(); qw->sortItems(c, h->sortIndicatorOrder()); } return 0; } default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QTreeWidget *qw; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: { QTreeWidgetItem *item; int i=-1; item=qw->currentItem(); while(item) { item=qw->itemAbove(item); i++; } return i; } case GWEN_DialogProperty_ColumnWidth: return qw->columnWidth(index); case GWEN_DialogProperty_SelectionMode: switch(qw->selectionMode()) { case QAbstractItemView::NoSelection: return GWEN_Dialog_SelectionMode_None; case QAbstractItemView::SingleSelection: return GWEN_Dialog_SelectionMode_Single; case QAbstractItemView::ExtendedSelection: return GWEN_Dialog_SelectionMode_Multi; default: break; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", qw->selectionMode()); return GWEN_ERROR_INVALID; case GWEN_DialogProperty_SortDirection: if (qw->sortColumn()!=index) return GWEN_DialogSortDirection_None; else { switch(qw->header()->sortIndicatorOrder()) { case Qt::AscendingOrder: return GWEN_DialogSortDirection_Up; case Qt::DescendingOrder: return GWEN_DialogSortDirection_Down; default: return GWEN_DialogSortDirection_None; } } break; default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QTreeWidget *qw; QString text; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QT4_Gui::extractHtml(value); switch(prop) { case GWEN_DialogProperty_Title: { QString str; QString t; QStringList sl; int n=0; /* remove all columns */ qw->header()->reset(); str=text; while(!(t=str.section('\t', n, n)).isEmpty()) { sl+=t; n++; } qw->setHeaderLabels(sl); return 0; } case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; case GWEN_DialogProperty_AddValue: { QString t; int n=0; QStringList sl; QString str=text; while(!(t=str.section('\t', n, n)).isEmpty()) { sl+=t; n++; } (void)new QTreeWidgetItem(qw, sl); return 0; } default: return Qt4_W_Widget::setCharProperty(prop, index, value, doSignal); } }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QTreeWidget *qw; QString str; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: { QTreeWidgetItem *item; item=qw->headerItem(); if (item) { int i; for (i=0; icolumnCount(); i++) { if (i) str+='\t'; str+=item->text(i); } if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } } return defaultValue; } case GWEN_DialogProperty_Value: { QTreeWidgetItem *item; int i; item=qw->topLevelItem(index); if (item==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Value %d out of range", index); return defaultValue; } for (i=0; icolumnCount(); i++) { if (i) str+='\t'; str+=item->text(i); } if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_VALUE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_VALUE); } } default: return Qt4_W_Widget::getCharProperty(prop, index, defaultValue); } }; }; gwenhywfar-5.12.1/gui/qt4/w_spinbox.cpp0000644000175000017500000000526513142134462014722 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_SpinBox: public Qt4_W_Widget { public: Qt4_W_SpinBox(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_SpinBox() { } virtual int setup() { QSpinBox *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QSpinBox(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(valueChanged(int)), qtDialog->getMainWindow(), SLOT(slotValueChanged())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QSpinBox *qw; qw=(QSpinBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setValue(value); return 0; case GWEN_DialogProperty_MinValue: qw->setMinimum(value); return 0; case GWEN_DialogProperty_MaxValue: qw->setMaximum(value); return 0; default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QSpinBox *qw; qw=(QSpinBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->value(); case GWEN_DialogProperty_MinValue: return qw->minimum(); case GWEN_DialogProperty_MaxValue: return qw->maximum(); default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; }; gwenhywfar-5.12.1/gui/qt4/w_tabbook.cpp0000644000175000017500000000367713142134462014666 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_TabBook: public Qt4_W_Widget { public: Qt4_W_TabBook(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_TabBook() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QTabWidget(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_CONTENT, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QTabWidget *qw; QWidget *qChild; const char *s; QString text; qw=(QTabWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (GWEN_Widget_GetType(wChild)!=GWEN_Widget_TypeTabPage) { DBG_ERROR(GWEN_LOGDOMAIN, "You can only add TabPages to a TabBook"); return GWEN_ERROR_INVALID; } qChild=getQWidget(wChild); assert(qChild); s=GWEN_Widget_GetText(wChild, 0); if (s) text=QString::fromUtf8(s); qw->addTab(qChild, text); return 0; } }; gwenhywfar-5.12.1/gui/qt4/qt4_gui.hpp0000664000175000017500000000363214460564441014301 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef QT4_GUI_H #define QT4_GUI_H #if (defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || defined _MSC_VER # ifdef BUILDING_QT4_GUI # define QT4GUI_API __attribute__ ((visibility("default"))) # else # define QT4GUI_API # endif #else # define QT4GUI_API #endif class QT4_Gui; class QWidget; #include #include #include /** * This is an implementation of GWEN_GUI for QT4. * * It implements the GWEN_DIALOG framework. * * @todo: @ref GWEN_Gui_Print() needs to be implemented */ class QT4GUI_API QT4_Gui: public CppGui { private: QWidget *_parentWidget; std::list _pushedParents; public: QT4_Gui(); virtual ~QT4_Gui(); QWidget *getParentWidget() const { return _parentWidget;}; void pushParentWidget(QWidget *w); void popParentWidget(); static QString extractHtml(const char *text); protected: /** @name User Interaction * */ /*@{*/ virtual int execDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int openDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int closeDialog(GWEN_DIALOG *dlg); virtual int runDialog(GWEN_DIALOG *dlg, int untilEnd); virtual int getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); }; #endif gwenhywfar-5.12.1/gui/qt4/w_hlayout.cpp0000644000175000017500000000355113142134462014721 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_HLayout: public Qt4_W_Widget { public: Qt4_W_HLayout(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_HLayout() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); qLayout=new QHBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; } }; gwenhywfar-5.12.1/gui/qt4/w_widgetstack.cpp0000644000175000017500000000475513142134462015554 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_WidgetStack: public Qt4_W_Widget { public: Qt4_W_WidgetStack(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_WidgetStack() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QStackedWidget(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QStackedWidget *qw; qw=(QStackedWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setCurrentIndex(value); return 0; default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QStackedWidget *qw; qw=(QStackedWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->currentIndex(); default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; int addChildGuiWidget(GWEN_WIDGET *wChild) { QStackedWidget *qw; QWidget *qChild; qw=(QStackedWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qChild=getQWidget(wChild); assert(qChild); qw->addWidget(qChild); return 0; }; }; gwenhywfar-5.12.1/gui/qt4/w_checkbox.cpp0000644000175000017500000001002113142134462015010 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_CheckBox: public Qt4_W_Widget { public: Qt4_W_CheckBox(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_CheckBox() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QCheckBox(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(toggled(bool)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QCheckBox *qw; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setChecked((value==0)?false:true); return 0; default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QCheckBox *qw; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return (qw->isChecked())?1:0; default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QCheckBox *qw; QString text; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QCheckBox *qw; QString str; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/w_radiobutton.cpp0000644000175000017500000001007213142134462015562 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_RadioButton: public Qt4_W_Widget { public: Qt4_W_RadioButton(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_RadioButton() { } virtual int setup() { QRadioButton *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QRadioButton(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(toggled(bool)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QRadioButton *qw; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setChecked((value==0)?false:true); return 0; default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QRadioButton *qw; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return (qw->isChecked())?1:0; default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QRadioButton *qw; QString text; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QRadioButton *qw; QString str; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/w_vline.cpp0000644000175000017500000000274113142134462014351 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_VLine: public Qt4_W_Widget { public: Qt4_W_VLine(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_VLine() { } virtual int setup() { QFrame *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QFrame(); qw->setFrameShape(QFrame::VLine); qw->setFrameShadow(QFrame::Sunken); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } }; gwenhywfar-5.12.1/gui/qt4/w_combobox.cpp0000644000175000017500000001040213142134462015035 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_ComboBox: public Qt4_W_Widget { public: Qt4_W_ComboBox(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_ComboBox() { } virtual int setup() { QComboBox *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QComboBox(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); qw->setEditable((flags & GWEN_WIDGET_FLAGS_READONLY)?false:true); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(activated(int)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QComboBox *qw; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setCurrentIndex(value); return 0; case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QComboBox *qw; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->currentIndex(); case GWEN_DialogProperty_ValueCount: return qw->count(); default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QComboBox *qw; QString text; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Value: // undefined break; case GWEN_DialogProperty_AddValue: qw->addItem(text); return 0; case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QComboBox *qw; QString str; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: str=qw->itemText(index); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/qt4_gui.cpp0000644000175000017500000001214413142134462014260 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "qt4_gui.hpp" #include "qt4_gui_dialog.hpp" #include #include #include #include #include QT4_Gui::QT4_Gui() :CppGui() ,_parentWidget(NULL) { GWEN_Gui_AddFlags(_gui, GWEN_GUI_FLAGS_DIALOGSUPPORTED); GWEN_Gui_UseDialogs(_gui); GWEN_Gui_SetName(_gui, "qt4-gui"); } QT4_Gui::~QT4_Gui() { } void QT4_Gui::pushParentWidget(QWidget *w) { if (_parentWidget) _pushedParents.push_back(_parentWidget); _parentWidget=w; } void QT4_Gui::popParentWidget() { if (!_pushedParents.empty()) { _parentWidget=_pushedParents.back(); _pushedParents.pop_back(); } else _parentWidget=NULL; } QString QT4_Gui::extractHtml(const char *text) { const char *p=0; const char *p2=0; if (text==NULL) return QString(""); /* find begin of HTML area */ p=text; while ((p=strchr(p, '<'))) { const char *t; t=p; t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } p++; } /* while */ /* find end of HTML area */ if (p) { p+=6; /* skip "" */ p2=p; while ((p2=strchr(p2, '<'))) { const char *t; t=p2; t++; if (toupper(*t)=='/') { t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } } p2++; } /* while */ } if (p && p2) return QLatin1String("")+QString::fromUtf8(p, p2-p)+QLatin1String(""); return QString::fromUtf8(text); } int QT4_Gui::execDialog(GWEN_DIALOG *dlg, uint32_t guiid) { QT4_GuiDialog qt4Dlg(this, dlg); QWidget *owner=qApp->activeWindow(); /* setup widget tree for the dialog */ if (!(qt4Dlg.setup(owner))) { return GWEN_ERROR_GENERIC; } return qt4Dlg.execute(); } int QT4_Gui::openDialog(GWEN_DIALOG *dlg, uint32_t guiid) { QT4_GuiDialog *qt4Dlg; QWidget *owner=qApp->activeWindow(); qt4Dlg=new QT4_GuiDialog(this, dlg); /* setup widget tree for the dialog */ if (!(qt4Dlg->setup(owner))) { delete qt4Dlg; return GWEN_ERROR_GENERIC; } return qt4Dlg->openDialog(); } int QT4_Gui::closeDialog(GWEN_DIALOG *dlg) { QT4_GuiDialog *qt4Dlg; int rv; qt4Dlg=QT4_GuiDialog::getDialog(dlg); assert(qt4Dlg); rv=qt4Dlg->closeDialog(); delete qt4Dlg; return rv; } int QT4_Gui::runDialog(GWEN_DIALOG *dlg, int untilEnd) { QT4_GuiDialog *qt4Dlg; qt4Dlg=QT4_GuiDialog::getDialog(dlg); assert(qt4Dlg); return qt4Dlg->runDialog((untilEnd==0)?false:true); } int QT4_Gui::getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid) { QString sCaption; QString sPatterns; QString sPath; QString str; QWidget *owner=qApp->activeWindow(); if (caption) sCaption=QString::fromUtf8(caption); if (patterns) { const char *s1; const char *s2; s1=patterns; while(s1 && *s1) { s2=strchr(s1, '\t'); if (s2) { str=QString::fromUtf8(s1, s2-s1); str.replace(',', ' '); str.replace(';', ' '); /* skip tab */ s2++; } else { str=QString::fromUtf8(s1); str.replace(',', ' '); str.replace(';', ' '); s2=NULL; } if (!str.isEmpty()) sPatterns+=";;"; sPatterns+=str; s1=s2; } } if (GWEN_Buffer_GetUsedBytes(pathBuffer)) sPath=QString::fromUtf8(GWEN_Buffer_GetStart(pathBuffer)); switch(fnt) { case GWEN_Gui_FileNameType_OpenFileName: str=QFileDialog::getOpenFileName(owner, sCaption, sPath, sPatterns); break; case GWEN_Gui_FileNameType_SaveFileName: str=QFileDialog::getSaveFileName(owner, sCaption, sPath, sPatterns); break; case GWEN_Gui_FileNameType_OpenDirectory: str=QFileDialog::getExistingDirectory(owner, sCaption, sPath); break; } if (str.isEmpty()) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty filename returned."); return GWEN_ERROR_ABORTED; } else { GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, str.toUtf8()); return 0; } } gwenhywfar-5.12.1/gui/qt4/w_pushbutton.cpp0000644000175000017500000000622713142134462015452 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_PushButton: public Qt4_W_Widget { public: Qt4_W_PushButton(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_PushButton() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QPushButton(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(clicked(bool)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QPushButton *qw; QString text; qw=(QPushButton*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QPushButton *qw; QString str; qw=(QPushButton*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/w_scrollarea.cpp0000644000175000017500000000406613142134462015365 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_ScrollArea: public Qt4_W_Widget { public: Qt4_W_ScrollArea(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_ScrollArea() { } virtual int setup() { QScrollArea *qw; QWidget *qChild; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QLayout *qLayout; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QScrollArea(); qChild=new QWidget(); qChild->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); qw->setWidget(qChild); qLayout=new QVBoxLayout(qChild); qw->setWidgetResizable(true); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; }; }; gwenhywfar-5.12.1/gui/qt4/qt4_gui_dialog.hpp0000644000175000017500000000423613142134462015607 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef QT4_DIALOG_HPP #define QT4_DIALOG_HPP #include #include "qt4_gui.hpp" #include #include #include #include #include class QT4_DialogBox; #define QT4_DIALOG_WIDGET_REAL 0 #define QT4_DIALOG_WIDGET_CONTENT 1 #define QT4_DIALOG_WIDGET_LAYOUT 2 class QT4_GuiDialog: public CppDialog { public: QT4_GuiDialog(QT4_Gui *gui, GWEN_DIALOG *dlg); virtual ~QT4_GuiDialog(); static QT4_GuiDialog *getDialog(GWEN_DIALOG *dlg); bool setup(QWidget *parentWindow); int execute(); int openDialog(); int closeDialog(); int runDialog(bool untilEnd); QT4_DialogBox *getMainWindow() { return _mainWidget;}; protected: QT4_Gui *_gui; int _widgetCount; QT4_DialogBox *_mainWidget; int setupTree(GWEN_WIDGET *w); virtual int setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); virtual int getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); virtual int setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); virtual const char *getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); }; #endif /* FG_DIALOG_L_HPP */ gwenhywfar-5.12.1/gui/qt4/w_groupbox.cpp0000644000175000017500000000375213142134462015104 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_GroupBox: public Qt4_W_Widget { public: Qt4_W_GroupBox(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_GroupBox() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QGroupBox(text); qLayout=new QVBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; } }; gwenhywfar-5.12.1/gui/qt4/Makefile.in0000644000175000017500000010423015032533614014245 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = libtest$(EXEEXT) subdir = gui/qt4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gwengui-qt4.pc gwengui-qt4-config.cmake \ gwengui-qt4-config-version.cmake CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakeconfigdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgwengui_qt4_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../cpp/libgwengui-cpp.la am_libgwengui_qt4_la_OBJECTS = qt4dialogbox.lo qt4_gui.lo \ qt4_gui_dialog.lo nodist_libgwengui_qt4_la_OBJECTS = libgwengui_qt4_la_OBJECTS = $(am_libgwengui_qt4_la_OBJECTS) \ $(nodist_libgwengui_qt4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgwengui_qt4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libgwengui_qt4_la_LDFLAGS) \ $(LDFLAGS) -o $@ am_libtest_OBJECTS = libtest.$(OBJEXT) libtest_OBJECTS = $(am_libtest_OBJECTS) libtest_DEPENDENCIES = libgwengui-qt4.la \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_1) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libtest.Po ./$(DEPDIR)/qt4_gui.Plo \ ./$(DEPDIR)/qt4_gui_dialog.Plo ./$(DEPDIR)/qt4dialogbox.Plo am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgwengui_qt4_la_SOURCES) \ $(nodist_libgwengui_qt4_la_SOURCES) $(libtest_SOURCES) DIST_SOURCES = $(libgwengui_qt4_la_SOURCES) $(libtest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(cmakeconfig_DATA) $(pkgconfig_DATA) HEADERS = $(iheader_HEADERS) $(nodist_noinst_HEADERS) \ $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/gwengui-qt4-config-version.cmake.in \ $(srcdir)/gwengui-qt4-config.cmake.in \ $(srcdir)/gwengui-qt4.pc.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DBUILDING_QT4_GUI DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) $(qt4_includes) \ @visibility_cflags@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-qt4.pc cmakeconfigdir = $(libdir)/cmake/gwengui-qt4-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwengui-qt4-config.cmake gwengui-qt4-config-version.cmake lib_LTLIBRARIES = libgwengui-qt4.la noinst_HEADERS = \ qt4dialogbox.hpp \ qt4_gui_dialog.hpp \ qt4_gui_dialog.hpp libgwengui_qt4_la_LIBADD = $(qt4_libs) $(top_builddir)/src/$(gwenhywfar_internal_libname) $(builddir)/../cpp/libgwengui-cpp.la libgwengui_qt4_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_qt4_la_SOURCES = \ qt4dialogbox.cpp \ qt4_gui.cpp \ qt4_gui_dialog.cpp nodist_libgwengui_qt4_la_SOURCES = nodist_noinst_HEADERS = iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-qt4 iheader_HEADERS = \ qt4_gui.hpp MOC_FILES = \ qt4dialogbox.moc UI_FILES = EXTRA_DIST = $(UI_FILES) \ w_widget.cpp \ w_dialog.cpp \ w_vlayout.cpp \ w_hlayout.cpp \ w_gridlayout.cpp \ w_label.cpp \ w_lineedit.cpp \ w_pushbutton.cpp \ w_hline.cpp \ w_vline.cpp \ w_textedit.cpp \ w_combobox.cpp \ w_tabbook.cpp \ w_checkbox.cpp \ w_groupbox.cpp \ w_widgetstack.cpp \ w_textbrowser.cpp \ w_scrollarea.cpp \ w_progressbar.cpp \ w_listbox.cpp \ w_radiobutton.cpp \ w_spinbox.cpp libtest_SOURCES = libtest.cpp libtest_LDADD = libgwengui-qt4.la $(top_builddir)/src/$(gwenhywfar_internal_libname) $(qt4_libs) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la SUFFIXES = .ui .ui.hpp .ui.cpp .moc BUILT_SOURCES = $(MOC_FILES) $(nodist_libgwengui_qt4_la_SOURCES) CLEANFILES = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .ui .ui.hpp .ui.cpp .moc .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/qt4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/qt4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gwengui-qt4.pc: $(top_builddir)/config.status $(srcdir)/gwengui-qt4.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt4-config.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-qt4-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt4-config-version.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-qt4-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-qt4.la: $(libgwengui_qt4_la_OBJECTS) $(libgwengui_qt4_la_DEPENDENCIES) $(EXTRA_libgwengui_qt4_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgwengui_qt4_la_LINK) -rpath $(libdir) $(libgwengui_qt4_la_OBJECTS) $(libgwengui_qt4_la_LIBADD) $(LIBS) libtest$(EXEEXT): $(libtest_OBJECTS) $(libtest_DEPENDENCIES) $(EXTRA_libtest_DEPENDENCIES) @rm -f libtest$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libtest_OBJECTS) $(libtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt4_gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt4_gui_dialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt4dialogbox.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-cmakeconfigDATA: $(cmakeconfig_DATA) @$(NORMAL_INSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cmakeconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cmakeconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakeconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakeconfigdir)" || exit $$?; \ done uninstall-cmakeconfigDATA: @$(NORMAL_UNINSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(cmakeconfigdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakeconfigdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libtest.Po -rm -f ./$(DEPDIR)/qt4_gui.Plo -rm -f ./$(DEPDIR)/qt4_gui_dialog.Plo -rm -f ./$(DEPDIR)/qt4dialogbox.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-cmakeconfigDATA install-iheaderHEADERS \ install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libtest.Po -rm -f ./$(DEPDIR)/qt4_gui.Plo -rm -f ./$(DEPDIR)/qt4_gui_dialog.Plo -rm -f ./$(DEPDIR)/qt4dialogbox.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-cmakeconfigDATA uninstall-iheaderHEADERS \ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-cmakeconfigDATA install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-iheaderHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-cmakeconfigDATA \ uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .PRECIOUS: Makefile %.moc: %.hpp $(qt4_moc) -o $@ $< %.ui.hpp: %.ui $(qt4_uic) $< -o $@ sources: for f in $(libgwengui_qt4_la_SOURCES) $(foreach uifile,$(UI_FILES),$(uifile).cpp); do \ echo $(subdir)/$$f >>$(top_srcdir)/qtsources; \ done for d in $(SUBDIRS); do \ $(MAKE) -C $$d sources; \ done built_sources: $(BUILT_SOURCES) for d in $(SUBDIRS); do \ $(MAKE) -C $$d built_sources; \ done ; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/qt4/w_lineedit.cpp0000644000175000017500000000665013142134462015034 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_LineEdit: public Qt4_W_Widget { public: Qt4_W_LineEdit(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_LineEdit() { } virtual int setup() { QLineEdit *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QLineEdit(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); if (flags & GWEN_WIDGET_FLAGS_PASSWORD) qw->setEchoMode(QLineEdit::Password); else qw->setEchoMode(QLineEdit::Normal); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(returnPressed()), qtDialog->getMainWindow(), SLOT(slotActivated())); qw->connect(qw, SIGNAL(textChanged(const QString&)), qtDialog->getMainWindow(), SLOT(slotValueChanged())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QLineEdit *qw; QString text; qw=(QLineEdit*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Value: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QLineEdit *qw; QString str; qw=(QLineEdit*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/w_gridlayout.cpp0000644000175000017500000000453213142134462015417 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_GridLayout: public Qt4_W_Widget { public: Qt4_W_GridLayout(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_GridLayout() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); qLayout=new QGridLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QGridLayout *qLayout; QWidget *qChild; GWEN_WIDGET *wt; int idx=0; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QGridLayout*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); /* get position of the child widget below myself */ wt=GWEN_Widget_Tree_GetFirstChild(_widget); while(wt && wt!=wChild) { idx++; wt=GWEN_Widget_Tree_GetNext(wt); } if (wt) { int x=0, y=0; int c; if ((c=GWEN_Widget_GetColumns(_widget))) { x=idx % c; y=idx / c; } else if ((c=GWEN_Widget_GetRows(_widget))) { x=idx / c; y=idx % c ; } qLayout->addWidget(qChild, y, x); } return 0; } }; gwenhywfar-5.12.1/gui/qt4/w_vlayout.cpp0000644000175000017500000000355213142134462014740 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_VLayout: public Qt4_W_Widget { public: Qt4_W_VLayout(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_VLayout() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); qLayout=new QVBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; }; }; gwenhywfar-5.12.1/gui/qt4/w_hline.cpp0000644000175000017500000000274113142134462014333 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_HLine: public Qt4_W_Widget { public: Qt4_W_HLine(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_HLine() { } virtual int setup() { QFrame *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QFrame(); qw->setFrameShape(QFrame::HLine); qw->setFrameShadow(QFrame::Sunken); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } }; gwenhywfar-5.12.1/gui/qt4/qt4_gui_dialog.cpp0000644000175000017500000002106713142134462015603 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include "qt4_gui_dialog.hpp" #include "qt4dialogbox.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define QT4_DIALOG_WIDGET_REAL 0 #define QT4_DIALOG_WIDGET_CONTENT 1 #define QT4_DIALOG_WIDGET_LAYOUT 2 #define QT4_DIALOG_STRING_TITLE 0 #define QT4_DIALOG_STRING_VALUE 1 #include "w_widget.cpp" #include "w_dialog.cpp" #include "w_vlayout.cpp" #include "w_hlayout.cpp" #include "w_gridlayout.cpp" #include "w_label.cpp" #include "w_lineedit.cpp" #include "w_pushbutton.cpp" #include "w_hline.cpp" #include "w_vline.cpp" #include "w_textedit.cpp" #include "w_combobox.cpp" #include "w_tabbook.cpp" #include "w_checkbox.cpp" #include "w_groupbox.cpp" #include "w_widgetstack.cpp" #include "w_textbrowser.cpp" #include "w_scrollarea.cpp" #include "w_progressbar.cpp" #include "w_listbox.cpp" #include "w_radiobutton.cpp" #include "w_spinbox.cpp" QT4_GuiDialog::QT4_GuiDialog(QT4_Gui *gui, GWEN_DIALOG *dlg) :CppDialog(dlg) ,_gui(gui) ,_mainWidget(NULL) { } QT4_GuiDialog::~QT4_GuiDialog() { if (_mainWidget) _mainWidget->unlinkFromDialog(); } QT4_GuiDialog *QT4_GuiDialog::getDialog(GWEN_DIALOG *dlg) { CppDialog *cppDlg; cppDlg=CppDialog::getDialog(dlg); if (cppDlg) return dynamic_cast(cppDlg); return NULL; } int QT4_GuiDialog::execute() { QT4_DialogBox *dialogBox; int rv; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } /* execute dialog */ rv=dialogBox->exec(); GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); if (rv==QT4_DialogBox::Accepted) { /* accepted */ return 1; } else return 0; } int QT4_GuiDialog::openDialog() { QT4_DialogBox *dialogBox; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } /* show dialog */ dialogBox->show(); /* gui update */ qApp->processEvents(); return 0; } int QT4_GuiDialog::closeDialog() { QT4_DialogBox *dialogBox; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } /* let dialog write its settings */ GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); /* hide dialog */ dialogBox->hide(); /* gui update */ qApp->processEvents(); delete _mainWidget; _mainWidget=NULL; return 0; } int QT4_GuiDialog::runDialog(bool untilEnd) { QT4_DialogBox *dialogBox; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } if (untilEnd) { dialogBox->cont(); } else { { /* gui update */ qApp->processEvents(); } } return 0; } int QT4_GuiDialog::setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { return GWEN_Widget_SetIntProperty(w, prop, index, value, doSignal); } int QT4_GuiDialog::getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { return GWEN_Widget_GetIntProperty(w, prop, index, defaultValue); } int QT4_GuiDialog::setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { return GWEN_Widget_SetCharProperty(w, prop, index, value, doSignal); } const char *QT4_GuiDialog::getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { return GWEN_Widget_GetCharProperty(w, prop, index, defaultValue); } int QT4_GuiDialog::setupTree(GWEN_WIDGET *w) { int rv; Qt4_W_Widget *xw=NULL; switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: xw=new Qt4_W_Dialog(w); break; case GWEN_Widget_TypeVLayout: xw=new Qt4_W_VLayout(w); break; case GWEN_Widget_TypeHLayout: xw=new Qt4_W_HLayout(w); break; case GWEN_Widget_TypeGridLayout: xw=new Qt4_W_GridLayout(w); break; case GWEN_Widget_TypeLabel: xw=new Qt4_W_Label(w); break; case GWEN_Widget_TypeLineEdit: xw=new Qt4_W_LineEdit(w); break; case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHSpacer: /* abuse widget */ xw=new Qt4_W_Widget(w); break; case GWEN_Widget_TypePushButton: xw=new Qt4_W_PushButton(w); break; case GWEN_Widget_TypeHLine: xw=new Qt4_W_HLine(w); break; case GWEN_Widget_TypeVLine: xw=new Qt4_W_VLine(w); break; case GWEN_Widget_TypeTextEdit: xw=new Qt4_W_TextEdit(w); break; case GWEN_Widget_TypeComboBox: xw=new Qt4_W_ComboBox(w); break; case GWEN_Widget_TypeTabBook: xw=new Qt4_W_TabBook(w); break; case GWEN_Widget_TypeTabPage: xw=new Qt4_W_VLayout(w); break; case GWEN_Widget_TypeCheckBox: xw=new Qt4_W_CheckBox(w); break; case GWEN_Widget_TypeGroupBox: xw=new Qt4_W_GroupBox(w); break; case GWEN_Widget_TypeWidgetStack: xw=new Qt4_W_WidgetStack(w); break; case GWEN_Widget_TypeTextBrowser: xw=new Qt4_W_TextBrowser(w); break; case GWEN_Widget_TypeScrollArea: xw=new Qt4_W_ScrollArea(w); break; case GWEN_Widget_TypeProgressBar: xw=new Qt4_W_ProgressBar(w); break; case GWEN_Widget_TypeListBox: xw=new Qt4_W_ListBox(w); break; case GWEN_Widget_TypeRadioButton: xw=new Qt4_W_RadioButton(w); break; case GWEN_Widget_TypeSpinBox: xw=new Qt4_W_SpinBox(w); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unhandled widget type %d (%s)", GWEN_Widget_GetType(w), GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); break; } if (xw==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget created."); return GWEN_ERROR_INTERNAL; } rv=xw->setup(); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_WIDGET *wChild; if (GWEN_Widget_GetType(w)==GWEN_Widget_TypeDialog) _mainWidget=(QT4_DialogBox*) GWEN_Widget_GetImplData(xw->getCInterface(), QT4_DIALOG_WIDGET_REAL); /* handle children */ wChild=GWEN_Widget_Tree_GetFirstChild(w); while(wChild) { /* recursion */ rv=setupTree(wChild); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } wChild=GWEN_Widget_Tree_GetNext(wChild); } } return 0; } bool QT4_GuiDialog::setup(QWidget *parentWindow) { GWEN_WIDGET_TREE *wtree; GWEN_WIDGET *w; int rv; wtree=GWEN_Dialog_GetWidgets(_dialog); if (wtree==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget tree in dialog"); return false; } w=GWEN_Widget_Tree_GetFirst(wtree); if (w==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widgets in dialog"); return false; } rv=setupTree(w); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return false; } _mainWidget=(QT4_DialogBox*) GWEN_Widget_GetImplData(w, QT4_DIALOG_WIDGET_REAL); rv=GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeInit, ""); if (rv<0) { DBG_INFO(0, "Error initializing dialog: %d", rv); return false; } return true; } gwenhywfar-5.12.1/gui/qt4/gwengui-qt4.pc.in0000644000175000017500000000105613142134462015304 00000000000000# pkg-config configuration for gwengui_qt4 # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@includedir@/gwenhywfar datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Human-readable name Name: gwengui-qt4 # Human-readable description Description: QT4 Implementation of the GWEN_DIALOG framework. Version: @VERSION@ Libs: -L@libdir@ -lgwengui-qt4 -lgwengui-cpp Cflags: -I@includedir@ gwenhywfar-5.12.1/gui/qt4/w_dialog.cpp0000644000175000017500000000661113142134462014473 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_Dialog: public Qt4_W_Widget { public: Qt4_W_Dialog(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_Dialog() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QT4_DialogBox(dynamic_cast(getDialog()), QApplication::activeModalWidget()); qLayout=new QVBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QT4_DialogBox*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: qw->setWindowTitle(QString::fromUtf8(value)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QWidget *qw; QString str; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->windowTitle(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/w_widget.cpp0000644000175000017500000000774413142134462014527 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_Widget: public CppWidget { public: Qt4_W_Widget(GWEN_WIDGET *w):CppWidget(w) { } ~Qt4_W_Widget() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_CONTENT, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } static QWidget *getQWidget(GWEN_WIDGET *w) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(w, QT4_DIALOG_WIDGET_REAL); assert(qw); return qw; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Width: qw->resize(value, qw->height()); return 0; case GWEN_DialogProperty_Height: qw->resize(qw->width(), value); return 0; case GWEN_DialogProperty_Enabled: qw->setEnabled((value==0)?false:true); return 0; case GWEN_DialogProperty_Focus: qw->setFocus(); return 0; case GWEN_DialogProperty_Visibility: if (value==0) qw->hide(); else qw->show(); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Width: return qw->width(); case GWEN_DialogProperty_Height: return qw->height(); case GWEN_DialogProperty_Enabled: return (qw->isEnabled())?1:0; case GWEN_DialogProperty_Focus: return (qw->hasFocus())?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/qt4dialogbox.hpp0000644000175000017500000000165213142134462015314 00000000000000/*************************************************************************** begin : Tue Feb 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef QT4_DIALOGBOX_H #define QT4_DIALOGBOX_H #include class QT4_GuiDialog; class QT4_DialogBox: public QDialog { Q_OBJECT public: QT4_DialogBox(QT4_GuiDialog *dialog, QWidget *parent=0, bool modal=FALSE, Qt::WindowFlags f=0); virtual ~QT4_DialogBox(); void accept(); void reject(); int cont(); void closeEvent(QCloseEvent *e); void unlinkFromDialog(); public slots: void slotActivated(); void slotValueChanged(); protected: QT4_GuiDialog *_dialog; }; #endif gwenhywfar-5.12.1/gui/qt4/gwengui-qt4-config-version.cmake.in0000644000175000017500000000052213142134462020705 00000000000000set(PACKAGE_VERSION "@GWENHYWFAR_VERSION_STRING@") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") set(PACKAGE_VERSION_EXACT TRUE) endif() endif() gwenhywfar-5.12.1/gui/qt4/w_progressbar.cpp0000644000175000017500000000500313142134462015557 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_ProgressBar: public Qt4_W_Widget { public: Qt4_W_ProgressBar(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_ProgressBar() { } virtual int setup() { QProgressBar *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QProgressBar(); qw->setTextVisible(true); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QProgressBar *qw; qw=(QProgressBar*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setValue(value); return 0; case GWEN_DialogProperty_MinValue: qw->setMinimum(value); return 0; case GWEN_DialogProperty_MaxValue: qw->setMaximum(value); return 0; default: return Qt4_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QProgressBar *qw; qw=(QProgressBar*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->value(); case GWEN_DialogProperty_MinValue: return qw->minimum(); case GWEN_DialogProperty_MaxValue: return qw->maximum(); default: return Qt4_W_Widget::getIntProperty(prop, index, defaultValue); } }; }; gwenhywfar-5.12.1/gui/qt4/w_label.cpp0000644000175000017500000000564413142134462014320 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_Label: public Qt4_W_Widget { public: Qt4_W_Label(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_Label() { } virtual int setup() { QLabel *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QT4_Gui::extractHtml(s); qw=new QLabel(text); qw->setWordWrap(true); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QLabel *qw; QString text; qw=(QLabel*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QT4_Gui::extractHtml(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QLabel *qw; QString str; qw=(QLabel*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/Makefile.am0000666000175000017500000000425613642701350014246 00000000000000AM_CPPFLAGS=-I$(gwenhywfar_symlinkdir) $(qt4_includes) \ @visibility_cflags@ DEFS=-DBUILDING_QT4_GUI pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-qt4.pc cmakeconfigdir = $(libdir)/cmake/gwengui-qt4-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwengui-qt4-config.cmake gwengui-qt4-config-version.cmake lib_LTLIBRARIES=libgwengui-qt4.la noinst_PROGRAMS=libtest noinst_HEADERS=\ qt4dialogbox.hpp \ qt4_gui_dialog.hpp \ qt4_gui_dialog.hpp libgwengui_qt4_la_LIBADD=$(qt4_libs) $(top_builddir)/src/$(gwenhywfar_internal_libname) $(builddir)/../cpp/libgwengui-cpp.la libgwengui_qt4_la_LDFLAGS=-no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_qt4_la_SOURCES=\ qt4dialogbox.cpp \ qt4_gui.cpp \ qt4_gui_dialog.cpp nodist_libgwengui_qt4_la_SOURCES= nodist_noinst_HEADERS= iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-qt4 iheader_HEADERS=\ qt4_gui.hpp MOC_FILES=\ qt4dialogbox.moc UI_FILES= EXTRA_DIST=$(UI_FILES) \ w_widget.cpp \ w_dialog.cpp \ w_vlayout.cpp \ w_hlayout.cpp \ w_gridlayout.cpp \ w_label.cpp \ w_lineedit.cpp \ w_pushbutton.cpp \ w_hline.cpp \ w_vline.cpp \ w_textedit.cpp \ w_combobox.cpp \ w_tabbook.cpp \ w_checkbox.cpp \ w_groupbox.cpp \ w_widgetstack.cpp \ w_textbrowser.cpp \ w_scrollarea.cpp \ w_progressbar.cpp \ w_listbox.cpp \ w_radiobutton.cpp \ w_spinbox.cpp libtest_SOURCES=libtest.cpp libtest_LDADD=libgwengui-qt4.la $(top_builddir)/src/$(gwenhywfar_internal_libname) $(qt4_libs) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la SUFFIXES = .ui .ui.hpp .ui.cpp .moc %.moc: %.hpp $(qt4_moc) -o $@ $< %.ui.hpp: %.ui $(qt4_uic) $< -o $@ sources: for f in $(libgwengui_qt4_la_SOURCES) $(foreach uifile,$(UI_FILES),$(uifile).cpp); do \ echo $(subdir)/$$f >>$(top_srcdir)/qtsources; \ done for d in $(SUBDIRS); do \ $(MAKE) -C $$d sources; \ done built_sources: $(BUILT_SOURCES) for d in $(SUBDIRS); do \ $(MAKE) -C $$d built_sources; \ done ; BUILT_SOURCES = $(MOC_FILES) $(nodist_libgwengui_qt4_la_SOURCES) CLEANFILES = $(BUILT_SOURCES) gwenhywfar-5.12.1/gui/qt4/w_textbrowser.cpp0000644000175000017500000000447413142134462015631 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_TextBrowser: public Qt4_W_Widget { public: Qt4_W_TextBrowser(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_TextBrowser() { } virtual int setup() { QTextBrowser *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QTextBrowser(); qw->setText(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QTextBrowser *qw; QString text; qw=(QTextBrowser*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QT4_Gui::extractHtml(value); switch(prop) { case GWEN_DialogProperty_Value: qw->setText(""); qw->append(text); return 0; case GWEN_DialogProperty_AddValue: qw->append(text); return 0; case GWEN_DialogProperty_ClearValues: qw->setText(""); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; }; gwenhywfar-5.12.1/gui/qt4/w_textedit.cpp0000644000175000017500000000622313142134462015065 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt4_W_TextEdit: public Qt4_W_Widget { public: Qt4_W_TextEdit(GWEN_WIDGET *w):Qt4_W_Widget(w) { } ~Qt4_W_TextEdit() { } virtual int setup() { QTextEdit *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT4_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QTextEdit(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT4_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(returnPressed()), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QTextEdit *qw; QString text; qw=(QTextEdit*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Value: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QTextEdit *qw; QString str; qw=(QTextEdit*) GWEN_Widget_GetImplData(_widget, QT4_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: str=qw->toPlainText(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT4_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT4_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt4/qt4dialogbox.cpp0000644000175000017500000001217513142134462015311 00000000000000/*************************************************************************** begin : Tue Feb 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "qt4dialogbox.hpp" #include "qt4_gui_dialog.hpp" #include #include QT4_DialogBox::QT4_DialogBox(QT4_GuiDialog *dialog, QWidget *parent, bool modal, Qt::WindowFlags f) :QDialog(parent, f) ,_dialog(dialog) { setModal(modal); } QT4_DialogBox::~QT4_DialogBox() { } void QT4_DialogBox::accept() { QDialog::accept(); } void QT4_DialogBox::reject() { QDialog::reject(); } int QT4_DialogBox::cont() { return exec(); } void QT4_DialogBox::closeEvent(QCloseEvent *e) { if (_dialog) { int rv; rv=GWEN_Dialog_EmitSignal(_dialog->getCInterface(), GWEN_DialogEvent_TypeClose, ""); if (rv!=GWEN_DialogEvent_ResultReject) { e->accept(); } } else { e->accept(); } } void QT4_DialogBox::unlinkFromDialog() { _dialog=NULL; } void QT4_DialogBox::slotActivated() { const QObject *snd; snd=sender(); if (snd) { GWEN_WIDGET *w; const char *wname; int rv=GWEN_DialogEvent_ResultNotHandled; w=GWEN_Dialog_FindWidgetByImplData(_dialog->getCInterface(), QT4_DIALOG_WIDGET_REAL, snd); if (w==NULL) { DBG_INFO(0, "Widget not found"); return; } wname=GWEN_Widget_GetName(w); DBG_INFO(GWEN_LOGDOMAIN, "Command for [%s] (type: %s)", wname?wname:"(unnamed)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: break; case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeLabel: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeSpinBox: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: /* nothing to do for these types */ ; } if (rv==GWEN_DialogEvent_ResultAccept) { accept(); } else if (rv==GWEN_DialogEvent_ResultReject) { reject(); } } } void QT4_DialogBox::slotValueChanged() { const QObject *snd; snd=sender(); if (snd) { GWEN_WIDGET *w; const char *wname; int rv=GWEN_DialogEvent_ResultNotHandled; w=GWEN_Dialog_FindWidgetByImplData(_dialog->getCInterface(), QT4_DIALOG_WIDGET_REAL, snd); if (w==NULL) { DBG_INFO(0, "Widget not found"); return; } wname=GWEN_Widget_GetName(w); DBG_INFO(GWEN_LOGDOMAIN, "ValueChanged for [%s] (type: %s)", wname?wname:"(unnamed)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: break; case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeLabel: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeSpinBox: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: /* nothing to do for these types */ ; } if (rv==GWEN_DialogEvent_ResultAccept) { accept(); } else if (rv==GWEN_DialogEvent_ResultReject) { reject(); } } } #include "qt4dialogbox.moc" gwenhywfar-5.12.1/gui/qt4/libtest.cpp0000644000175000017500000001016513142134462014353 00000000000000 #undef BUILDING_QT4_GUI #include "qt4_gui.hpp" #include "../testdialogs/dlg_test.h" #include #include #include #include #include #include int test1(int argc, char **argv) { QApplication a(argc, argv); QT4_Gui *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); /* create GUI */ gui=new QT4_Gui(); GWEN_Gui_SetGui(gui->getCInterface()); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int test2(int argc, char **argv) { QApplication a(argc, argv); QT4_Gui *gui; QString lf; int rv; uint32_t pid; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); /* create GUI */ gui=new QT4_Gui(); GWEN_Gui_SetGui(gui->getCInterface()); #if 0 pid=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_PROGRESS | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "This is an example progress with 2 steps" "This is an example progress with 2 steps", 2, 0); #else pid=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_PROGRESS | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "This is an example progress with 2 steps", 2, 0); #endif GWEN_Gui_ProgressAdvance(pid, 1); rv=GWEN_Gui_MessageBox(GWEN_GUI_MSG_FLAGS_TYPE_INFO, "MessageBox-Title", "This message box should appear in the context of the open progress dialog", "Button1", "Button2", "Button3", pid); GWEN_Gui_ProgressAdvance(pid, 2); GWEN_Gui_ProgressEnd(pid); return 0; } int test3(int argc, char **argv) { int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; QApplication a(argc, argv); QT4_Gui *gui; gui=new QT4_Gui(); GWEN_Gui_SetGui(gui->getCInterface()); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

This is an example text..

" "

As you can see colors can " "be used.

" "", 10, 0); for (i1=1; i1<=10; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d\n", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 10, id1); for (i2=1; i2<=10; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (2)\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (1)\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int main(int argc, char **argv) { return test1(argc, argv); //return test2(argc, argv); //return test3(argc, argv); } gwenhywfar-5.12.1/gui/qt4/gwengui-qt4-config.cmake.in0000666000175000017500000000447413702435660017246 00000000000000# Macros cmake's CONFIGURE_PACKAGE_CONFIG_FILE() would create macro(set_and_check _var _file) set(${_var} "${_file}") if(NOT EXISTS "${_file}") message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") endif() endmacro() macro(check_required_components _NAME) foreach(comp ${${_NAME}_FIND_COMPONENTS}) if(NOT ${_NAME}_${comp}_FOUND) if(${_NAME}_FIND_REQUIRED_${comp}) set(${_NAME}_FOUND FALSE) endif() endif() endforeach() endmacro() include(CMakeFindDependencyMacro) find_dependency(gwengui-cpp "@GWENHYWFAR_VERSION_STRING@") # Find Qt4 (a bit longer as it uses components) set(__qt_quiet_arg) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) set(__qt_quiet_arg QUIET) endif() set(__qt_required_arg) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) set(__qt_required_arg REQUIRED) endif() find_package(Qt4 ${__qt_required_arg} ${__qt_quiet_arg} COMPONENTS QtCore QtGui) set(__qt_quiet_arg) set(__qt_required_arg) if (NOT QT4_FOUND) set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency Qt4 could not be found.") set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False) return() endif() set_and_check(prefix "@prefix@") set_and_check(exec_prefix "@exec_prefix@") set_and_check(includedir "@includedir@") set_and_check(${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS "@gwenhywfar_headerdir@") if(WIN32) set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt4.dll.a") elseif(APPLE) set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt4.dylib") else() set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt4.so") endif() set(${CMAKE_FIND_PACKAGE_NAME}_FOUND true) if(${CMAKE_FIND_PACKAGE_NAME}_FOUND AND NOT TARGET gwenhywfar::gui-qt4) add_library(gwenhywfar::gui-qt4 UNKNOWN IMPORTED) set_target_properties(gwenhywfar::gui-qt4 PROPERTIES IMPORTED_LOCATION "${${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "gwenhywfar::gui-cpp;Qt4::Core;Qt4::QtGui" ) endif() set(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES} gwenhywfar::gui-cpp) mark_as_advanced( ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ) gwenhywfar-5.12.1/gui/testdialogs/0000755000175000017500000000000015032533715014074 500000000000000gwenhywfar-5.12.1/gui/testdialogs/dlg_test2.h0000644000175000017500000000023213142134462016045 00000000000000 #ifndef DLG_TEST2_H #define DLG_TEST2_H #ifdef __cplusplus extern "C" { #endif GWEN_DIALOG *Dlg_Test2_new(); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/gui/testdialogs/dlg_test.c0000664000175000017500000002532314156464753016007 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include static int GWENHYWFAR_CB _gwenGuiSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender) { fprintf(stderr, "Received event %d from widget [%s]\n", t, sender); switch (t) { case GWEN_DialogEvent_TypeInit: fprintf(stderr, "Init\n"); GWEN_Dialog_SetCharProperty(dlg, "combo1", GWEN_DialogProperty_AddValue, 0, "Erster Text in Combo1", 0); GWEN_Dialog_SetCharProperty(dlg, "combo1", GWEN_DialogProperty_AddValue, 0, "Zweiter Text in Combo1", 0); GWEN_Dialog_SetIntProperty(dlg, "combo1", GWEN_DialogProperty_Value, 0, 0, 0); GWEN_Dialog_SetCharProperty(dlg, "combo2", GWEN_DialogProperty_AddValue, 0, "Erster Text in Combo2", 0); GWEN_Dialog_SetCharProperty(dlg, "combo2", GWEN_DialogProperty_AddValue, 0, "Zweiter Text in Combo2", 0); GWEN_Dialog_SetIntProperty(dlg, "combo2", GWEN_DialogProperty_Value, 0, 0, 0); GWEN_Dialog_SetCharProperty(dlg, "listbox1", GWEN_DialogProperty_Title, 0, "Column1\tColumn2\tColumn3", 0); GWEN_Dialog_SetCharProperty(dlg, "listbox1", GWEN_DialogProperty_AddValue, 0, "Zeile 1 Spalte 1\tZeile 1 Spalte 2\tZeile 1 Spalte 3", 0); GWEN_Dialog_SetCharProperty(dlg, "listbox1", GWEN_DialogProperty_AddValue, 0, "Zeile 2 Spalte 1\tZeile 2 Spalte 2\tZeile 2 Spalte 3", 0); GWEN_Dialog_SetIntProperty(dlg, "listbox1", GWEN_DialogProperty_ColumnWidth, 0, 100, 0); GWEN_Dialog_SetIntProperty(dlg, "listbox1", GWEN_DialogProperty_ColumnWidth, 1, 200, 0); GWEN_Dialog_SetCharProperty(dlg, "labelWithHtmlImage", GWEN_DialogProperty_Title, 0, "This label contains text which should also contain an image:" "" "

And here the text should continue, followed by another image:" "

" "And again, this should be on the following line." "This label would contain an image if it were able to use " "HTML.", 0); GWEN_Dialog_SetCharProperty(dlg, "textBrowser1", GWEN_DialogProperty_Value, 0, "" "

This is bold text, while this one is italic.

" "This is a list:" "
    " "
  • first item
  • " "
  • second item
  • " "
  • third item
  • " "
  • fourth item
  • " "
" "

This paragraph should follow the list.

" "" "This is BOLD text, while this one is would be i t a l i c.\n" "This is a list:\n" "- first item\n" "- second item\n" "- third item\n" "- fourth item\n" "This paragraph should follow the list.", 0); GWEN_Dialog_SetIntProperty(dlg, "progressBar1", GWEN_DialogProperty_MinValue, 0, 0, 0); GWEN_Dialog_SetIntProperty(dlg, "progressBar1", GWEN_DialogProperty_MaxValue, 0, 10, 0); GWEN_Dialog_SetIntProperty(dlg, "", GWEN_DialogProperty_Width, 0, 640, 0); GWEN_Dialog_SetIntProperty(dlg, "", GWEN_DialogProperty_Height, 0, 480, 0); break; case GWEN_DialogEvent_TypeFini: fprintf(stderr, "Fini\n"); break; case GWEN_DialogEvent_TypeValueChanged: fprintf(stderr, "ValueChanged\n"); if (strcasecmp(sender, "listbox1")==0) { fprintf(stderr, "Selected list entry %d\n", GWEN_Dialog_GetIntProperty(dlg, "listbox1", GWEN_DialogProperty_Value, 0, -1)); } else if (strcasecmp(sender, "editPass1")==0) { const char *s; s=GWEN_Dialog_GetCharProperty(dlg, "editPass1", GWEN_DialogProperty_Value, 0, NULL); if (!(s && *s)) s=""; GWEN_Dialog_SetCharProperty(dlg, "editPass2", GWEN_DialogProperty_Value, 0, s, 0); } break; case GWEN_DialogEvent_TypeActivated: fprintf(stderr, "Activated\n"); if (strcasecmp(sender, "listbox1")==0) { int idx; idx=GWEN_Dialog_GetIntProperty(dlg, "listbox1", GWEN_DialogProperty_Value, 0, -1); fprintf(stderr, "Selected list entry %d\n", idx); if (idx>=0) { const char *s; s=GWEN_Dialog_GetCharProperty(dlg, "listbox1", GWEN_DialogProperty_Value, idx, NULL); if (s && *s) { fprintf(stderr, "Text of selected list entry %d: [%s]\n", idx, s); } } } else if (strcasecmp(sender, "combo1")==0) { int idx; idx=GWEN_Dialog_GetIntProperty(dlg, "combo1", GWEN_DialogProperty_Value, 0, -1); fprintf(stderr, "Selected list entry %d\n", idx); if (idx>=0) { const char *s; s=GWEN_Dialog_GetCharProperty(dlg, "combo1", GWEN_DialogProperty_Value, idx, NULL); if (s && *s) { fprintf(stderr, "Text of selected list entry %d: [%s]\n", idx, s); } } } else if (strcasecmp(sender, "okButton")==0) return GWEN_DialogEvent_ResultAccept; else if (strcasecmp(sender, "abortButton")==0) return GWEN_DialogEvent_ResultReject; else if (strcasecmp(sender, "progressMinus")==0) { int v; v=GWEN_Dialog_GetIntProperty(dlg, "progressBar1", GWEN_DialogProperty_Value, 0, -1); if (v>0) GWEN_Dialog_SetIntProperty(dlg, "progressBar1", GWEN_DialogProperty_Value, 0, v-1, 0); return GWEN_DialogEvent_ResultHandled; } else if (strcasecmp(sender, "progressPlus")==0) { int v; v=GWEN_Dialog_GetIntProperty(dlg, "progressBar1", GWEN_DialogProperty_Value, 0, -1); if (v<10) GWEN_Dialog_SetIntProperty(dlg, "progressBar1", GWEN_DialogProperty_Value, 0, v+1, 0); return GWEN_DialogEvent_ResultHandled; } else if (strcasecmp(sender, "prevPageButton")==0) { int v; v=GWEN_Dialog_GetIntProperty(dlg, "stack1", GWEN_DialogProperty_Value, 0, -1); if (v>0) GWEN_Dialog_SetIntProperty(dlg, "stack1", GWEN_DialogProperty_Value, 0, v-1, 0); return GWEN_DialogEvent_ResultHandled; } else if (strcasecmp(sender, "nextPageButton")==0) { int v; v=GWEN_Dialog_GetIntProperty(dlg, "stack1", GWEN_DialogProperty_Value, 0, -1); if (v<3) GWEN_Dialog_SetIntProperty(dlg, "stack1", GWEN_DialogProperty_Value, 0, v+1, 0); return GWEN_DialogEvent_ResultHandled; } break; case GWEN_DialogEvent_TypeEnabled: fprintf(stderr, "Enabled\n"); break; case GWEN_DialogEvent_TypeDisabled: fprintf(stderr, "Disabled\n"); break; case GWEN_DialogEvent_TypeClose: fprintf(stderr, "Close\n"); return GWEN_DialogEvent_ResultNotHandled; case GWEN_DialogEvent_TypeLast: fprintf(stderr, "Last, ignored\n"); return GWEN_DialogEvent_ResultNotHandled; case GWEN_DialogEvent_TypeKeyPressed: case GWEN_DialogEvent_TypeKeyReleased: fprintf(stderr, "Key events ignored\n"); return GWEN_DialogEvent_ResultNotHandled; } return GWEN_DialogEvent_ResultHandled; } GWEN_DIALOG *Dlg_Test1_new() { GWEN_DIALOG *dlg; int rv; const char *s; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=getenv("DIALOG_DIR"); if (s && *s) GWEN_Buffer_AppendString(tbuf, s); else GWEN_Buffer_AppendString(tbuf, MEDIAPATH); dlg=GWEN_Dialog_new("dlg_test"); GWEN_Dialog_SetSignalHandler(dlg, _gwenGuiSignalHandler); GWEN_Dialog_AddMediaPath(dlg, GWEN_Buffer_GetStart(tbuf)); /* read dialog from dialog description file */ GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S "dlg_test.dlg"); rv=GWEN_Dialog_ReadXmlFile(dlg, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d).", rv); GWEN_Dialog_free(dlg); return NULL; } /* done */ return dlg; } gwenhywfar-5.12.1/gui/testdialogs/dlg_test.dlg0000644000175000017500000001513313142134462016310 00000000000000 gwenhywfar-5.12.1/gui/testdialogs/dlg_test.h0000644000175000017500000000023013142134462015761 00000000000000 #ifndef DLG_TEST_H #define DLG_TEST_H #ifdef __cplusplus extern "C" { #endif GWEN_DIALOG *Dlg_Test1_new(); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/gui/testdialogs/dlg_test2.c0000664000175000017500000000704414156464753016071 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include static int GWENHYWFAR_CB _gwenGuiSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender) { fprintf(stderr, "Received event %d from widget [%s]\n", t, sender); switch (t) { case GWEN_DialogEvent_TypeInit: fprintf(stderr, "Init\n"); GWEN_Dialog_SetCharProperty(dlg, "button1", GWEN_DialogProperty_Title, 0, "Click this button to close", 0); GWEN_Dialog_SetIntProperty(dlg, "", GWEN_DialogProperty_Width, 0, 640, 0); GWEN_Dialog_SetIntProperty(dlg, "", GWEN_DialogProperty_Height, 0, 480, 0); break; case GWEN_DialogEvent_TypeFini: fprintf(stderr, "Fini\n"); break; case GWEN_DialogEvent_TypeValueChanged: fprintf(stderr, "ValueChanged\n"); if (strcasecmp(sender, "listbox1")==0) { fprintf(stderr, "Selected list entry %d\n", GWEN_Dialog_GetIntProperty(dlg, "listbox1", GWEN_DialogProperty_Value, 0, -1)); } break; case GWEN_DialogEvent_TypeActivated: fprintf(stderr, "Activated\n"); if (strcasecmp(sender, "button1")==0) return GWEN_DialogEvent_ResultAccept; break; case GWEN_DialogEvent_TypeEnabled: fprintf(stderr, "Enabled\n"); break; case GWEN_DialogEvent_TypeDisabled: fprintf(stderr, "Disabled\n"); break; case GWEN_DialogEvent_TypeClose: fprintf(stderr, "Close\n"); return GWEN_DialogEvent_ResultNotHandled; case GWEN_DialogEvent_TypeLast: fprintf(stderr, "Last, ignored\n"); return GWEN_DialogEvent_ResultNotHandled; case GWEN_DialogEvent_TypeKeyPressed: case GWEN_DialogEvent_TypeKeyReleased: fprintf(stderr, "Key events ignored\n"); return GWEN_DialogEvent_ResultNotHandled; } return GWEN_DialogEvent_ResultHandled; } GWEN_DIALOG *Dlg_Test2_new() { GWEN_DIALOG *dlg; int rv; const char *s; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); s=getenv("DIALOG_DIR"); if (s && *s) GWEN_Buffer_AppendString(tbuf, s); else GWEN_Buffer_AppendString(tbuf, MEDIAPATH); dlg=GWEN_Dialog_new("dlg_test2"); GWEN_Dialog_SetSignalHandler(dlg, _gwenGuiSignalHandler); GWEN_Dialog_AddMediaPath(dlg, MEDIAPATH); /* read dialog from dialog description file */ GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S "dlg_test2.dlg"); rv=GWEN_Dialog_ReadXmlFile(dlg, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d).", rv); GWEN_Dialog_free(dlg); return NULL; } /* done */ return dlg; } gwenhywfar-5.12.1/gui/testdialogs/Makefile.in0000644000175000017500000006047115032533614016067 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gui/testdialogs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgwengui_test_la_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) am_libgwengui_test_la_OBJECTS = dlg_test.lo dlg_test2.lo libgwengui_test_la_OBJECTS = $(am_libgwengui_test_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dlg_test.Plo \ ./$(DEPDIR)/dlg_test2.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwengui_test_la_SOURCES) DIST_SOURCES = $(libgwengui_test_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DMEDIAPATH=\"$(ABSMEDIAPATH)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) ABSMEDIAPATH = $(abs_srcdir) noinst_LTLIBRARIES = libgwengui-test.la libgwengui_test_la_SOURCES = \ dlg_test.c \ dlg_test2.c libgwengui_test_la_LIBADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) noinst_HEADERS = \ dlg_test.h \ dlg_test2.h EXTRA_DIST = \ dlg_test.dlg \ disk.png all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/testdialogs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/testdialogs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-test.la: $(libgwengui_test_la_OBJECTS) $(libgwengui_test_la_DEPENDENCIES) $(EXTRA_libgwengui_test_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgwengui_test_la_OBJECTS) $(libgwengui_test_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlg_test.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlg_test2.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dlg_test.Plo -rm -f ./$(DEPDIR)/dlg_test2.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dlg_test.Plo -rm -f ./$(DEPDIR)/dlg_test2.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/testdialogs/disk.png0000644000175000017500000000030213142134462015443 00000000000000‰PNG  IHDR szzô pHYs a Äî–@µtIDATX…c` Ñ"""þÓÚÒ+VÀíe¢µe„À¨F@‘–/Ï`X¾ #include #import #import #import "CocoaWindow.h" //#define GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING 3 /*typedef struct { GWEN_DIALOG *dialog; GtkWindow *window; int response; GMainLoop *loop; int destroyed; } RunInfo;*/ void CocoaGui_Dialog_Extend(GWEN_DIALOG *dlg); void CocoaGui_Dialog_Unextend(GWEN_DIALOG *dlg); int CocoaGui_Dialog_Setup(GWEN_DIALOG *dlg, NSWindow *parentWindow); CocoaWindow *CocoaGui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg); int Cocoa_Gui_Dialog_Run(GWEN_DIALOG *dlg, int timeout); void CocoaGui_Dialog_Leave(GWEN_DIALOG *dlg, int result); #endif gwenhywfar-5.12.1/gui/cocoa/CocoaGroupBox.h0000644000175000017500000000042013142134474015434 00000000000000// // CocoaGroupBox.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaGroupBox : NSBox { BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; @end gwenhywfar-5.12.1/gui/cocoa/w_listbox.mm0000644000175000017500000002000713142134462015116 00000000000000/*************************************************************************** begin : Aug 17 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaScrollBox.h" #import "CocoaListBox.h" #define W_LISTBOX_MAX_TYPES 256 static GWENHYWFAR_CB int CocoaGui_WListBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaListBox *listbox; CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(scrollView); listbox = [scrollView documentView]; assert(listbox); switch(prop) { case GWEN_DialogProperty_Enabled: [listbox setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: { if ([listbox window]) { [[listbox window] makeFirstResponder:listbox]; } } return 0; case GWEN_DialogProperty_SelectionMode: { switch(value) { case GWEN_Dialog_SelectionMode_None: [listbox setAllowsEmptySelection:YES]; [listbox setAllowsMultipleSelection:NO]; [listbox deselectAll:listbox]; return 0; case GWEN_Dialog_SelectionMode_Single: [listbox setAllowsEmptySelection:NO]; [listbox setAllowsMultipleSelection:NO]; return 0; case GWEN_Dialog_SelectionMode_Multi: [listbox setAllowsEmptySelection:NO]; [listbox setAllowsMultipleSelection:YES]; return 0; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", value); return GWEN_ERROR_INVALID; } case GWEN_DialogProperty_ColumnWidth: { if ([listbox setColumnWidthTo:value forColumn:index]) return 0; return GWEN_ERROR_INVALID; } case GWEN_DialogProperty_SortDirection: { if ([listbox setSortOrderTo:(value == GWEN_DialogSortDirection_Up) ForColumnWithIndex:index]) return 0; return GWEN_ERROR_INVALID; } case GWEN_DialogProperty_Sort: // NOOP, we use auto-sorting for now (TODO: figure out how to manually sort) return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WListBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaListBox *listbox; CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(scrollView); listbox = [scrollView documentView]; assert(listbox); switch(prop) { case GWEN_DialogProperty_Enabled: return ([listbox isEnabled])?1:0; case GWEN_DialogProperty_Focus: if ([listbox window]) { if ([[listbox window] firstResponder] == listbox) return 1; } return 0; case GWEN_DialogProperty_Value: { return [listbox selectedRow]; return -1; } case GWEN_DialogProperty_ColumnWidth: { return [listbox widthOfColumn:index]; } case GWEN_DialogProperty_SortDirection: { NSInteger sortOrder = [listbox sortOrderForColumnAtIndex:index]; switch (sortOrder) { case 1: return GWEN_DialogSortDirection_Up; case 0: return GWEN_DialogSortDirection_Down; default: break; } return GWEN_DialogSortDirection_None; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WListBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaListBox *listbox; CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(scrollView); listbox = [scrollView documentView]; assert(listbox); switch(prop) { case GWEN_DialogProperty_Title: { if (value && *value) { NSString *titleString = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [listbox setTitelsAndCreateColumns:titleString]; [titleString release]; } return 0; } case GWEN_DialogProperty_ClearValues: { [listbox clearDataRows]; return 0; } case GWEN_DialogProperty_AddValue: { if (value && *value) { NSString *dataRowString = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [listbox addDataRowString:dataRowString]; [dataRowString release]; } return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WListBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaListBox *listbox; CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(scrollView); listbox = [scrollView documentView]; assert(listbox); switch(prop) { case GWEN_DialogProperty_Title: { NSString *titlesString = [listbox titlesString]; if (titlesString) { return [titlesString cStringUsingEncoding:NSUTF8StringEncoding]; } return defaultValue; } case GWEN_DialogProperty_Value: { NSString *dataRowString = [listbox dataRowStringForRow:index]; if (dataRowString) { return [dataRowString cStringUsingEncoding:NSUTF8StringEncoding]; } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WListBox_Changed_handler(NSTableView *tableView, void* data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "ListBox Changed"); w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WListBox_Setup(GWEN_WIDGET *w) { CocoaListBox *listBox; uint32_t flags; GWEN_WIDGET *wParent; //gulong changed_handler_id; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); CocoaScrollBox *scrollView = [[[CocoaScrollBox alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 100.0)] autorelease]; [scrollView setHasVerticalScroller:YES]; [scrollView setHasHorizontalScroller:YES]; [scrollView setAutohidesScrollers:YES]; if (flags & GWEN_WIDGET_FLAGS_FILLX) scrollView.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) scrollView.fillY = YES; listBox = [[[CocoaListBox alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 100.0)] autorelease]; [listBox setFocusRingType:NSFocusRingTypeNone]; [scrollView setLayoutedDocumentView:listBox]; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) scrollView); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) scrollView); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WListBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WListBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WListBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WListBox_GetCharProperty); #pragma mark NOCH MACHEN /*changed_handler_id=g_signal_connect(g, "cursor-changed", G_CALLBACK (Gtk2Gui_WListBox_CursorChanged_handler), w);*/ gwenListBoxActionPtr ptr = CocoaGui_WListBox_Changed_handler; [listBox setC_ActionPtr:ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/w_checkbox.mm0000644000175000017500000001332713142134462015227 00000000000000/*************************************************************************** begin : Aug 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaCheckboxButton.h" static GWENHYWFAR_CB int CocoaGui_WCheckBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaCheckboxButton *checkbox; checkbox = (CocoaCheckboxButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(checkbox); switch(prop) { case GWEN_DialogProperty_Enabled: [checkbox setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: if ([checkbox window]) { [[checkbox window] makeFirstResponder:checkbox]; } return 0; case GWEN_DialogProperty_Width: { NSRect frame = [checkbox frame]; frame.size.width = value; [checkbox setFrame:frame]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [checkbox frame]; frame.size.height = value; [checkbox setFrame:frame]; } return 0; case GWEN_DialogProperty_Value:{ if (value==0) [checkbox setState:NSOffState]; else [checkbox setState:NSOnState]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WCheckBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaCheckboxButton *checkbox; checkbox = (CocoaCheckboxButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(checkbox); switch(prop) { case GWEN_DialogProperty_Enabled: return ([checkbox isEnabled]==YES)?1:0; case GWEN_DialogProperty_Focus: if ([checkbox window]) { if ([[checkbox window] firstResponder] == checkbox) return 1; } return 0; case GWEN_DialogProperty_Width: return [checkbox frame].size.width; case GWEN_DialogProperty_Height: return [checkbox frame].size.height; case GWEN_DialogProperty_Value: return ([checkbox state]==NSOnState)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WCheckBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaCheckboxButton *checkbox; checkbox = (CocoaCheckboxButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(checkbox); switch(prop) { case GWEN_DialogProperty_Title: { NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [checkbox setTitle:stringValue]; [stringValue release]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WCheckBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaCheckboxButton *checkbox; checkbox = (CocoaCheckboxButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(checkbox); switch(prop) { case GWEN_DialogProperty_Title: return [[checkbox stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WCheckBox_Toggled_handler(NSButton *button, void* data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "Toggled"); w=(GWEN_WIDGET*)data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WCheckBox_Setup(GWEN_WIDGET *w) { CocoaCheckboxButton *checkbox; const char *s; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); //Create Button checkbox = [[[CocoaCheckboxButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 60.0, 24.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) checkbox.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) checkbox.fillY = YES; if (s && *s) { NSString *title = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [checkbox setTitle:title]; [title release]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) checkbox); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) checkbox); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WCheckBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WCheckBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WCheckBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WCheckBox_GetCharProperty); gwenActionPtr ptr = CocoaGui_WCheckBox_Toggled_handler; [checkbox setC_ActionPtr:ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/cocoa_gui.m0000644000175000017500000001534113142134462014664 00000000000000/*************************************************************************** begin : August 03 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "cocoa_gui_dialog_l.h" #include "cocoa_gui_p.h" #include #include #include #include #include #include #include #include GWEN_INHERIT(GWEN_GUI, COCOA_GUI) #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) GWEN_GUI *Cocoa_Gui_new() { GWEN_GUI *gui; COCOA_GUI *xgui; gui=GWEN_Gui_new(); GWEN_NEW_OBJECT(COCOA_GUI, xgui); GWEN_INHERIT_SETDATA(GWEN_GUI, COCOA_GUI, gui, xgui, Cocoa_Gui_FreeData); GWEN_Gui_AddFlags(gui, GWEN_GUI_FLAGS_DIALOGSUPPORTED); GWEN_Gui_UseDialogs(gui); xgui->execDialogFn=GWEN_Gui_SetExecDialogFn(gui, COCOA_Gui_ExecDialog); xgui->openDialogFn=GWEN_Gui_SetOpenDialogFn(gui, COCOA_Gui_OpenDialog); xgui->closeDialogFn=GWEN_Gui_SetCloseDialogFn(gui, COCOA_Gui_CloseDialog); xgui->runDialogFn=GWEN_Gui_SetRunDialogFn(gui, COCOA_Gui_RunDialog); xgui->getFileNameDialogFn=GWEN_Gui_SetGetFileNameFn(gui, COCOA_Gui_GetFileName); return gui; } void Cocoa_Gui_FreeData(void *bp, void *p) { COCOA_GUI *xgui; xgui=(COCOA_GUI*) p; GWEN_FREE_OBJECT(xgui); } int COCOA_Gui_ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid) { NSLog(@"ExecDialog"); int rv; rv = COCOA_Gui_OpenDialog(gui, dlg, guiid); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv = COCOA_Gui_RunDialog(gui, dlg, 1); COCOA_Gui_CloseDialog(gui, dlg); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } int COCOA_Gui_OpenDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid) { int rv; NSWindow *g; NSLog(@"OpenDialog"); CocoaGui_Dialog_Extend(dlg); rv=CocoaGui_Dialog_Setup(dlg, NULL); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); CocoaGui_Dialog_Unextend(dlg); return rv; } NSLog(@"OpenDialog Setup"); g=CocoaGui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); CocoaGui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } NSLog(@"OpenDialog GetMainWidget"); rv=GWEN_Dialog_EmitSignalToAll(dlg, GWEN_DialogEvent_TypeInit, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error initializing dialog: %d", rv); CocoaGui_Dialog_Unextend(dlg); return rv; } NSLog(@"OpenDialog EmitSignalToAll"); /* show dialog */ [g center]; [g makeKeyAndOrderFront:nil]; return 0; } int COCOA_Gui_CloseDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg) { NSWindow *g; int rv; g=CocoaGui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); CocoaGui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } /* hide dialog */ [g close]; /* send fini signal to dialog */ rv=GWEN_Dialog_EmitSignalToAll(dlg, GWEN_DialogEvent_TypeFini, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error deinitializing dialog: %d", rv); CocoaGui_Dialog_Unextend(dlg); return rv; } CocoaGui_Dialog_Unextend(dlg); return 0; } int COCOA_Gui_RunDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, int untilEnd) { int rv; rv=Cocoa_Gui_Dialog_Run(dlg, untilEnd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } int COCOA_Gui_GetFileName(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid) { char *folder=NULL; char *fileName=NULL; if (GWEN_Buffer_GetUsedBytes(pathBuffer)) { folder=strdup(GWEN_Buffer_GetStart(pathBuffer)); fileName=strchr(folder, GWEN_DIR_SEPARATOR); if (fileName) { *fileName=0; fileName++; if (*fileName==0) fileName=NULL; } } switch(fnt) { case GWEN_Gui_FileNameType_OpenFileName: case GWEN_Gui_FileNameType_OpenDirectory: { NSString *title = nil; if (caption && *caption) title = [[[NSString alloc] initWithCString:caption encoding:NSUTF8StringEncoding] autorelease]; NSOpenPanel *openPanel = [NSOpenPanel openPanel]; if (openPanel) { if (title) [openPanel setTitle:title]; [openPanel setAllowsMultipleSelection:NO]; [openPanel setCanChooseFiles:(fnt == GWEN_Gui_FileNameType_OpenFileName)]; [openPanel setCanChooseDirectories:(fnt == GWEN_Gui_FileNameType_OpenDirectory)]; NSString *pathToFolder = nil; if (fileName && *fileName) pathToFolder = [[[NSString alloc] initWithCString:fileName encoding:NSUTF8StringEncoding] autorelease]; if (pathToFolder) [openPanel setDirectory:pathToFolder]; NSInteger result = [openPanel runModal]; if (result == NSFileHandlingPanelOKButton) { NSArray *urls = [openPanel URLs]; if (urls && [urls count] > 0) { NSString *path = [[(NSURL*)[urls objectAtIndex:0] path] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; if (path && [path length]>0) { const char *filename = [path cStringUsingEncoding:NSUTF8StringEncoding]; GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); return 0; } } } } return GWEN_ERROR_USER_ABORTED; } case GWEN_Gui_FileNameType_SaveFileName: { NSString *title = nil; if (caption && *caption) title = [[[NSString alloc] initWithCString:caption encoding:NSUTF8StringEncoding] autorelease]; NSSavePanel *savePanel = [NSSavePanel savePanel]; if (savePanel) { if (title) [savePanel setTitle:title]; [savePanel setCanCreateDirectories:YES]; NSString *pathToFolder = nil; if (fileName && *fileName) pathToFolder = [[[NSString alloc] initWithCString:fileName encoding:NSUTF8StringEncoding] autorelease]; if (pathToFolder) [savePanel setDirectory:pathToFolder]; NSInteger result = [savePanel runModal]; if (result == NSFileHandlingPanelOKButton) { NSURL *url = [savePanel URL]; if (url) { NSString *path = [[url path] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; if (path && [path length]>0) { const char *filename = [path cStringUsingEncoding:NSUTF8StringEncoding]; GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); return 0; } } } } return GWEN_ERROR_USER_ABORTED; } default: break; } free(folder); return GWEN_ERROR_USER_ABORTED; } gwenhywfar-5.12.1/gui/cocoa/CocoaLabel.m0000644000175000017500000000344113142134462014716 00000000000000// // CocoaLabel.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaLabel.h" #ifndef COCOA_LABEL_MM #define COCOA_LABEL_MM @implementation CocoaLabel @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; minWidth = 0.0; } return self; } -(void) dealloc { [super dealloc]; } -(NSSize) neededTextSize { NSString *title = [self stringValue]; if (title && [title length]>0) { NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor], NSForegroundColorAttributeName, [self font], NSFontAttributeName, nil]; return [title sizeWithAttributes:attributes]; } return NSZeroSize; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; minWidth = size.width+4.0; } - (void)setStringValue:(NSString *)aString { /*remove HTML version if available*/ if (aString) { NSRange htmlRange = [aString rangeOfString:@""]; if (htmlRange.location != NSNotFound) { NSRange endHtmlRange = [aString rangeOfString:@""]; if (endHtmlRange.location != NSNotFound) { NSString *stringToUse = @""; NSRange cutRange = NSUnionRange(htmlRange, endHtmlRange); stringToUse = [aString stringByReplacingCharactersInRange:cutRange withString:@""]; [super setStringValue:stringToUse]; [self computeMinWidth]; return; } } } [super setStringValue:aString]; [self computeMinWidth]; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor yellowColor] set]; NSRectFill(dirtyRect); [super drawRect:dirtyRect]; }*/ #pragma mark Protocol Methods - (NSSize) minSize { return NSMakeSize(minWidth, 17.0); } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaPopUpButton.h0000644000175000017500000000110113142134474016123 00000000000000// // CocoaPopUpButton.h // // // Created by Samuel Strupp on 10.08.10. // #ifndef COCOA_POPUP_BUTTON_H #define COCOA_POPUP_BUTTON_H #import #import "CocoaGwenGUIProtocol.h" typedef void (*gwenPopUpActionPtr)(NSPopUpButton *button, void *data); @interface CocoaPopUpButton : NSPopUpButton { gwenPopUpActionPtr c_actionPtr; void *c_actionData; BOOL fillX; BOOL fillY; CGFloat minWidth; } @property BOOL fillX; @property BOOL fillY; -(void) setC_PopUpActionPtr:(gwenPopUpActionPtr)ptr Data:(void *)data; @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaTextBrowser.m0000644000175000017500000000423713142134462016173 00000000000000// // CocoaTextBrowser.m // // // Created by Samuel Strupp on 18.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaTextBrowser.h" @implementation CocoaTextBrowser @synthesize fillX; @synthesize fillY; - (id) initWithFrame:(NSRect)frameRect frameName:(NSString *)frameName groupName:(NSString *)groupName { self = [super initWithFrame:frameRect frameName:frameName groupName:groupName]; if (self) { fillX = NO; fillY = NO; loadedString = nil; //[[[self mainFrame] frameView] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; } return self; } -(void) dealloc { [loadedString release]; [super dealloc]; } #pragma mark Special Methods -(void) setStringValue:(NSString*)value BasePath:(NSString*)base { if (value) { [loadedString release]; loadedString = [value retain]; NSString *basePath = base; if (!basePath) { basePath = [[NSBundle mainBundle] resourcePath]; if (!basePath) basePath = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent]; } NSURL *baseURL = [NSURL fileURLWithPath:basePath]; if (value) { NSRange htmlRange = [value rangeOfString:@""]; if (htmlRange.location != NSNotFound) { NSRange endHtmlRange = [value rangeOfString:@""]; if (endHtmlRange.location != NSNotFound) { NSString *stringToUse = @""; NSRange useRange = NSUnionRange(htmlRange, endHtmlRange); stringToUse = [value substringWithRange:useRange]; [[self mainFrame] loadHTMLString:stringToUse baseURL:baseURL]; return; } } [[self mainFrame] loadHTMLString:value baseURL:baseURL]; } } else { [loadedString release]; loadedString = nil; } } -(void) setStringValue:(NSString*)value { [self setStringValue:value BasePath:nil]; } -(NSString*) stringValue { return loadedString; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(30.0, 30.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } - (void)setFrame:(NSRect)frameRect { if (frameRect.size.width < 0.0) frameRect.size.width = 0.0; if (frameRect.size.height < 0.0) frameRect.size.height = 0.0; [super setFrame:frameRect]; } @end gwenhywfar-5.12.1/gui/cocoa/CocoaLineTextField.m0000644000175000017500000000310013142134462016367 00000000000000// // CocoaLineTextField.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaLineTextField.h" #ifndef COCOA_LINE_TEXTFIELD_MM #define COCOA_LINE_TEXTFIELD_MM @implementation CocoaLineTextField - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setTarget:self]; [self setAction:@selector(textChanged:)]; c_actionPtr = nil; c_actionData = nil; minWidth = 32.0; c_textChangedActionPtr = nil; c_textChangedActionData = nil; } return self; } -(void) dealloc { [super dealloc]; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; if (size.width > 32.0) minWidth = size.width; else minWidth = 32.0; } -(void) setC_ActionPtr:(gwenTextFieldActionPtr)ptr Data:(void*)data { c_actionPtr = ptr; c_actionData = data; } -(void) setC_TextChanged_ActionPtr:(gwenTextFieldActionPtr)ptr Data:(void*)data { c_textChangedActionPtr = ptr; c_textChangedActionData = data; } -(void) textChanged:(id)sender { if (c_actionPtr) { c_actionPtr(self, c_actionData); } } - (void)textDidChange:(NSNotification *)aNotification { //NSLog(@"textDidChange"); if (c_textChangedActionPtr) { c_textChangedActionPtr(self, c_textChangedActionData); } [super textDidChange:aNotification]; } - (void)setStringValue:(NSString *)aString { [super setStringValue:aString]; //damit hebeln wir die automatische Größen Berechnung vom CocoaLabel aus. } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(minWidth, 22.0); } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaGridLayout.h0000644000175000017500000000071213142134474015756 00000000000000// // CocoaGridLayout.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaGridLayout : NSView { NSMutableArray *subviewsInOrder; BOOL fillX; BOOL fillY; NSInteger columns; NSInteger rows; } @property BOOL fillX; @property BOOL fillY; @property NSInteger columns; @property NSInteger rows; -(void) addLayoutSubview:(NSView *)new_subview ; @end gwenhywfar-5.12.1/gui/cocoa/w_textedit.mm0000644000175000017500000001432513142134462015272 00000000000000/*************************************************************************** begin : August 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaLineTextField.h" static GWENHYWFAR_CB int CocoaGui_WTextEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Enabled: [textField setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: if ([textField window]) { [[textField window] makeFirstResponder:textField]; } return 0; case GWEN_DialogProperty_Width: { NSRect frame = [textField frame]; frame.size.width = value; [textField setFrame:frame]; } return 0; case GWEN_DialogProperty_Height:{ NSRect frame = [textField frame]; frame.size.height = value; [textField setFrame:frame]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WTextEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Enabled: return ([textField isEnabled])?1:0; case GWEN_DialogProperty_Focus: if ([textField window]) { if ([[textField window] firstResponder] == textField) return 1; } return 0; case GWEN_DialogProperty_Width: return [textField frame].size.width; case GWEN_DialogProperty_Height: return [textField frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WTextEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Value:{ NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [textField setStringValue:stringValue]; [stringValue release]; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WTextEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Title: return [[textField stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WTextEdit_End_Editing_text_handler(NSTextField *textField, void* data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } static void CocoaGui_WTextEdit_Changed_text_handler(NSTextField *textField, void* data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WTextEdit_Setup(GWEN_WIDGET *w) { CocoaLineTextField *textField; const char *s; uint32_t flags; GWEN_WIDGET *wParent; //gulong changed_handler_id; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ textField = [[[CocoaLineTextField alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 22.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) textField.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) textField.fillY = YES; //[textField setBordered:YES]; [textField setEditable:YES]; if (s && *s) { NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [textField setStringValue:stringValue]; [stringValue release]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) textField); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) textField); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WTextEdit_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WTextEdit_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WTextEdit_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WTextEdit_GetCharProperty); gwenTextFieldActionPtr ptr = CocoaGui_WTextEdit_End_Editing_text_handler; [textField setC_ActionPtr:ptr Data:w]; gwenTextFieldActionPtr changed_ptr = CocoaGui_WTextEdit_Changed_text_handler; [textField setC_TextChanged_ActionPtr:changed_ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/cocoa_gui_p.h0000664000175000017500000000275513265727173015222 00000000000000/*************************************************************************** begin : August 03 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef COCOA_GUI_P_H #define COCOA_GUI_P_H #include "cocoa_gui.h" typedef struct COCOA_GUI COCOA_GUI; struct COCOA_GUI { GWEN_GUI_EXEC_DIALOG_FN execDialogFn; GWEN_GUI_OPEN_DIALOG_FN openDialogFn; GWEN_GUI_CLOSE_DIALOG_FN closeDialogFn; GWEN_GUI_RUN_DIALOG_FN runDialogFn; GWEN_GUI_GET_FILENAME_FN getFileNameDialogFn; }; static GWENHYWFAR_CB void Cocoa_Gui_FreeData(void *bp, void *p); static GWENHYWFAR_CB int COCOA_Gui_ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static GWENHYWFAR_CB int COCOA_Gui_OpenDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static GWENHYWFAR_CB int COCOA_Gui_CloseDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg); static GWENHYWFAR_CB int COCOA_Gui_RunDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, int timeout); static GWENHYWFAR_CB int COCOA_Gui_GetFileName(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); #endif gwenhywfar-5.12.1/gui/cocoa/w_stack.mm0000644000175000017500000001206513142134462014544 00000000000000/*************************************************************************** begin : August 19 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ /* * Note: This is a special use case for gtk_notebook. * To use it as a WidgetStack we have to disable drawing od tabs * and borders by calling: * - gtk_notebook_set_show_tabs(GTK_NOTEBOOK(g), FALSE); * - gtk_notebook_set_show_border(GTK_NOTEBOOK(g), FALSE); * */ static GWENHYWFAR_CB int CocoaGui_WStack_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaTabView *stackView; stackView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(stackView); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: { NSRect frame = [stackView frame]; frame.size.width = value; [stackView setFrame:frame]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [stackView frame]; frame.size.height = value; [stackView setFrame:frame]; } return 0; case GWEN_DialogProperty_Value: if (value >= 0 && value < [stackView numberOfTabViewItems]) { [stackView selectTabViewItemAtIndex:value]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WStack_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaTabView *stackView; stackView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(stackView); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: return [stackView frame].size.width; case GWEN_DialogProperty_Height: return [stackView frame].size.height; case GWEN_DialogProperty_Value: return [stackView indexOfTabViewItem:[stackView selectedTabViewItem]]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WStack_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaTabView *stackView; stackView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(stackView); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WStack_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaTabView *stackView; stackView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(stackView); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WStack_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CocoaTabView *stackView; stackView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(stackView); NSView *subview =(NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(subview); NSTabViewItem *item = [[NSTabViewItem alloc] init]; [item setView:subview]; [stackView addTabViewItem:item]; [item release]; return 0; } int CocoaGui_WStack_Setup(GWEN_WIDGET *w) { CocoaTabView *stackView; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); stackView = [[[CocoaTabView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 100.0)] autorelease]; [stackView setTabViewType:NSNoTabsNoBorder]; if (flags & GWEN_WIDGET_FLAGS_FILLX) stackView.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) stackView.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) stackView); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) stackView); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WStack_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WStack_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WStack_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WStack_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WStack_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaComboBox.h0000644000175000017500000000107513142134474015406 00000000000000// // CocoaComboBox.h // // // Created by Samuel Strupp on 10.08.10. // #ifndef COCOA_COMBOBOX_H #define COCOA_COMBOBOX_H #import #import "CocoaGwenGUIProtocol.h" typedef void (*gwenComboBoxActionPtr)(NSComboBox *comboBox, void *data); @interface CocoaComboBox : NSComboBox { BOOL fillX; BOOL fillY; CGFloat minWidth; gwenComboBoxActionPtr c_actionPtr; void *c_actionData; } @property BOOL fillX; @property BOOL fillY; -(void) setC_ComboBoxActionPtr:(gwenComboBoxActionPtr)ptr Data:(void *)data; @end #endif gwenhywfar-5.12.1/gui/cocoa/w_textbrowser.mm0000644000175000017500000001260413142134462016026 00000000000000/*************************************************************************** begin : Aug 18 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaTextBrowser.h" static GWENHYWFAR_CB int CocoaGui_WTextBrowser_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaTextBrowser *textBrowser; textBrowser = (CocoaTextBrowser*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(textBrowser); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: { NSRect frame = [textBrowser frame]; frame.size.width = value; [textBrowser setFrame:frame]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [textBrowser frame]; frame.size.height = value; [textBrowser setFrame:frame]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WTextBrowser_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaTextBrowser *textBrowser; textBrowser = (CocoaTextBrowser*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(textBrowser); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: return [textBrowser frame].size.width; case GWEN_DialogProperty_Height: return [textBrowser frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WTextBrowser_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaTextBrowser *textBrowser; textBrowser = (CocoaTextBrowser*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(textBrowser); switch(prop) { case GWEN_DialogProperty_Value: { if (value && *value) { GWEN_STRINGLIST *sl; //take the first media path as base url sl=GWEN_Dialog_GetMediaPaths(GWEN_Widget_GetDialog(w)); const char * basePath = GWEN_StringListEntry_Data(GWEN_StringList_FirstEntry(sl)); NSString *basePathString = nil; if (basePath && *basePath) { basePathString = [[NSString alloc] initWithCString:basePath encoding:NSUTF8StringEncoding]; } NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [textBrowser setStringValue:stringValue BasePath:basePathString]; [stringValue release]; [basePathString release]; } return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WTextBrowser_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaTextBrowser *textBrowser; textBrowser = (CocoaTextBrowser*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(textBrowser); switch(prop) { case GWEN_DialogProperty_Value: { NSString* stringValue = [textBrowser stringValue]; if (stringValue && [stringValue length] > 0) return [stringValue cStringUsingEncoding:NSUTF8StringEncoding]; return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int CocoaGui_WTextBrowser_Setup(GWEN_WIDGET *w) { CocoaTextBrowser *textBrowser; const char *s; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); textBrowser = [[[CocoaTextBrowser alloc] initWithFrame:NSMakeRect(0.0, 0.0, 30.0, 30.0) frameName:nil groupName:nil] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) textBrowser.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) textBrowser.fillY = YES; if (s && *s) { NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [textBrowser setStringValue:stringValue]; [stringValue release]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) textBrowser); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) textBrowser); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WTextBrowser_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WTextBrowser_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WTextBrowser_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WTextBrowser_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaSpinbox.h0000644000175000017500000000201013142134474015306 00000000000000// // CocoaSpinbox.h // // // Created by Samuel Strupp on 19.08.10. // #ifndef COCOA_SPINBOX_H #define COCOA_SPINBOX_H #import #import "CocoaGwenGUIProtocol.h" typedef void (*gwenSpinBoxActionPtr)(NSView *spinbox, void *data); @interface CocoaSpinbox : NSView { NSStepper *stepper; NSTextField *textfield; CGFloat minWidth; BOOL fillX; BOOL fillY; NSInteger minValue; NSInteger maxValue; gwenSpinBoxActionPtr c_actionPtr; void *c_actionData; } @property BOOL fillX; @property BOOL fillY; -(void) setC_ActionPtr:(gwenSpinBoxActionPtr)ptr Data:(void *)data; -(void) makeFirstResponder; -(BOOL) isFirstResponder; -(void) setEnabled:(BOOL)value; -(BOOL) isEnabled; -(void) setIntegerValue:(NSInteger)new_value; -(NSInteger) integerValue; -(void) setMinValue:(NSInteger)new_min_value; -(NSInteger) minValue; -(void) setMaxValue:(NSInteger)new_max_value; -(NSInteger) maxValue; -(void)setStringValue:(NSString *)aString; -(NSString *) stringValue; @end #endif gwenhywfar-5.12.1/gui/cocoa/w_label.mm0000644000175000017500000001224113142134462014512 00000000000000/*************************************************************************** begin : August 09 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaLabel.h" static GWENHYWFAR_CB int CocoaGui_WLabel_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaLabel *labelTextField; labelTextField=(CocoaLabel*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(labelTextField); switch(prop) { case GWEN_DialogProperty_Enabled: [labelTextField setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: if ([labelTextField window]) { [[labelTextField window] makeFirstResponder:labelTextField]; } return 0; case GWEN_DialogProperty_Width: { NSRect frame = [labelTextField frame]; frame.size.width = value; [labelTextField setFrame:frame]; } return 0; case GWEN_DialogProperty_Height:{ NSRect frame = [labelTextField frame]; frame.size.height = value; [labelTextField setFrame:frame]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WLabel_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaLabel *labelTextField; labelTextField=(CocoaLabel*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(labelTextField); switch(prop) { case GWEN_DialogProperty_Enabled: return ([labelTextField isEnabled])?1:0; case GWEN_DialogProperty_Focus: if ([labelTextField window]) { if ([[labelTextField window] firstResponder] == labelTextField) { return 1; } } return 0; case GWEN_DialogProperty_Width: return [labelTextField frame].size.width; case GWEN_DialogProperty_Height: return [labelTextField frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WLabel_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaLabel *labelTextField; labelTextField=(CocoaLabel*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(labelTextField); switch(prop) { case GWEN_DialogProperty_Title: { NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [labelTextField setStringValue:stringValue]; NSLog(@"%@", stringValue); [stringValue release]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WLabel_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaLabel *labelTextField; labelTextField=(CocoaLabel*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(labelTextField); switch(prop) { case GWEN_DialogProperty_Title: return [[labelTextField stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int CocoaGui_WLabel_Setup(GWEN_WIDGET *w) { CocoaLabel *labelTextField; const char *s; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); labelTextField = [[[CocoaLabel alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 24.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) labelTextField.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) labelTextField.fillY = YES; [labelTextField setDrawsBackground:NO]; [labelTextField setBordered:NO]; [labelTextField setEditable:NO]; if (s && *s) { NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [labelTextField setStringValue:stringValue]; //NSLog(@"%@", stringValue); [stringValue release]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) labelTextField); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) labelTextField); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WLabel_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WLabel_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WLabel_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WLabel_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/w_radiobutton.mm0000644000175000017500000001467413142134462016001 00000000000000/*************************************************************************** begin : Aug 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaRadioButton.h" static GWENHYWFAR_CB int CocoaGui_WRadioButton_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { NSButton *radioButton; radioButton = (NSButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(radioButton); switch(prop) { case GWEN_DialogProperty_Enabled: [radioButton setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: if ([radioButton window]) { [[radioButton window] makeFirstResponder:radioButton]; } return 0; case GWEN_DialogProperty_Width: { NSRect frame = [radioButton frame]; frame.size.width = value; [radioButton setFrame:frame]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [radioButton frame]; frame.size.height = value; [radioButton setFrame:frame]; } return 0; case GWEN_DialogProperty_Value:{ if (value==0) [radioButton setState:NSOffState]; else [radioButton setState:NSOnState]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WRadioButton_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { NSButton *radioButton; radioButton = (NSButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(radioButton); switch(prop) { case GWEN_DialogProperty_Enabled: return ([radioButton isEnabled]==YES)?1:0; case GWEN_DialogProperty_Focus: if ([radioButton window]) { if ([[radioButton window] firstResponder] == radioButton) return 1; } return 0; case GWEN_DialogProperty_Width: return [radioButton frame].size.width; case GWEN_DialogProperty_Height: return [radioButton frame].size.height; case GWEN_DialogProperty_Value: return ([radioButton state]==NSOnState)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WRadioButton_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { NSButton *radioButton; radioButton = (NSButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(radioButton); switch(prop) { case GWEN_DialogProperty_Title: { NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [radioButton setTitle:stringValue]; [stringValue release]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WRadioButton_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { NSButton *radioButton; radioButton = (NSButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(radioButton); switch(prop) { case GWEN_DialogProperty_Title: return [[radioButton stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WRadioButton_Toggled_handler(NSButton *button, void* data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "Toggled"); w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WRadioButton_Setup(GWEN_WIDGET *w) { CocoaRadioButton *radioButton; const char *s; uint32_t flags; GWEN_WIDGET *wParent; GWEN_WIDGET *wT; int groupId; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); groupId=GWEN_Widget_GetGroupId(w); s=GWEN_Widget_GetText(w, 0); //Create Button radioButton = [[[CocoaRadioButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 60.0, 24.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) radioButton.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) radioButton.fillY = YES; if (s && *s) { NSString *title = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [radioButton setTitle:title]; [title release]; } /* get root widget */ wT=wParent; while(GWEN_Widget_Tree_GetParent(wT)) wT=GWEN_Widget_Tree_GetParent(wT); // get first radio button of the same group while(wT) { if ((GWEN_Widget_GetType(wT)==GWEN_Widget_TypeRadioButton) && GWEN_Widget_GetGroupId(wT)==groupId) break; wT=GWEN_Widget_Tree_GetBelow(wT); } if (wT && wT!=w) { CocoaRadioButton *sameGroupRadioButton = (CocoaRadioButton*)(GWEN_Widget_GetImplData(wT, COCOA_DIALOG_WIDGET_REAL)); [radioButton setGroupManager:[sameGroupRadioButton getGroupManager]]; } else { [radioButton createNewGroupManagerWithGroupID:groupId]; } // set pointers GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) radioButton); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) radioButton); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WRadioButton_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WRadioButton_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WRadioButton_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WRadioButton_GetCharProperty); gwenActionPtr ptr = CocoaGui_WRadioButton_Toggled_handler; [radioButton setC_ActionPtr:ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/Makefile.in0000644000175000017500000011013615032533614014623 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = gwen-cocoa-test$(EXEEXT) subdir = gui/cocoa ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgwengui_cocoa_la_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libgwengui_cocoa_la_OBJECTS = CocoaButton.lo CocoaCheckboxButton.lo \ CocoaComboBox.lo CocoaGridLayout.lo CocoaGroupBox.lo \ cocoa_gui_dialog.lo cocoa_gui.lo CocoaHLayout.lo \ CocoaHLineView.lo CocoaLabel.lo CocoaLineTextField.lo \ CocoaListBox.lo CocoaPopUpButton.lo CocoaProgressbar.lo \ CocoaRadioButton.lo CocoaScrollBox.lo CocoaSpacer.lo \ CocoaSpinbox.lo CocoaTabView.lo CocoaTextBrowser.lo \ CocoaVLayout.lo CocoaVLineView.lo CocoaWindowContentView.lo \ CocoaWindow.lo libgwengui_cocoa_la_OBJECTS = $(am_libgwengui_cocoa_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_gwen_cocoa_test_OBJECTS = libtest.$(OBJEXT) gwen_cocoa_test_OBJECTS = $(am_gwen_cocoa_test_OBJECTS) gwen_cocoa_test_DEPENDENCIES = libgwengui-cocoa.la \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) \ $(builddir)/../testdialogs/libgwengui-test.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/CocoaButton.Plo \ ./$(DEPDIR)/CocoaCheckboxButton.Plo \ ./$(DEPDIR)/CocoaComboBox.Plo ./$(DEPDIR)/CocoaGridLayout.Plo \ ./$(DEPDIR)/CocoaGroupBox.Plo ./$(DEPDIR)/CocoaHLayout.Plo \ ./$(DEPDIR)/CocoaHLineView.Plo ./$(DEPDIR)/CocoaLabel.Plo \ ./$(DEPDIR)/CocoaLineTextField.Plo \ ./$(DEPDIR)/CocoaListBox.Plo ./$(DEPDIR)/CocoaPopUpButton.Plo \ ./$(DEPDIR)/CocoaProgressbar.Plo \ ./$(DEPDIR)/CocoaRadioButton.Plo \ ./$(DEPDIR)/CocoaScrollBox.Plo ./$(DEPDIR)/CocoaSpacer.Plo \ ./$(DEPDIR)/CocoaSpinbox.Plo ./$(DEPDIR)/CocoaTabView.Plo \ ./$(DEPDIR)/CocoaTextBrowser.Plo ./$(DEPDIR)/CocoaVLayout.Plo \ ./$(DEPDIR)/CocoaVLineView.Plo ./$(DEPDIR)/CocoaWindow.Plo \ ./$(DEPDIR)/CocoaWindowContentView.Plo \ ./$(DEPDIR)/cocoa_gui.Plo ./$(DEPDIR)/cocoa_gui_dialog.Plo \ ./$(DEPDIR)/libtest.Po am__mv = mv -f OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) LTOBJCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_OBJCFLAGS) $(OBJCFLAGS) AM_V_OBJC = $(am__v_OBJC_@AM_V@) am__v_OBJC_ = $(am__v_OBJC_@AM_DEFAULT_V@) am__v_OBJC_0 = @echo " OBJC " $@; am__v_OBJC_1 = OBJCLD = $(OBJC) OBJCLINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_OBJCLD = $(am__v_OBJCLD_@AM_V@) am__v_OBJCLD_ = $(am__v_OBJCLD_@AM_DEFAULT_V@) am__v_OBJCLD_0 = @echo " OBJCLD " $@; am__v_OBJCLD_1 = SOURCES = $(libgwengui_cocoa_la_SOURCES) $(gwen_cocoa_test_SOURCES) DIST_SOURCES = $(libgwengui_cocoa_la_SOURCES) \ $(gwen_cocoa_test_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DBUILDING_COCOA_GUI -DPACKAGE=\"$(PACKAGE)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) $(COCOA_CFLAGS) \ @visibility_cflags@ #AM_OBJCFLAGS= -x objective-c lib_LTLIBRARIES = libgwengui-cocoa.la libgwengui_cocoa_la_LIBADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(COCOA_FRAMEWORK) $(FOUNDATION_FRAMEWORK) $(APPKIT_FRAMEWORK) $(COREDATA_FRAMEWORK) $(WEBKIT_FRAMEWORK) \ -lobjc #libgwengui_cocoa_la_LDFLAGS= noinst_HEADERS = \ CocoaButton.h \ CocoaCheckboxButton.h \ CocoaComboBox.h \ CocoaGridLayout.h \ CocoaGroupBox.h \ cocoa_gui_dialog_l.h \ cocoa_gui_dialog_p.h \ cocoa_gui.h \ cocoa_gui_p.h \ CocoaGwenGUIProtocol.h \ CocoaHLayout.h \ CocoaHLineView.h \ CocoaLabel.h \ CocoaLineTextField.h \ CocoaListBox.h \ CocoaPopUpButton.h \ CocoaProgressbar.h \ CocoaRadioButton.h \ CocoaScrollBox.h \ CocoaSpacer.h \ CocoaSpinbox.h \ CocoaTabView.h \ CocoaTextBrowser.h \ CocoaVLayout.h \ CocoaVLineView.h \ CocoaWindowContentView.h \ CocoaWindow.h libgwengui_cocoa_la_SOURCES = \ CocoaButton.m \ CocoaCheckboxButton.m \ CocoaComboBox.m \ CocoaGridLayout.m \ CocoaGroupBox.m \ cocoa_gui_dialog.m \ cocoa_gui.m \ CocoaHLayout.m \ CocoaHLineView.m \ CocoaLabel.m \ CocoaLineTextField.m \ CocoaListBox.m \ CocoaPopUpButton.m \ CocoaProgressbar.m \ CocoaRadioButton.m \ CocoaScrollBox.m \ CocoaSpacer.m \ CocoaSpinbox.m \ CocoaTabView.m \ CocoaTextBrowser.m \ CocoaVLayout.m \ CocoaVLineView.m \ CocoaWindowContentView.m \ CocoaWindow.m iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-cocoa iheader_HEADERS = \ cocoa_gui.h gwen_cocoa_test_SOURCES = libtest.m #gwen_cocoa_test_LDFLAGS= gwen_cocoa_test_LDADD = libgwengui-cocoa.la $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(COCOA_FRAMEWORK) $(FOUNDATION_FRAMEWORK) $(APPKIT_FRAMEWORK) $(COREDATA_FRAMEWORK) $(WEBKIT_FRAMEWORK) \ -lobjc \ $(builddir)/../testdialogs/libgwengui-test.la EXTRA_DIST = \ w_dialog.mm \ w_label.mm \ w_vlayout.mm \ w_hlayout.mm \ w_pushbutton.mm \ w_lineedit.mm \ w_textedit.mm \ w_checkbox.mm \ w_hline.mm \ w_vline.mm \ w_progressbar.mm \ w_radiobutton.mm \ w_tabbook.mm \ w_groupbox.mm \ w_combobox.mm \ w_gridlayout.mm \ w_hspacer.mm \ w_vspacer.mm \ w_listbox.mm \ w_scrollarea.mm \ w_textbrowser.mm \ w_stack.mm \ w_spinbox.mm all: all-am .SUFFIXES: .SUFFIXES: .lo .m .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/cocoa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/cocoa/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-cocoa.la: $(libgwengui_cocoa_la_OBJECTS) $(libgwengui_cocoa_la_DEPENDENCIES) $(EXTRA_libgwengui_cocoa_la_DEPENDENCIES) $(AM_V_OBJCLD)$(OBJCLINK) -rpath $(libdir) $(libgwengui_cocoa_la_OBJECTS) $(libgwengui_cocoa_la_LIBADD) $(LIBS) gwen-cocoa-test$(EXEEXT): $(gwen_cocoa_test_OBJECTS) $(gwen_cocoa_test_DEPENDENCIES) $(EXTRA_gwen_cocoa_test_DEPENDENCIES) @rm -f gwen-cocoa-test$(EXEEXT) $(AM_V_OBJCLD)$(OBJCLINK) $(gwen_cocoa_test_OBJECTS) $(gwen_cocoa_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaButton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaCheckboxButton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaComboBox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaGridLayout.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaGroupBox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaHLayout.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaHLineView.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaLabel.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaLineTextField.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaListBox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaPopUpButton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaProgressbar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaRadioButton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaScrollBox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaSpacer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaSpinbox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaTabView.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaTextBrowser.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaVLayout.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaVLineView.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaWindow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CocoaWindowContentView.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cocoa_gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cocoa_gui_dialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .m.o: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ $< .m.obj: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .m.lo: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/CocoaButton.Plo -rm -f ./$(DEPDIR)/CocoaCheckboxButton.Plo -rm -f ./$(DEPDIR)/CocoaComboBox.Plo -rm -f ./$(DEPDIR)/CocoaGridLayout.Plo -rm -f ./$(DEPDIR)/CocoaGroupBox.Plo -rm -f ./$(DEPDIR)/CocoaHLayout.Plo -rm -f ./$(DEPDIR)/CocoaHLineView.Plo -rm -f ./$(DEPDIR)/CocoaLabel.Plo -rm -f ./$(DEPDIR)/CocoaLineTextField.Plo -rm -f ./$(DEPDIR)/CocoaListBox.Plo -rm -f ./$(DEPDIR)/CocoaPopUpButton.Plo -rm -f ./$(DEPDIR)/CocoaProgressbar.Plo -rm -f ./$(DEPDIR)/CocoaRadioButton.Plo -rm -f ./$(DEPDIR)/CocoaScrollBox.Plo -rm -f ./$(DEPDIR)/CocoaSpacer.Plo -rm -f ./$(DEPDIR)/CocoaSpinbox.Plo -rm -f ./$(DEPDIR)/CocoaTabView.Plo -rm -f ./$(DEPDIR)/CocoaTextBrowser.Plo -rm -f ./$(DEPDIR)/CocoaVLayout.Plo -rm -f ./$(DEPDIR)/CocoaVLineView.Plo -rm -f ./$(DEPDIR)/CocoaWindow.Plo -rm -f ./$(DEPDIR)/CocoaWindowContentView.Plo -rm -f ./$(DEPDIR)/cocoa_gui.Plo -rm -f ./$(DEPDIR)/cocoa_gui_dialog.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iheaderHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/CocoaButton.Plo -rm -f ./$(DEPDIR)/CocoaCheckboxButton.Plo -rm -f ./$(DEPDIR)/CocoaComboBox.Plo -rm -f ./$(DEPDIR)/CocoaGridLayout.Plo -rm -f ./$(DEPDIR)/CocoaGroupBox.Plo -rm -f ./$(DEPDIR)/CocoaHLayout.Plo -rm -f ./$(DEPDIR)/CocoaHLineView.Plo -rm -f ./$(DEPDIR)/CocoaLabel.Plo -rm -f ./$(DEPDIR)/CocoaLineTextField.Plo -rm -f ./$(DEPDIR)/CocoaListBox.Plo -rm -f ./$(DEPDIR)/CocoaPopUpButton.Plo -rm -f ./$(DEPDIR)/CocoaProgressbar.Plo -rm -f ./$(DEPDIR)/CocoaRadioButton.Plo -rm -f ./$(DEPDIR)/CocoaScrollBox.Plo -rm -f ./$(DEPDIR)/CocoaSpacer.Plo -rm -f ./$(DEPDIR)/CocoaSpinbox.Plo -rm -f ./$(DEPDIR)/CocoaTabView.Plo -rm -f ./$(DEPDIR)/CocoaTextBrowser.Plo -rm -f ./$(DEPDIR)/CocoaVLayout.Plo -rm -f ./$(DEPDIR)/CocoaVLineView.Plo -rm -f ./$(DEPDIR)/CocoaWindow.Plo -rm -f ./$(DEPDIR)/CocoaWindowContentView.Plo -rm -f ./$(DEPDIR)/cocoa_gui.Plo -rm -f ./$(DEPDIR)/cocoa_gui_dialog.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iheaderHEADERS uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-iheaderHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-iheaderHEADERS \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/cocoa/cocoa_gui_dialog_p.h0000664000175000017500000000502013265727205016521 00000000000000/*************************************************************************** begin : August 09 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef COCOA_GUI_DIALOG_P_H #define COCOA_GUI_DIALOG_P_H #include "cocoa_gui_dialog_l.h" #import #import #import "CocoaWindow.h" typedef struct COCOA_GUI_DIALOG COCOA_GUI_DIALOG; struct COCOA_GUI_DIALOG { GWEN_DIALOG_SETINTPROPERTY_FN setIntPropertyFn; GWEN_DIALOG_GETINTPROPERTY_FN getIntPropertyFn; GWEN_DIALOG_SETCHARPROPERTY_FN setCharPropertyFn; GWEN_DIALOG_GETCHARPROPERTY_FN getCharPropertyFn; CocoaWindow *mainWindow; /*int response; NSRunLoop *loop; int destroyed;*/ //BOOL modalSessionStarted; //NSModalSession session; void *unmap_handler; void *destroy_handler; void *delete_handler; }; static void GWENHYWFAR_CB CocoaGui_Dialog_FreeData(void *bp, void *p); static int CocoaGui_Dialog_SetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); static int CocoaGui_Dialog_GetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); static int CocoaGui_Dialog_SetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); static const char *CocoaGui_Dialog_GetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); static int CocoaGui_Dialog_SetupTree(GWEN_WIDGET *w); #endif gwenhywfar-5.12.1/gui/cocoa/CocoaWindow.m0000644000175000017500000000112313142134462015141 00000000000000// // CocoaLabel.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaWindow.h" #ifndef COCOA_WINDOW_MM #define COCOA_WINDOW_MM @implementation CocoaWindow - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation { self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; if (self) { } return self; } -(void) dealloc { [super dealloc]; } @end #endif gwenhywfar-5.12.1/gui/cocoa/w_dialog.mm0000644000175000017500000001340213142134462014672 00000000000000/*************************************************************************** begin : August 09 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaWindow.h" #import "CocoaWindowContentView.h" static GWENHYWFAR_CB int CocoaGui_WDialog_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { NSWindow *window = nil; window=(NSWindow*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(window); if (window) { switch(prop) { case GWEN_DialogProperty_Enabled: // just ignore return 0; case GWEN_DialogProperty_Focus: //[window makeKeyAndOrderFront:nil]; return 0; case GWEN_DialogProperty_Width: { NSLog(@"setWidth %i", value); NSRect frame = [window frame]; frame.size.width = value; [window setFrame:frame display:YES]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [window frame]; frame.size.height = value; [window setFrame:frame display:YES]; } return 0; default: break; } } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WDialog_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { NSWindow *window = nil; window=(NSWindow*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(window); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return [window isKeyWindow]; case GWEN_DialogProperty_Width: return [window frame].size.width; case GWEN_DialogProperty_Height: return [window frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WDialog_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { NSWindow *window = nil; NSLog(@"CocoaGui_WDialog_SetCharProperty"); window=(NSWindow*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(window); switch(prop) { case GWEN_DialogProperty_Title: { NSString *newTitle = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [window setTitle:newTitle]; [newTitle release]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WDialog_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { NSWindow *window = nil; window=(NSWindow*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(window); switch(prop) { case GWEN_DialogProperty_Title: return [[window title] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WDialog_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { NSLog(@"CocoaGui_WDialog_AddChildGuiWidget"); NSWindow *window = nil; window=(NSWindow*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(window); NSView *subview = (NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(subview); NSRect bounds = [[window contentView] bounds]; [subview setFrame:bounds]; [subview setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; CocoaWindowContentView *contentView = (CocoaWindowContentView*)[window contentView]; [contentView addLayoutSubview:subview]; return 0; } int CocoaGui_WDialog_Setup(GWEN_WIDGET *w) { CocoaWindow *newWindow; const char *s; uint32_t flags; flags=GWEN_Widget_GetFlags(w); s=GWEN_Widget_GetText(w, 0); newWindow=[[CocoaWindow alloc] initWithContentRect:NSMakeRect(50.0, 50.0, 400.0, 200.0) styleMask:NSTitledWindowMask/*|NSClosableWindowMask*/|NSResizableWindowMask backing:NSBackingStoreBuffered defer:YES]; [newWindow setReleasedWhenClosed:NO]; CocoaWindowContentView *newContentView = [[CocoaWindowContentView alloc] initWithFrame:[[newWindow contentView] frame]]; [newContentView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; [newWindow setContentView:newContentView]; [newContentView release]; NSLog(@"getWindow Title"); if (s && *s) { //DBG_WARN(GWEN_LOGDOMAIN, "String s = (%s)",s ); NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; NSLog(@"Window Title = %@", stringValue); [newWindow setTitle:stringValue]; [stringValue release]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) newWindow); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) newWindow); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WDialog_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WDialog_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WDialog_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WDialog_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WDialog_AddChildGuiWidget); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaListBox.h0000644000175000017500000000172613142134474015265 00000000000000// // CocoaListBox.h // // // Created by Samuel Strupp on 17.08.10. // #import #import "CocoaGwenGUIProtocol.h" typedef void (*gwenListBoxActionPtr)(NSTableView *listbox, void *data); @interface CocoaListBox : NSTableView { gwenListBoxActionPtr c_actionPtr; void *c_actionData; BOOL fillX; BOOL fillY; NSMutableArray *dataArray; } @property BOOL fillX; @property BOOL fillY; -(void) setC_ActionPtr:(gwenListBoxActionPtr)ptr Data:(void *)data; -(void) setTitelsAndCreateColumns:(NSString *)titleString; -(NSString *) titlesString; -(void) addDataRowString:(NSString *)dataRowString; -(NSString *) dataRowStringForRow:(NSUInteger)index; -(void) clearDataRows; -(BOOL) setColumnWidthTo:(NSInteger)widthInPixels forColumn:(NSInteger)index; -(NSInteger) widthOfColumn:(NSInteger)index; -(BOOL) setSortOrderTo:(BOOL)ascending ForColumnWithIndex:(NSUInteger)index; -(NSInteger) sortOrderForColumnAtIndex:(NSUInteger)index; @end gwenhywfar-5.12.1/gui/cocoa/CocoaRadioButton.h0000644000175000017500000000136213142134474016127 00000000000000// // CocoaRadioButton.h // // Created by Samuel Strupp on 12.08.10. // #import #import "CocoaButton.h" @class CocoaRadioButton; @interface CocoaRadioGroupManager : NSObject { NSInteger groupeID; NSPointerArray *memberRadioButtons; } @property NSInteger groupeID; -(void) removeRadioButton:(CocoaRadioButton *)buttonToRemove; -(void) addRadioButton:(CocoaRadioButton *)buttonToAdd; -(void) newOnStateButtonIs:(CocoaRadioButton *)newOnStateButton; @end @interface CocoaRadioButton : CocoaButton { CocoaRadioGroupManager *_groupManager; } -(void) createNewGroupManagerWithGroupID:(NSInteger)newGroupID; -(CocoaRadioGroupManager *) getGroupManager; -(void) setGroupManager:(CocoaRadioGroupManager *) newGroupManager; @end gwenhywfar-5.12.1/gui/cocoa/cocoa_gui_dialog.m0000644000175000017500000002423713142134462016207 00000000000000/*************************************************************************** begin : August 09 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "cocoa_gui_dialog_p.h" #include #include #include #include #include #include #include #include #include #define COCOA_DIALOG_WIDGET_REAL 0 #define COCOA_DIALOG_WIDGET_CONTENT 1 #define COCOA_DIALOG_WIDGET_DATA 2 #define COCOA_DIALOG_STRING_TITLE 0 #define COCOA_DIALOG_STRING_VALUE 1 #include "w_dialog.mm" #include "w_label.mm" #include "w_vlayout.mm" #include "w_hlayout.mm" #include "w_pushbutton.mm" #include "w_lineedit.mm" #include "w_textedit.mm" #include "w_checkbox.mm" #include "w_hline.mm" #include "w_vline.mm" #include "w_progressbar.mm" #include "w_radiobutton.mm" #include "w_tabbook.mm" #include "w_groupbox.mm" #include "w_combobox.mm" #include "w_gridlayout.mm" #include "w_hspacer.mm" #include "w_vspacer.mm" #include "w_listbox.mm" #include "w_scrollarea.mm" #include "w_textbrowser.mm" #include "w_stack.mm" #include "w_spinbox.mm" GWEN_INHERIT(GWEN_DIALOG, COCOA_GUI_DIALOG) void CocoaGui_Dialog_Extend(GWEN_DIALOG *dlg) { COCOA_GUI_DIALOG *xdlg; GWEN_NEW_OBJECT(COCOA_GUI_DIALOG, xdlg); GWEN_INHERIT_SETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg, xdlg, CocoaGui_Dialog_FreeData); // set virtual functions xdlg->setIntPropertyFn=GWEN_Dialog_SetSetIntPropertyFn(dlg, CocoaGui_Dialog_SetIntProperty); xdlg->getIntPropertyFn=GWEN_Dialog_SetGetIntPropertyFn(dlg, CocoaGui_Dialog_GetIntProperty); xdlg->setCharPropertyFn=GWEN_Dialog_SetSetCharPropertyFn(dlg, CocoaGui_Dialog_SetCharProperty); xdlg->getCharPropertyFn=GWEN_Dialog_SetGetCharPropertyFn(dlg, CocoaGui_Dialog_GetCharProperty); } void CocoaGui_Dialog_Unextend(GWEN_DIALOG *dlg){ COCOA_GUI_DIALOG *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); // reset virtual functions GWEN_Dialog_SetSetIntPropertyFn(dlg, xdlg->setIntPropertyFn); GWEN_Dialog_SetGetIntPropertyFn(dlg, xdlg->getIntPropertyFn); GWEN_Dialog_SetSetCharPropertyFn(dlg, xdlg->setCharPropertyFn); GWEN_Dialog_SetGetCharPropertyFn(dlg, xdlg->getCharPropertyFn); GWEN_INHERIT_UNLINK(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); } void GWENHYWFAR_CB CocoaGui_Dialog_FreeData(void *bp, void *p) { COCOA_GUI_DIALOG *xdlg; xdlg=(COCOA_GUI_DIALOG*) p; if (xdlg->mainWindow) { NSWindow *window = (xdlg->mainWindow); [window release]; xdlg->mainWindow = nil; } GWEN_FREE_OBJECT(xdlg); } CocoaWindow *CocoaGui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg) { COCOA_GUI_DIALOG *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); return xdlg->mainWindow; } int CocoaGui_Dialog_SetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { return GWEN_Widget_SetIntProperty(w, prop, index, value, doSignal); } int CocoaGui_Dialog_GetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { return GWEN_Widget_GetIntProperty(w, prop, index, defaultValue); } int CocoaGui_Dialog_SetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { return GWEN_Widget_SetCharProperty(w, prop, index, value, doSignal); } const char *CocoaGui_Dialog_GetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { return GWEN_Widget_GetCharProperty(w, prop, index, defaultValue); } int CocoaGui_Dialog_Setup(GWEN_DIALOG *dlg, NSWindow *parentWindow) { COCOA_GUI_DIALOG *xdlg; GWEN_WIDGET_TREE *wtree; GWEN_WIDGET *w; int rv; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); wtree=GWEN_Dialog_GetWidgets(dlg); if (wtree==NULL) { DBG_ERROR(0, "No widget tree in dialog"); return GWEN_ERROR_NOT_FOUND; } w=GWEN_Widget_Tree_GetFirst(wtree); if (w==NULL) { DBG_ERROR(0, "No widgets in dialog"); return GWEN_ERROR_NOT_FOUND; } rv=CocoaGui_Dialog_SetupTree(w); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } xdlg->mainWindow=(CocoaWindow*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); return 0; } void CocoaGui_Dialog_Leave(GWEN_DIALOG *dlg, int result) { COCOA_GUI_DIALOG *xdlg; GWEN_DIALOG *parent; // get toplevel dialog, the one which actually is the GUI dialog while( (parent=GWEN_Dialog_GetParentDialog(dlg)) ) dlg=parent; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); //xdlg->response=result; /*if (g_main_loop_is_running(xdlg->loop)) g_main_loop_quit(xdlg->loop);*/ if (xdlg->mainWindow) { [NSApp abortModal]; [xdlg->mainWindow close]; } } /*static void run_unmap_handler (NSWindow *window, void* data){ GWEN_DIALOG *dlg; COCOA_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); DBG_ERROR(0, "here"); CocoaGui_Dialog_Leave(dlg, 0); } static int run_delete_handler(NSWindow *window, void* data){ GWEN_DIALOG *dlg; COCOA_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); DBG_ERROR(0, "here"); CocoaGui_Dialog_Leave(dlg, 0); return TRUE; // Do not destroy } static void run_destroy_handler(NSWindow *window, void* data) { GWEN_DIALOG *dlg; COCOA_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); DBG_ERROR(0, "Destroyed"); xdlg->destroyed=1; }*/ int Cocoa_Gui_Dialog_Run(GWEN_DIALOG *dlg, int untilEnd) { COCOA_GUI_DIALOG *xdlg; CocoaWindow *g; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, COCOA_GUI_DIALOG, dlg); assert(xdlg); g=CocoaGui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); CocoaGui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } if (untilEnd) { [NSApp runModalForWindow:g]; } else { NSModalSession session = [NSApp beginModalSessionForWindow:g]; for (;;) { if ([NSApp runModalSession:session] != NSRunContinuesResponse) break; } [NSApp endModalSession:session]; } /* xdlg->unmap_handler = g_signal_connect(g, "unmap", G_CALLBACK (run_unmap_handler), dlg); xdlg->delete_handler = g_signal_connect(g, "delete-event", G_CALLBACK (run_delete_handler), dlg); xdlg->destroy_handler = g_signal_connect(g, "destroy", G_CALLBACK (run_destroy_handler), dlg);*/ //xdlg->loop=g_main_loop_new(NULL, FALSE); /*if (untilEnd) g_main_loop_run(xdlg->loop); else { GMainContext *ctx; ctx=g_main_loop_get_context(xdlg->loop); while(g_main_context_pending(ctx)) g_main_context_iteration(ctx, FALSE); } g_main_loop_unref(xdlg->loop); if (!xdlg->destroyed) { g_signal_handler_disconnect(g, xdlg->unmap_handler); g_signal_handler_disconnect(g, xdlg->delete_handler); g_signal_handler_disconnect(g, xdlg->destroy_handler); } return xdlg->response;*/ return 0; } int CocoaGui_Dialog_SetupTree(GWEN_WIDGET *w) { int rv; switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: rv=CocoaGui_WDialog_Setup(w); break; case GWEN_Widget_TypeLabel: rv=CocoaGui_WLabel_Setup(w); break; case GWEN_Widget_TypeVLayout: rv=CocoaGui_WVLayout_Setup(w); break; case GWEN_Widget_TypePushButton: rv=CocoaGui_WPushButton_Setup(w); break; case GWEN_Widget_TypeHLayout: rv=CocoaGui_WHLayout_Setup(w); break; case GWEN_Widget_TypeLineEdit: rv=CocoaGui_WLineEdit_Setup(w); break; case GWEN_Widget_TypeTextEdit: rv=CocoaGui_WTextEdit_Setup(w); break; case GWEN_Widget_TypeCheckBox: rv=CocoaGui_WCheckBox_Setup(w); break; case GWEN_Widget_TypeHLine: rv=CocoaGui_WHLine_Setup(w); break; case GWEN_Widget_TypeVLine: rv=CocoaGui_WVLine_Setup(w); break; case GWEN_Widget_TypeProgressBar: rv=CocoaGui_WProgressBar_Setup(w); break; case GWEN_Widget_TypeRadioButton: rv=CocoaGui_WRadioButton_Setup(w); break; case GWEN_Widget_TypeTabBook: rv=CocoaGui_WTabBook_Setup(w); break; case GWEN_Widget_TypeTabPage: // just re-use vbox GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLX | GWEN_WIDGET_FLAGS_FILLY); rv=CocoaGui_WVLayout_Setup(w); break; case GWEN_Widget_TypeGroupBox: rv=CocoaGui_WGroupBox_Setup(w); break; case GWEN_Widget_TypeComboBox: rv=CocoaGui_WComboBox_Setup(w); break; case GWEN_Widget_TypeGridLayout: rv=CocoaGui_WGridLayout_Setup(w); break; case GWEN_Widget_TypeHSpacer: rv=CocoaGui_WHSpacer_Setup(w); break; case GWEN_Widget_TypeVSpacer: rv=CocoaGui_WVSpacer_Setup(w); break; case GWEN_Widget_TypeListBox: rv=CocoaGui_WListBox_Setup(w); break; case GWEN_Widget_TypeScrollArea: rv=CocoaGui_WScrollArea_Setup(w); break; case GWEN_Widget_TypeTextBrowser: rv=CocoaGui_WTextBrowser_Setup(w); break; case GWEN_Widget_TypeWidgetStack: rv=CocoaGui_WStack_Setup(w); break; case GWEN_Widget_TypeSpinBox: rv=CocoaGui_WSpinBox_Setup(w); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unhandled widget type %d", GWEN_Widget_GetType(w)); rv=GWEN_ERROR_INVALID; break; } if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_WIDGET *wChild; // handle children wChild=GWEN_Widget_Tree_GetFirstChild(w); while(wChild) { // recursion rv=CocoaGui_Dialog_SetupTree(wChild); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } wChild=GWEN_Widget_Tree_GetNext(wChild); } } return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaCheckboxButton.m0000644000175000017500000000145713142134462016626 00000000000000// // CocoaCheckboxButton.m // // Created by Samuel Strupp on 12.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaCheckboxButton.h" #import @implementation CocoaCheckboxButton - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setBezelStyle:NSRoundedBezelStyle]; [self setButtonType:NSSwitchButton]; } return self; } -(void) dealloc { [super dealloc]; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; minWidth = size.width + 22.0; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor orangeColor] set]; NSRectFill(dirtyRect); [super drawRect:dirtyRect]; }*/ #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(minWidth, 16.0); } @endgwenhywfar-5.12.1/gui/cocoa/CocoaScrollBox.m0000644000175000017500000000413113142134462015603 00000000000000// // CocoaScrollBox.m // // // Created by Samuel Strupp on 17.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaScrollBox.h" #ifndef COCOA_SCROLL_BOX_M #define COCOA_SCROLL_BOX_M @implementation CocoaScrollBox @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; //subviewsInOrder = [[NSMutableArray alloc] init]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(layoutSubviews) name:NSViewFrameDidChangeNotification object:self]; } return self; } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; //[subviewsInOrder release]; [super dealloc]; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor greenColor] set]; NSRectFill(dirtyRect); }*/ #define borderDistance 8.0 #define cellDistance 4.0 -(void) layoutSubviews { NSView *documentView = [self documentView]; if (documentView && [documentView conformsToProtocol:@protocol(CocoaGwenGUIProtocol)]) { NSSize neededMinSize = [()documentView minSize]; NSSize contentSize = [self contentSize]; NSRect newFrame = NSMakeRect(0.0, 0.0, neededMinSize.width, neededMinSize.height); if ([()documentView fillX] && neededMinSize.width < contentSize.width) newFrame.size.width = contentSize.width; if ([()documentView fillY] && neededMinSize.height < contentSize.height) newFrame.size.height = contentSize.height; [documentView setFrame:newFrame]; } } -(void) setLayoutedDocumentView:(NSView*)new_documentView { [self setDocumentView:new_documentView]; [self layoutSubviews]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(50.0, 50.0); } /*- (void)setFrame:(NSRect)frameRect { NSSize minSize = [self minSize]; if (frameRect.size.height < minSize.height) { frameRect.size.height = minSize.height; } if (frameRect.size.width < minSize.width) { frameRect.size.width = minSize.width; } [super setFrame:frameRect]; }*/ @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaHLineView.h0000644000175000017500000000042313142134474015524 00000000000000// // CocoaHLineView.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaHLineView : NSView { BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; @end gwenhywfar-5.12.1/gui/cocoa/CocoaProgressbar.h0000644000175000017500000000044413142134474016166 00000000000000// // CocoaProgressbar.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaProgressbar : NSProgressIndicator { BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; @end gwenhywfar-5.12.1/gui/cocoa/Makefile.am0000666000175000017500000000457113545472064014633 00000000000000AM_CPPFLAGS=-I$(gwenhywfar_symlinkdir) $(COCOA_CFLAGS) \ @visibility_cflags@ DEFS+=-DBUILDING_COCOA_GUI -DPACKAGE=\"$(PACKAGE)\" #AM_OBJCFLAGS= -x objective-c lib_LTLIBRARIES=libgwengui-cocoa.la libgwengui_cocoa_la_LIBADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(COCOA_FRAMEWORK) $(FOUNDATION_FRAMEWORK) $(APPKIT_FRAMEWORK) $(COREDATA_FRAMEWORK) $(WEBKIT_FRAMEWORK) \ -lobjc #libgwengui_cocoa_la_LDFLAGS= noinst_HEADERS=\ CocoaButton.h \ CocoaCheckboxButton.h \ CocoaComboBox.h \ CocoaGridLayout.h \ CocoaGroupBox.h \ cocoa_gui_dialog_l.h \ cocoa_gui_dialog_p.h \ cocoa_gui.h \ cocoa_gui_p.h \ CocoaGwenGUIProtocol.h \ CocoaHLayout.h \ CocoaHLineView.h \ CocoaLabel.h \ CocoaLineTextField.h \ CocoaListBox.h \ CocoaPopUpButton.h \ CocoaProgressbar.h \ CocoaRadioButton.h \ CocoaScrollBox.h \ CocoaSpacer.h \ CocoaSpinbox.h \ CocoaTabView.h \ CocoaTextBrowser.h \ CocoaVLayout.h \ CocoaVLineView.h \ CocoaWindowContentView.h \ CocoaWindow.h libgwengui_cocoa_la_SOURCES=\ CocoaButton.m \ CocoaCheckboxButton.m \ CocoaComboBox.m \ CocoaGridLayout.m \ CocoaGroupBox.m \ cocoa_gui_dialog.m \ cocoa_gui.m \ CocoaHLayout.m \ CocoaHLineView.m \ CocoaLabel.m \ CocoaLineTextField.m \ CocoaListBox.m \ CocoaPopUpButton.m \ CocoaProgressbar.m \ CocoaRadioButton.m \ CocoaScrollBox.m \ CocoaSpacer.m \ CocoaSpinbox.m \ CocoaTabView.m \ CocoaTextBrowser.m \ CocoaVLayout.m \ CocoaVLineView.m \ CocoaWindowContentView.m \ CocoaWindow.m iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-cocoa iheader_HEADERS= \ cocoa_gui.h noinst_PROGRAMS = gwen-cocoa-test gwen_cocoa_test_SOURCES = libtest.m #gwen_cocoa_test_LDFLAGS= gwen_cocoa_test_LDADD = libgwengui-cocoa.la $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(COCOA_FRAMEWORK) $(FOUNDATION_FRAMEWORK) $(APPKIT_FRAMEWORK) $(COREDATA_FRAMEWORK) $(WEBKIT_FRAMEWORK) \ -lobjc \ $(builddir)/../testdialogs/libgwengui-test.la EXTRA_DIST=\ w_dialog.mm \ w_label.mm \ w_vlayout.mm \ w_hlayout.mm \ w_pushbutton.mm \ w_lineedit.mm \ w_textedit.mm \ w_checkbox.mm \ w_hline.mm \ w_vline.mm \ w_progressbar.mm \ w_radiobutton.mm \ w_tabbook.mm \ w_groupbox.mm \ w_combobox.mm \ w_gridlayout.mm \ w_hspacer.mm \ w_vspacer.mm \ w_listbox.mm \ w_scrollarea.mm \ w_textbrowser.mm \ w_stack.mm \ w_spinbox.mm gwenhywfar-5.12.1/gui/cocoa/w_tabbook.mm0000644000175000017500000001076413142134462015064 00000000000000/*************************************************************************** begin : August 16 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaTabView.h" static GWENHYWFAR_CB int CocoaGui_WTabBook_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaTabView *tabView; tabView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(tabView); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Value: if (value >= 0 && value < [tabView numberOfTabViewItems]) { [tabView selectTabViewItemAtIndex:value]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WTabBook_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaTabView *tabView; tabView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(tabView); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Value: return [tabView indexOfTabViewItem:[tabView selectedTabViewItem]]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WTabBook_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaTabView *tabView; tabView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(tabView); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WTabBook_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaTabView *tabView; tabView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(tabView); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WTabBook_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CocoaTabView *tabView; const char *s; tabView=(CocoaTabView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(tabView); NSView *subview =(NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(subview); s=GWEN_Widget_GetText(wChild, 0); NSTabViewItem *item = [[NSTabViewItem alloc] init]; if (s && *s) { NSString *title = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [item setLabel:title]; [title release]; } [item setView:subview]; [tabView addTabViewItem:item]; [item release]; return 0; } int CocoaGui_WTabBook_Setup(GWEN_WIDGET *w) { CocoaTabView *tabView; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); tabView=[[[CocoaTabView alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 22.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) tabView.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) tabView.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) tabView); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) tabView); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WTabBook_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WTabBook_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WTabBook_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WTabBook_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WTabBook_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaSpacer.h0000644000175000017500000000041513142134474015110 00000000000000// // CocoaSpacer.h // // // Created by Samuel Strupp on 17.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaSpacer : NSView { BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; @end gwenhywfar-5.12.1/gui/cocoa/w_combobox.mm0000644000175000017500000002014513142134462015245 00000000000000/*************************************************************************** begin : August 16 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaPopUpButton.h" #import "CocoaComboBox.h" static GWENHYWFAR_CB int CocoaGui_WComboBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaComboBox *comboBox = nil; CocoaPopUpButton *popUp = nil; NSControl *control = (NSControl*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(control); if ([control isKindOfClass:[CocoaComboBox class]]) comboBox = (CocoaComboBox*)control; else popUp = (CocoaPopUpButton*)control; switch(prop) { case GWEN_DialogProperty_Enabled: [control setEnabled:(value!=0)]; return 0; case GWEN_DialogProperty_Focus: [[control window] makeFirstResponder:control]; return 0; case GWEN_DialogProperty_Value: if (comboBox) { [comboBox selectItemAtIndex:value]; } else if (popUp) { [popUp selectItemAtIndex:value]; } return 0; case GWEN_DialogProperty_ClearValues: { if (comboBox) [comboBox removeAllItems]; else if (popUp) [popUp removeAllItems]; return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WComboBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaComboBox *comboBox = nil; CocoaPopUpButton *popUp = nil; NSControl *control = (NSControl*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(control); if ([control isKindOfClass:[CocoaComboBox class]]) comboBox = (CocoaComboBox*)control; else popUp = (CocoaPopUpButton*)control; switch(prop) { case GWEN_DialogProperty_Enabled: return ([control isEnabled])?1:0; case GWEN_DialogProperty_Focus: if ([control window]) { if ([[control window] firstResponder] == control) return 1; } return 0; case GWEN_DialogProperty_Value: { if (comboBox) { return [comboBox indexOfSelectedItem]; } else if (popUp) { return [popUp indexOfSelectedItem]; } return defaultValue; } case GWEN_DialogProperty_ValueCount: { int i = -1; if (comboBox) { i = [comboBox numberOfItems]; } else if (popUp) { i = [popUp numberOfItems]; } DBG_ERROR(0, "Number: %d", i); return i; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WComboBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaComboBox *comboBox = nil; CocoaPopUpButton *popUp = nil; NSControl *control = (NSControl*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(control); if ([control isKindOfClass:[CocoaComboBox class]]) comboBox = (CocoaComboBox*)control; else popUp = (CocoaPopUpButton*)control; switch(prop) { case GWEN_DialogProperty_Value: { return GWEN_ERROR_NOT_FOUND; } case GWEN_DialogProperty_AddValue: { NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; if (popUp && stringValue) { [popUp addItemWithTitle:stringValue]; } else if (comboBox && stringValue) { [comboBox addItemWithObjectValue:stringValue]; } [stringValue release]; return 0; } case GWEN_DialogProperty_ClearValues: { if (comboBox) [comboBox removeAllItems]; else if (popUp) [popUp removeAllItems]; return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WComboBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaComboBox *comboBox = nil; CocoaPopUpButton *popUp = nil; NSControl *control = (NSControl*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(control); if ([control isKindOfClass:[CocoaComboBox class]]) comboBox = (CocoaComboBox*)control; else popUp = (CocoaPopUpButton*)control; switch(prop) { case GWEN_DialogProperty_Value: { NSString *value = nil; if (popUp) { value = [popUp titleOfSelectedItem]; } else if (comboBox && [[comboBox itemObjectValueAtIndex:index] isKindOfClass:[NSString class]]) { value = [comboBox itemObjectValueAtIndex:index]; } if (value) return [value cStringUsingEncoding:NSUTF8StringEncoding]; return NULL; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WComboBox_Changed_handler(NSControl *comboBoxOrPopUp, void* data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "Changed"); w=(GWEN_WIDGET*)data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } /*static void changed_handler(GtkWidget *comboBox, gpointer data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "Changed"); w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); }*/ int CocoaGui_WComboBox_Setup(GWEN_WIDGET *w) { // GtkWidget *g; //GtkCellRenderer *cr; //GtkListStore *store; uint32_t flags; GWEN_WIDGET *wParent; //gulong changed_handler_id; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); if (flags & GWEN_WIDGET_FLAGS_READONLY) { //NSPopUpButton CocoaPopUpButton *popUp = [[[CocoaPopUpButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 60.0, 24.0) pullsDown:NO] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) popUp.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) popUp.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) popUp); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) popUp); gwenPopUpActionPtr ptr = CocoaGui_WComboBox_Changed_handler; [popUp setC_PopUpActionPtr:ptr Data:w]; } else { //NSComboBox CocoaComboBox *comboBox = [[[CocoaComboBox alloc] initWithFrame:NSMakeRect(0.0, 0.0, 60.0, 24.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) comboBox.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) comboBox.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) comboBox); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) comboBox); gwenComboBoxActionPtr ptr = CocoaGui_WComboBox_Changed_handler; [comboBox setC_ComboBoxActionPtr:ptr Data:w]; } GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WComboBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WComboBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WComboBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WComboBox_GetCharProperty); #pragma mark NOCH MACHEN Action setzen /*changed_handler_id=g_signal_connect(g, "changed", G_CALLBACK (changed_handler), w);*/ if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaHLayout.m0000644000175000017500000001052113142134462015261 00000000000000// // CocoaHLayout.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaHLayout.h" @implementation CocoaHLayout @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; subviewsInOrder = [[NSMutableArray alloc] init]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(layoutSubviews) name:NSViewFrameDidChangeNotification object:self]; } return self; } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [subviewsInOrder release]; [super dealloc]; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor greenColor] set]; NSRectFill(dirtyRect); }*/ #define borderDistance 8.0 #define cellDistance 4.0 -(void) layoutSubviews { NSRect bounds = [self bounds]; NSUInteger numOfSubViews = [subviewsInOrder count]; if (numOfSubViews > 0) { //Prepass to compute the sizes CGFloat sizesHeight[numOfSubViews]; CGFloat sizesWidth[numOfSubViews]; CGFloat exclusiveWidth = 0.0; NSUInteger exclusiveChilds = 0; NSUInteger i; for (i=0; i)subview fillX]) sizesWidth[i] = -1.0; else { CGFloat neededWidth = [()subview minSize].width; sizesWidth[i] = neededWidth; exclusiveWidth += neededWidth; exclusiveChilds++; } if ([()subview fillY]) sizesHeight[i] = -1.0; else { CGFloat neededHeight = [()subview minSize].height; sizesHeight[i] = neededHeight; } } else { sizesWidth[i] = -1.0; sizesHeight[i] = -1.0; } } //Compute standard Sizes for Subviews CGFloat stdWidth = 0.0; if (numOfSubViews > exclusiveChilds) { CGFloat fillWidth = bounds.size.width-exclusiveWidth; stdWidth = (fillWidth-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance))/(numOfSubViews-exclusiveChilds); } else { CGFloat fillWidth = bounds.size.width; stdWidth = (fillWidth-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance))/(numOfSubViews); } CGFloat stdHeight = bounds.size.height-(borderDistance+borderDistance); //if (numOfSubViews>=4) NSLog(@"view.width = %f", bounds.size.width); //change Subviews Frame NSRect actualFrame = bounds; actualFrame.origin.x = borderDistance; actualFrame.origin.y += bounds.size.height-borderDistance; for (i=0; i=4) NSLog(@"subview %i width = %f", i, usedWidth); NSView* subview = [subviewsInOrder objectAtIndex:i]; [subview setFrame:actualFrame]; actualFrame.origin.x += usedWidth+cellDistance; } } } -(void) addLayoutSubview:(NSView*)new_subview { [subviewsInOrder addObject:new_subview]; [self addSubview:new_subview]; [self layoutSubviews]; } #pragma mark Protocoll Methods - (NSSize) minSize { NSUInteger numOfSubViews = [subviewsInOrder count]; CGFloat borderWidth = borderDistance+borderDistance; NSSize size = NSMakeSize(borderWidth, borderWidth); if (numOfSubViews > 0) { NSUInteger i; for (i=0; i)subview minSize]; if (subViewMinSize.height+borderWidth > size.height) { size.height = subViewMinSize.height+borderWidth; } size.width += subViewMinSize.width; if (i>0) size.width += cellDistance; } } } return size; } - (void)setFrame:(NSRect)frameRect { NSSize minSize = [self minSize]; if (frameRect.size.height < minSize.height) { frameRect.size.height = minSize.height; } if (frameRect.size.width < minSize.width) { frameRect.size.width = minSize.width; } [super setFrame:frameRect]; } @end gwenhywfar-5.12.1/gui/cocoa/w_spinbox.mm0000644000175000017500000001365213142134462015124 00000000000000/*************************************************************************** begin : August 19 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaSpinbox.h" /*typedef struct W_SPINBOX W_SPINBOX; struct W_SPINBOX { GtkAdjustment *adjustment; };*/ GWEN_INHERIT(GWEN_WIDGET, W_SPINBOX) static GWENHYWFAR_CB int CocoaGui_WSpinBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaSpinbox *spinbox; spinbox=(CocoaSpinbox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(spinbox); switch(prop) { case GWEN_DialogProperty_Enabled: [spinbox setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: [spinbox makeFirstResponder]; return 0; case GWEN_DialogProperty_Width: { NSRect frame = [spinbox frame]; frame.size.width = value; [spinbox setFrame:frame]; } return 0; case GWEN_DialogProperty_Height:{ NSRect frame = [spinbox frame]; frame.size.height = value; [spinbox setFrame:frame]; } return 0; case GWEN_DialogProperty_Value: [spinbox setIntegerValue:value]; return 0; case GWEN_DialogProperty_MinValue: [spinbox setMinValue:value]; return 0; case GWEN_DialogProperty_MaxValue: [spinbox setMaxValue:value]; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WSpinBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaSpinbox *spinbox; spinbox=(CocoaSpinbox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(spinbox); switch(prop) { case GWEN_DialogProperty_Enabled: return ([spinbox isEnabled])?1:0; case GWEN_DialogProperty_Focus: return ([spinbox isFirstResponder])?1:0; case GWEN_DialogProperty_Width: return [spinbox frame].size.width; case GWEN_DialogProperty_Height: return [spinbox frame].size.height; case GWEN_DialogProperty_Value: return [spinbox integerValue]; case GWEN_DialogProperty_MinValue: return [spinbox minValue]; case GWEN_DialogProperty_MaxValue: return [spinbox maxValue]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WSpinBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaSpinbox *spinbox; spinbox=(CocoaSpinbox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(spinbox); switch(prop) { case GWEN_DialogProperty_Value: { if (value && *value) { NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [spinbox setStringValue:stringValue]; [stringValue release]; } } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WSpinBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaSpinbox *spinbox; spinbox=(CocoaSpinbox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(spinbox); switch(prop) { case GWEN_DialogProperty_Value: return [[spinbox stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WSpinBox_Changed_handler(NSView *spinbox, void* data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "ValueChanged"); w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WSpinBox_Setup(GWEN_WIDGET *w) { CocoaSpinbox *spinbox; const char *s; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); spinbox = [[[CocoaSpinbox alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 22.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) spinbox.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) spinbox.fillY = YES; if (s && *s) { NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [spinbox setStringValue:stringValue]; [stringValue release]; } else { [spinbox setStringValue:nil]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) spinbox); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) spinbox); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WSpinBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WSpinBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WSpinBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WSpinBox_GetCharProperty); gwenSpinBoxActionPtr ptr = CocoaGui_WSpinBox_Changed_handler; [spinbox setC_ActionPtr:ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaTabView.h0000644000175000017500000000042213142134474015232 00000000000000// // CocoaTabView.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaTabView : NSTabView { BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; @end gwenhywfar-5.12.1/gui/cocoa/CocoaButton.m0000644000175000017500000000310613142134462015150 00000000000000// // CocoaButton.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaButton.h" #ifndef COCOA_GWEN_BUTTON_MM #define COCOA_GWEN_BUTTON_MM @implementation CocoaButton @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setTarget:self]; [self setAction:@selector(clicked:)]; c_actionPtr = nil; c_actionData = nil; fillX = NO; fillY = NO; minWidth = 40.0; } return self; } -(void) dealloc { [super dealloc]; } -(NSSize) neededTextSize { NSString *title = [self title]; if (title && [title length]>0) { NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor], NSForegroundColorAttributeName, [self font], NSFontAttributeName, nil]; return [title sizeWithAttributes:attributes]; } return NSZeroSize; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; minWidth = size.width + 40.0; if ([self image]) { minWidth += [[self image] size].width; } } -(void) setC_ActionPtr:(gwenActionPtr)ptr Data:(void*)data { c_actionPtr = ptr; c_actionData = data; } -(void) clicked:(id) sender { if (c_actionPtr) { c_actionPtr(self, c_actionData); } } - (void)setTitle:(NSString *)aString { [super setTitle:aString]; [self computeMinWidth]; } - (void)setImage:(NSImage *)anImage { [super setImage:anImage]; [self computeMinWidth]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(minWidth, 32.0); } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaWindowContentView.m0000644000175000017500000001041013142134462017326 00000000000000// // CocoaVLayout.m // // // Created by Samuel Strupp on 10.08.10. // Copyright 2010 Synium Software GmbH. All rights reserved. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaWindowContentView.h" #import "CocoaGwenGUIProtocol.h" #ifndef COCOA_WINDOW_CONTENT_VIEW_MM #define COCOA_WINDOW_CONTENT_VIEW_MM @implementation CocoaWindowContentView @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { subviewsInOrder = [[NSMutableArray alloc] init]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(layoutSubviews) name:NSViewFrameDidChangeNotification object:self]; } return self; } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [subviewsInOrder release]; [super dealloc]; } //#define borderDistance 0.0 //#define cellDistance 0.0 -(void) layoutSubviews { NSRect bounds = [self bounds]; NSUInteger numOfSubViews = [subviewsInOrder count]; if (numOfSubViews > 0) { //Prepass to compute the sizes CGFloat sizesHeight[numOfSubViews]; CGFloat sizesWidth[numOfSubViews]; CGFloat exclusiveHeight = 0.0; NSUInteger exclusiveChilds = 0; NSUInteger i; for (i=0; i)subview fillX]) sizesWidth[i] = -1.0; else { CGFloat neededWidth = [()subview minSize].width; sizesWidth[i] = neededWidth; } if ([()subview fillY]) sizesHeight[i] = -1.0; else { CGFloat neededHeight = [()subview minSize].height; sizesHeight[i] = neededHeight; exclusiveHeight += neededHeight; exclusiveChilds++; } } else { sizesWidth[i] = -1.0; sizesHeight[i] = -1.0; } } //Compute standard Sizes for Subviews CGFloat stdHeight = 0.0; if (numOfSubViews > exclusiveChilds) { CGFloat fillHeight = bounds.size.height-exclusiveHeight; stdHeight = (fillHeight/*-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance)*/)/(numOfSubViews-exclusiveChilds); } else { CGFloat fillHeight = bounds.size.height; stdHeight = (fillHeight/*-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance)*/)/(numOfSubViews); } CGFloat stdWidth = bounds.size.width/*-(borderDistance+borderDistance)*/; //change Subviews Frame NSRect actualFrame = bounds; actualFrame.origin.x = 0.0; //borderDistance; actualFrame.origin.y += bounds.size.height; //-borderDistance; for (i=0; i 0) { NSUInteger i; for (i=0; i)subview minSize]; if (subViewMinSize.width/*+borderWidth*/ > size.width) { size.width = subViewMinSize.width/*+borderWidh*/; } size.height += subViewMinSize.height; //if (i>0) size.height += cellDistance; } } } return size; } /*- (void)setFrame:(NSRect)frameRect { NSSize minSize = [self minSize]; if (frameRect.size.height < minSize.height) { frameRect.size.height = minSize.height; } if (frameRect.size.width < minSize.width) { frameRect.size.width = minSize.width; } [super setFrame:frameRect]; }*/ @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaVLineView.m0000644000175000017500000000170013142134462015543 00000000000000// // CocoaHLineView.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaVLineView.h" @implementation CocoaVLineView @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code here. fillX = NO; fillY = NO; } return self; } -(void) dealloc { [super dealloc]; } - (void)drawRect:(NSRect)dirtyRect { NSRect bounds = [self bounds]; [[NSColor grayColor] set]; NSBezierPath *line = [NSBezierPath bezierPath]; CGFloat x = bounds.origin.x+bounds.size.width/2.0; [line moveToPoint:NSMakePoint(x, bounds.origin.y)]; [line lineToPoint:NSMakePoint(x, bounds.origin.y + bounds.size.height)]; [line stroke]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(3.0, 3.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end gwenhywfar-5.12.1/gui/cocoa/CocoaVLayout.h0000644000175000017500000000054413142134474015301 00000000000000// // CocoaVLayout.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaVLayout : NSView { NSMutableArray *subviewsInOrder; BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; -(void) addLayoutSubview:(NSView *)new_subview ; @end gwenhywfar-5.12.1/gui/cocoa/CocoaListBox.m0000644000175000017500000001721213142134462015264 00000000000000// // CocoaListBox.m // // // Created by Samuel Strupp on 17.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaListBox.h" @implementation CocoaListBox @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; dataArray = [[NSMutableArray alloc] init]; [self setColumnAutoresizingStyle:NSTableViewLastColumnOnlyAutoresizingStyle]; [self setUsesAlternatingRowBackgroundColors:YES]; [self setDataSource:self]; [self setDelegate:self]; [self setTarget:self]; [self setAction:@selector(performAction:)]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(performAction:) name:NSTableViewSelectionDidChangeNotification object:self]; } return self; } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [dataArray release]; [super dealloc]; } #pragma mark Special Methods -(void) setC_ActionPtr:(gwenListBoxActionPtr)ptr Data:(void*)data { c_actionPtr = ptr; c_actionData = data; } -(void) performAction:(id) sender { if (c_actionPtr) { c_actionPtr(self, c_actionData); } } -(void) setTitelsAndCreateColumns:(NSString*)titleString { if (!titleString) return; //first delete old columns NSArray *oldColumns = [self tableColumns]; for (NSTableColumn *oldColumn in oldColumns) { [self removeTableColumn:oldColumn]; } //now create new columns NSArray *titles = [titleString componentsSeparatedByString:@"\t"]; //NSLog(@"%@", titles); NSUInteger numOfColumns = [titles count]; NSUInteger i; for (i=0; i indexOfColumn) { obj1 = [element1 objectAtIndex:indexOfColumn]; } if ([element2 count] > indexOfColumn) { obj2 = [element2 objectAtIndex:indexOfColumn]; } if (obj1 && obj2) { NSComparisonResult result = [obj1 localizedCaseInsensitiveCompare:obj2]; if (ascending) return result; else { if (result == NSOrderedAscending) return NSOrderedDescending; else if (result == NSOrderedDescending) return NSOrderedAscending; else return result; } } return NSOrderedSame; } -(void) sortTableView:(NSTableView*)tableView { NSArray *sortDescriptors = [tableView sortDescriptors]; if (!sortDescriptors || [sortDescriptors count] <=0) return; NSSortDescriptor *sortDesc = [sortDescriptors objectAtIndex:0]; if (sortDesc) { NSNumber *indexOfColumn = [NSNumber numberWithInteger:[[sortDesc key] integerValue]]; NSNumber *sortOrder = [NSNumber numberWithBool:[sortDesc ascending]]; //NSLog(@"sort Index = %@ Ascending = %@", [indexOfColumn description], [sortOrder description]); NSArray *keys = [NSArray arrayWithObjects:@"indexOfColumn", @"ascending", nil]; NSArray *objects = [NSArray arrayWithObjects:indexOfColumn, sortOrder, nil]; NSDictionary *contextDict = [NSDictionary dictionaryWithObjects:objects forKeys:keys]; [dataArray sortUsingFunction:positionSort context:contextDict]; [self reloadData]; } } -(BOOL) setColumnWidthTo:(NSInteger)widthInPixels forColumn:(NSInteger)index { if (index < 0 || widthInPixels < 0) return NO; NSTableColumn *tableColumn = [self tableColumnWithIdentifier:[NSString stringWithFormat:@"%i",index]]; if (tableColumn) { [tableColumn setWidth:widthInPixels]; return YES; } return NO; } -(NSInteger) widthOfColumn:(NSInteger)index { if (index >= 0) { NSTableColumn *tableColumn = [self tableColumnWithIdentifier:[NSString stringWithFormat:@"%i",index]]; if (tableColumn) { return ceil([tableColumn width]); } } return -1; } -(BOOL) setSortOrderTo:(BOOL)ascending ForColumnWithIndex:(NSUInteger)index { NSArray *tableColumns = [self tableColumns]; if (index < [tableColumns count]) { NSSortDescriptor *sortDesc = [[NSSortDescriptor alloc] initWithKey:[NSString stringWithFormat:@"%u",index] ascending:ascending]; [self setSortDescriptors:[NSArray arrayWithObject:sortDesc]]; [sortDesc release]; [self sortTableView:self]; return YES; } return NO; } -(NSInteger) sortOrderForColumnAtIndex:(NSUInteger)index { NSArray *tableColumns = [self tableColumns]; if (index < [tableColumns count]) { NSArray *sortDescriptors = [self sortDescriptors]; if (!sortDescriptors || [sortDescriptors count] <=0) return -1; NSSortDescriptor *sortDesc = [sortDescriptors objectAtIndex:0]; if ((NSUInteger)[[sortDesc key] integerValue] == index) { return [sortDesc ascending]; } } return -1; } #pragma mark DataSource Methods - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView { return [dataArray count]; } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { if (rowIndex >= 0 && rowIndex < [dataArray count]) { NSUInteger index = [(NSString*)[aTableColumn identifier] integerValue]; NSArray *rowArray = [dataArray objectAtIndex:rowIndex]; if (rowArray && index < [rowArray count]) { return [rowArray objectAtIndex:index]; } } return nil; } - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { return; } #pragma mark Delegate Methods - (void)tableView:(NSTableView *)aTableView sortDescriptorsDidChange:(NSArray *)oldDescriptors { [self sortTableView:aTableView]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(300.0, 300.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end gwenhywfar-5.12.1/gui/cocoa/CocoaRadioButton.m0000644000175000017500000000560713142134462016137 00000000000000// // CocoaRadioButton.m // CocoaGwenGuiTest // // Created by Samuel Strupp on 12.08.10. // Copyright 2010 Synium Software GmbH. All rights reserved. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaRadioButton.h" @implementation CocoaRadioButton - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setBezelStyle:NSRoundedBezelStyle]; [self setButtonType:NSRadioButton]; _groupManager = nil; } return self; } -(void) dealloc { if (_groupManager) { [_groupManager removeRadioButton:self]; [_groupManager release]; } [super dealloc]; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; minWidth = size.width + 22.0; } -(void) createNewGroupManagerWithGroupID:(NSInteger)newGroupID { if (_groupManager) { [_groupManager removeRadioButton:self]; [_groupManager release]; _groupManager = nil; } _groupManager = [[CocoaRadioGroupManager alloc] init]; _groupManager.groupeID = newGroupID; [_groupManager addRadioButton:self]; } -(CocoaRadioGroupManager*) getGroupManager { return _groupManager; } -(void) setGroupManager:(CocoaRadioGroupManager*) newGroupManager { if (_groupManager) { [_groupManager removeRadioButton:self]; [_groupManager release]; _groupManager = nil; } if (newGroupManager) { _groupManager = [newGroupManager retain]; [_groupManager addRadioButton:self]; } } - (void)setState:(NSInteger)value { if (value == NSOnState && _groupManager) { [_groupManager newOnStateButtonIs:self]; } [super setState:value]; } -(void) clicked:(id)sender { if ([self state] == NSOnState && _groupManager) { [_groupManager newOnStateButtonIs:self]; } [super clicked:sender]; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor blueColor] set]; NSRectFill(dirtyRect); [super drawRect:dirtyRect]; }*/ #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(minWidth, 16.0); } @end @implementation CocoaRadioGroupManager @synthesize groupeID; - (id)init { self = [super init]; if (self) { memberRadioButtons = [[NSPointerArray pointerArrayWithWeakObjects] retain]; } return self; } -(void) dealloc { [memberRadioButtons release]; [super dealloc]; } -(void) removeRadioButton:(CocoaRadioButton*)buttonToRemove { NSUInteger i; NSUInteger count = [memberRadioButtons count]; NSUInteger foundIndex = count; //ungültiger Index for (i=0; i #import "CocoaButton.h" @interface CocoaCheckboxButton : CocoaButton { } @end gwenhywfar-5.12.1/gui/cocoa/CocoaScrollBox.h0000644000175000017500000000057313142134474015607 00000000000000// // CocoaScrollBox.h // // // Created by Samuel Strupp on 17.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaScrollBox : NSScrollView { //NSMutableArray *subviewsInOrder; BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; -(void) setLayoutedDocumentView:(NSView *)new_documentView; @end gwenhywfar-5.12.1/gui/cocoa/CocoaWindow.h0000644000175000017500000000062413142134474015144 00000000000000// // CocoaWindow.h // // // Created by Samuel Strupp on 20.08.10. // #ifndef COCOA_WINDOW_H #define COCOA_WINDOW_H #import typedef void (*gwenWindowActionPtr)(NSWindow *window, void *data); @interface CocoaWindow : NSWindow { gwenWindowActionPtr c_actionPtr; void *c_actionData; gwenWindowActionPtr c_textChangedActionPtr; void *c_textChangedActionData; } @end #endif gwenhywfar-5.12.1/gui/cocoa/w_vspacer.mm0000644000175000017500000000457513142134462015111 00000000000000/*************************************************************************** begin : Aug 17 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaSpacer.h" static GWENHYWFAR_CB int CocoaGui_WVSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaSpacer *vSpacer; vSpacer=(CocoaSpacer*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vSpacer); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WVSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaSpacer *vSpacer; vSpacer=(CocoaSpacer*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vSpacer); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int CocoaGui_WVSpacer_Setup(GWEN_WIDGET *w) { CocoaSpacer *vSpacer; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); vSpacer = [[[CocoaSpacer alloc] initWithFrame:NSMakeRect(0.0, 0.0, 10.0, 10.0)] autorelease]; GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLY); vSpacer.fillY = YES; if (flags & GWEN_WIDGET_FLAGS_FILLX) vSpacer.fillX = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) vSpacer); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) vSpacer); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WVSpacer_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WVSpacer_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/w_hspacer.mm0000644000175000017500000000457013142134462015066 00000000000000/*************************************************************************** begin : Aug 17 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaSpacer.h" static GWENHYWFAR_CB int CocoaGui_WHSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaSpacer *hSpacer; hSpacer=(CocoaSpacer*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hSpacer); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WHSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaSpacer *hSpacer; hSpacer=(CocoaSpacer*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hSpacer); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int CocoaGui_WHSpacer_Setup(GWEN_WIDGET *w) { CocoaSpacer *hSpacer; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); hSpacer = [[[CocoaSpacer alloc] initWithFrame:NSMakeRect(0.0, 0.0, 10.0, 10.0)] autorelease]; GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLX); hSpacer.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) hSpacer.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) hSpacer); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) hSpacer); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WHSpacer_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WHSpacer_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaProgressbar.m0000644000175000017500000000115313142134462016166 00000000000000// // CocoaProgressbar.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaProgressbar.h" @implementation CocoaProgressbar @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code here. fillX = NO; fillY = NO; } return self; } -(void) dealloc { [super dealloc]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(5.0, 20.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end gwenhywfar-5.12.1/gui/cocoa/w_hline.mm0000644000175000017500000000520413142134462014533 00000000000000/*************************************************************************** begin : Auf 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaHLineView.h" static GWENHYWFAR_CB int CocoaGui_WHLine_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaHLineView *hLineView; hLineView=(CocoaHLineView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hLineView); switch(prop) { case GWEN_DialogProperty_Enabled: //gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: //gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WHLine_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaHLineView *hLineView; hLineView=(CocoaHLineView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hLineView); switch(prop) { case GWEN_DialogProperty_Enabled: //return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Focus: //return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int CocoaGui_WHLine_Setup(GWEN_WIDGET *w) { CocoaHLineView *hLineView; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); hLineView = [[[CocoaHLineView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 5.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) hLineView.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) hLineView.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) hLineView); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) hLineView); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WHLine_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WHLine_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/w_vlayout.mm0000644000175000017500000001236313142134462015143 00000000000000/*************************************************************************** begin : August 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaVLayout.h" static GWENHYWFAR_CB int CocoaGui_WVLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaVLayout *vlayout; vlayout=(CocoaVLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vlayout); switch(prop) { case GWEN_DialogProperty_Enabled: //gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: //gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WVLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaVLayout *vlayout; vlayout=(CocoaVLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vlayout); switch(prop) { case GWEN_DialogProperty_Enabled: //return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; return 1; case GWEN_DialogProperty_Focus: //return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WVLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { /*CocoaVLayout *vlayout; vlayout=(CocoaVLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vlayout);*/ DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WVLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { /*CocoaVLayout *vlayout; vlayout=(CocoaVLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vlayout);*/ DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WVLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CocoaVLayout *vlayout; NSView *childView; uint32_t cflags; vlayout=(CocoaVLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vlayout); childView=(NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(childView); cflags=GWEN_Widget_GetFlags(wChild); [vlayout addLayoutSubview:childView]; //Noch richtig implementieren /* gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, 0);*/ return 0; } int CocoaGui_WVLayout_Setup(GWEN_WIDGET *w) { /*GtkWidget *g; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_vbox_new((flags & GWEN_WIDGET_FLAGS_EQUAL_HEIGHT)?TRUE:FALSE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void*) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void*) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WVLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WVLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WVLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WVLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk2Gui_WVLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w);*/ CocoaVLayout *vlayout; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); vlayout = [[[CocoaVLayout alloc] initWithFrame:NSMakeRect(10.0, 10.0, 200.0, 200.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) vlayout.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) vlayout.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) vlayout); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) vlayout); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WVLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WVLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WVLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WVLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WVLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaHLineView.m0000644000175000017500000000163213142134462015531 00000000000000// // CocoaHLineView.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaHLineView.h" @implementation CocoaHLineView @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; } return self; } -(void) dealloc { [super dealloc]; } - (void)drawRect:(NSRect)dirtyRect { NSRect bounds = [self bounds]; [[NSColor grayColor] set]; NSBezierPath *line = [NSBezierPath bezierPath]; CGFloat y = bounds.origin.y+bounds.size.height/2.0; [line moveToPoint:NSMakePoint(bounds.origin.x, y)]; [line lineToPoint:NSMakePoint(bounds.origin.x + bounds.size.width, y)]; [line stroke]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(3.0, 3.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end gwenhywfar-5.12.1/gui/cocoa/w_hlayout.mm0000644000175000017500000001151113142134462015117 00000000000000/*************************************************************************** begin : August 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaHLayout.h" static GWENHYWFAR_CB int CocoaGui_WHLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaHLayout *hlayout; hlayout=(CocoaHLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hlayout); switch(prop) { case GWEN_DialogProperty_Enabled: //gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: //gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WHLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaHLayout *hlayout; hlayout=(CocoaHLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hlayout); switch(prop) { case GWEN_DialogProperty_Enabled: //return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; return 1; case GWEN_DialogProperty_Focus: //return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WHLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { /*CocoaHLayout *hlayout; hlayout=(CocoaHLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hlayout);*/ DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WHLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { /*CocoaHLayout *hlayout; hlayout=(CocoaHLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hlayout);*/ DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WHLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CocoaHLayout *hlayout; NSView *childView; uint32_t cflags; hlayout=(CocoaHLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(hlayout); childView=(NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(childView); cflags=GWEN_Widget_GetFlags(wChild); [hlayout addLayoutSubview:childView]; /*gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLX)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLX)?TRUE:FALSE, 0);*/ return 0; } int CocoaGui_WHLayout_Setup(GWEN_WIDGET *w) { CocoaHLayout *hlayout; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); hlayout = [[[CocoaHLayout alloc] initWithFrame:NSMakeRect(10.0, 10.0, 200.0, 200.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) hlayout.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) hlayout.fillY = YES; /*#if 0 // using equal width here doesn't seem to be working as expected: // I would expect al children be of equal width, but instead all children are // equally distant to each other while still being of different width... // g=gtk_hbox_new((flags & GWEN_WIDGET_FLAGS_EQUAL_WIDTH)?TRUE:FALSE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); #else g=gtk_hbox_new(FALSE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); #endif*/ GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) hlayout); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) hlayout); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WHLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WHLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WHLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WHLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WHLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaTabView.m0000644000175000017500000000215013142134462015234 00000000000000// // CocoaTabView.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaTabView.h" @implementation CocoaTabView @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; } return self; } -(void) dealloc { [super dealloc]; } #pragma mark Protocoll Methods - (NSSize) minSize { NSArray *tabViewItems = [self tabViewItems]; NSSize maxSize = NSZeroSize; for (NSTabViewItem *item in tabViewItems) { NSView *subview = [item view]; if ([subview conformsToProtocol:@protocol(CocoaGwenGUIProtocol)]) { NSSize subViewMinSize = [()subview minSize]; if (subViewMinSize.width > maxSize.width) maxSize.width = subViewMinSize.width; if (subViewMinSize.height > maxSize.height) maxSize.height = subViewMinSize.height; } } if ([self tabViewType] != NSNoTabsNoBorder) { maxSize.width += 22.0; maxSize.height += 40.0; } return maxSize; } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end gwenhywfar-5.12.1/gui/cocoa/CocoaButton.h0000644000175000017500000000102013142134474015137 00000000000000// // CocoaButton.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" typedef void (*gwenActionPtr)(NSButton *button, void *data); @interface CocoaButton : NSButton { gwenActionPtr c_actionPtr; void *c_actionData; BOOL fillX; BOOL fillY; CGFloat minWidth; } @property BOOL fillX; @property BOOL fillY; -(void) setC_ActionPtr:(gwenActionPtr)ptr Data:(void *)data; -(NSSize) neededTextSize; -(void) clicked:(id) sender; @end gwenhywfar-5.12.1/gui/cocoa/CocoaWindowContentView.h0000644000175000017500000000056713142134474017340 00000000000000// // CocoaWindowContentView.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaWindowContentView : NSView { NSMutableArray *subviewsInOrder; BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; -(void) addLayoutSubview:(NSView *)new_subview; @end gwenhywfar-5.12.1/gui/cocoa/w_scrollarea.mm0000644000175000017500000001175213142134462015570 00000000000000/*************************************************************************** begin : Aug 17 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaScrollBox.h" static GWENHYWFAR_CB int CocoaGui_WScrollArea_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(scrollView); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: { NSRect frame = [scrollView frame]; frame.size.width = value; [scrollView setFrame:frame]; } return 0; case GWEN_DialogProperty_Height:{ NSRect frame = [scrollView frame]; frame.size.height = value; [scrollView setFrame:frame]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WScrollArea_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(scrollView); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: return [scrollView frame].size.width; case GWEN_DialogProperty_Height: return [scrollView frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WScrollArea_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(scrollView); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WScrollArea_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaScrollBox *scrollView; scrollView = (CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_CONTENT)); assert(scrollView); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WScrollArea_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CocoaScrollBox *scrollView; NSView *childView; uint32_t cflags; scrollView=(CocoaScrollBox*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(scrollView); childView=(NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(childView); cflags=GWEN_Widget_GetFlags(wChild); [scrollView setLayoutedDocumentView:childView]; return 0; } int CocoaGui_WScrollArea_Setup(GWEN_WIDGET *w) { //GtkWidget *g; //GtkWidget *gContent; CocoaScrollBox *scrollView; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); /* create widget */ /*g=gtk_scrolled_window_new(NULL, NULL); gContent=gtk_vbox_new(TRUE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(g), gContent);*/ scrollView = [[[CocoaScrollBox alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 100.0)] autorelease]; [scrollView setHasVerticalScroller:YES]; [scrollView setHasHorizontalScroller:YES]; [scrollView setAutohidesScrollers:NO]; if (flags & GWEN_WIDGET_FLAGS_FILLX) scrollView.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) scrollView.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) scrollView); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) scrollView); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WScrollArea_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WScrollArea_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WScrollArea_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WScrollArea_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WScrollArea_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/w_gridlayout.mm0000644000175000017500000001501713142134462015622 00000000000000/*************************************************************************** begin : August 16 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ /*typedef struct GTK2_GRIDLAYOUT_WIDGET GTK2_GRIDLAYOUT_WIDGET; struct GTK2_GRIDLAYOUT_WIDGET { int sortByRow; int allocatedColumns; int allocatedRows; int currentColumn; int currentRow; };*/ //GWEN_INHERIT(GWEN_WIDGET, GTK2_GRIDLAYOUT_WIDGET) #import "CocoaGridLayout.h" static GWENHYWFAR_CB int CocoaGui_WGridLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaGridLayout *gridLayout; gridLayout = (CocoaGridLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(gridLayout); switch(prop) { case GWEN_DialogProperty_Enabled: //gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: //gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WGridLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaGridLayout *gridLayout; gridLayout = (CocoaGridLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(gridLayout); switch(prop) { case GWEN_DialogProperty_Enabled: //return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; return 1; case GWEN_DialogProperty_Focus: //return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WGridLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaGridLayout *gridLayout; gridLayout = (CocoaGridLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(gridLayout); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WGridLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaGridLayout *gridLayout; gridLayout = (CocoaGridLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(gridLayout); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WGridLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CocoaGridLayout *gridLayout; NSView *childView; uint32_t cflags; gridLayout=(CocoaGridLayout*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(gridLayout); childView=(NSView*)(GWEN_Widget_GetImplData(wChild, COCOA_DIALOG_WIDGET_REAL)); assert(childView); cflags=GWEN_Widget_GetFlags(wChild); [gridLayout addLayoutSubview:childView]; return 0; /* GTK2_GRIDLAYOUT_WIDGET *xw; GtkWidget *g; GtkWidget *gChild; uint32_t cflags; int x; int y; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, GTK2_GRIDLAYOUT_WIDGET, w); assert(xw); cflags=GWEN_Widget_GetFlags(wChild); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK2_DIALOG_WIDGET_REAL)); assert(gChild); if (xw->sortByRow) { // fill rows, enter next column if column full y=(xw->currentRow)++; if (y>=xw->allocatedRows) { xw->currentRow=0; y=(xw->currentRow)++; xw->currentColumn++; } x=xw->currentColumn; if (x>=xw->allocatedColumns) { xw->allocatedColumns=x+1; gtk_table_resize(GTK_TABLE(g), xw->allocatedRows, xw->allocatedColumns); } } else { // fill columns, enter next row if row full x=(xw->currentColumn)++; if (x>=xw->allocatedColumns) { xw->currentColumn=0; x=(xw->currentColumn)++; xw->currentRow++; } y=xw->currentRow; if (y>=xw->allocatedRows) { xw->allocatedRows=y+1; gtk_table_resize(GTK_TABLE(g), xw->allocatedRows, xw->allocatedColumns); } } gtk_table_attach(GTK_TABLE(g), gChild, x, x+1, y, y+1, (cflags & GWEN_WIDGET_FLAGS_FILLX)?(GTK_FILL|GTK_EXPAND):0, (cflags & GWEN_WIDGET_FLAGS_FILLY)?(GTK_FILL|GTK_EXPAND):0, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING);*/ return 0; } /*static GWENHYWFAR_CB void Gtk2Gui_WGridLayout_FreeData(void *bp, void *p) { GTK2_GRIDLAYOUT_WIDGET *xw; xw=(GTK2_GRIDLAYOUT_WIDGET*) p; GWEN_FREE_OBJECT(xw); }*/ int CocoaGui_WGridLayout_Setup(GWEN_WIDGET *w) { CocoaGridLayout *gridLayout; uint32_t flags; GWEN_WIDGET *wParent; //GTK2_GRIDLAYOUT_WIDGET *xw; int rows; int cols; //GWEN_NEW_OBJECT(GTK2_GRIDLAYOUT_WIDGET, xw); //GWEN_INHERIT_SETDATA(GWEN_WIDGET, GTK2_GRIDLAYOUT_WIDGET, w, xw, Gtk2Gui_WGridLayout_FreeData);*/ flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); cols=GWEN_Widget_GetColumns(w); rows=GWEN_Widget_GetRows(w); gridLayout = [[[CocoaGridLayout alloc] initWithFrame:NSMakeRect(10.0, 10.0, 200.0, 200.0)] autorelease]; gridLayout.columns = cols; gridLayout.rows = rows; if (flags & GWEN_WIDGET_FLAGS_FILLX) gridLayout.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) gridLayout.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) gridLayout); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) gridLayout); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WGridLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WGridLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WGridLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WGridLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, CocoaGui_WGridLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/w_lineedit.mm0000644000175000017500000001530213142134462015231 00000000000000/*************************************************************************** begin : August 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaLineTextField.h" static GWENHYWFAR_CB int CocoaGui_WLineEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Enabled: [textField setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: if ([textField window]) { [[textField window] makeFirstResponder:textField]; } return 0; case GWEN_DialogProperty_Width: { NSRect frame = [textField frame]; frame.size.width = value; [textField setFrame:frame]; } return 0; case GWEN_DialogProperty_Height:{ NSRect frame = [textField frame]; frame.size.height = value; [textField setFrame:frame]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WLineEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Enabled: return ([textField isEnabled])?1:0; case GWEN_DialogProperty_Focus: if ([textField window]) { if ([[textField window] firstResponder] == textField) return 1; } return 0; case GWEN_DialogProperty_Width: return [textField frame].size.width; case GWEN_DialogProperty_Height: return [textField frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WLineEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Value:{ NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [textField setStringValue:stringValue]; [stringValue release]; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WLineEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaLineTextField *textField; textField=(CocoaLineTextField*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(textField); switch(prop) { case GWEN_DialogProperty_Title: return [[textField stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WLineEdit_End_Editing_text_handler(NSTextField *textField, void* data) { GWEN_WIDGET *w; int rv; //NSLog(@"CocoaGui_WLineEdit_End_Editing_text_handler"); w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } static void CocoaGui_WLineEdit_Changed_text_handler(NSTextField *textField, void* data) { GWEN_WIDGET *w; int rv; //NSLog(@"CocoaGui_WLineEdit_Changed_text_handler"); w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WLineEdit_Setup(GWEN_WIDGET *w) { CocoaLineTextField *textField; const char *s; uint32_t flags; GWEN_WIDGET *wParent; //gulong deleted_text_handler_id; //gulong inserted_text_handler_id; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ textField = [[[CocoaLineTextField alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 22.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) textField.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) textField.fillY = YES; if (flags & GWEN_WIDGET_FLAGS_PASSWORD) { [textField setCell:[[[NSSecureTextFieldCell alloc] init] autorelease]]; [textField setDrawsBackground:YES]; [textField setBezeled:YES]; } //[labelTextField setDrawsBackground:NO]; [[textField cell] setLineBreakMode:NSLineBreakByClipping]; //[[textField cell] setWraps:NO]; //[textField setBordered:YES]; [textField setEditable:YES]; if (s && *s) { NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [textField setStringValue:stringValue]; [stringValue release]; } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) textField); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) textField); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WLineEdit_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WLineEdit_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WLineEdit_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WLineEdit_GetCharProperty); gwenTextFieldActionPtr ptr = CocoaGui_WLineEdit_End_Editing_text_handler; [textField setC_ActionPtr:ptr Data:w]; gwenTextFieldActionPtr changed_ptr = CocoaGui_WLineEdit_Changed_text_handler; [textField setC_TextChanged_ActionPtr:changed_ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaVLineView.h0000644000175000017500000000042413142134474015543 00000000000000// // CocoaVLineView.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaVLineView : NSView { BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; @end gwenhywfar-5.12.1/gui/cocoa/CocoaVLayout.m0000644000175000017500000001063413142134462015304 00000000000000// // CocoaVLayout.m // // // Created by Samuel Strupp on 10.08.10. // Copyright 2010 Synium Software GmbH. All rights reserved. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaVLayout.h" #import "CocoaGwenGUIProtocol.h" @implementation CocoaVLayout @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; subviewsInOrder = [[NSMutableArray alloc] init]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(layoutSubviews) name:NSViewFrameDidChangeNotification object:self]; } return self; } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [subviewsInOrder release]; [super dealloc]; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor redColor] set]; NSRectFill(dirtyRect); }*/ #define borderDistance 8.0 #define cellDistance 4.0 -(void) layoutSubviews { NSRect bounds = [self bounds]; NSUInteger numOfSubViews = [subviewsInOrder count]; if (numOfSubViews > 0) { //Prepass to compute the sizes CGFloat sizesHeight[numOfSubViews]; CGFloat sizesWidth[numOfSubViews]; CGFloat exclusiveHeight = 0.0; NSUInteger exclusiveChilds = 0; NSUInteger i; for (i=0; i)subview fillX]) sizesWidth[i] = -1.0; else { CGFloat neededWidth = [()subview minSize].width; sizesWidth[i] = neededWidth; } if ([()subview fillY]) sizesHeight[i] = -1.0; else { CGFloat neededHeight = [()subview minSize].height; sizesHeight[i] = neededHeight; exclusiveHeight += neededHeight; exclusiveChilds++; } } else { sizesWidth[i] = -1.0; sizesHeight[i] = -1.0; } } //Compute standard Sizes for Subviews CGFloat stdHeight = 0.0; if (numOfSubViews > exclusiveChilds) { CGFloat fillHeight = bounds.size.height-exclusiveHeight; stdHeight = (fillHeight-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance))/(numOfSubViews-exclusiveChilds); } else { CGFloat fillHeight = bounds.size.height; stdHeight = (fillHeight-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance))/(numOfSubViews); } CGFloat stdWidth = bounds.size.width-(borderDistance+borderDistance); //if (numOfSubViews>=4) NSLog(@"view.height = %f", bounds.size.height); //change Subviews Frame NSRect actualFrame = bounds; actualFrame.origin.x = borderDistance; actualFrame.origin.y += bounds.size.height-borderDistance; for (i=0; i=4) NSLog(@"subview %i height = %f", i, usedHeight); CGFloat usedWidth = sizesWidth[i]; if (usedWidth < 0.0) usedWidth = stdWidth; NSView* subview = [subviewsInOrder objectAtIndex:i]; actualFrame.size.width = usedWidth; [subview setFrame:actualFrame]; actualFrame.origin.y -= cellDistance; } } } -(void) addLayoutSubview:(NSView*)new_subview { [subviewsInOrder addObject:new_subview]; [self addSubview:new_subview]; [self layoutSubviews]; } #pragma mark Protocoll Methods - (NSSize) minSize { NSUInteger numOfSubViews = [subviewsInOrder count]; CGFloat borderWidth = borderDistance+borderDistance; NSSize size = NSMakeSize(borderWidth, borderWidth); if (numOfSubViews > 0) { NSUInteger i; for (i=0; i)subview minSize]; if (subViewMinSize.width+borderWidth > size.width) { size.width = subViewMinSize.width+borderWidth; } size.height += subViewMinSize.height; if (i>0) size.height += cellDistance; } } } return size; } - (void)setFrame:(NSRect)frameRect { NSSize minSize = [self minSize]; if (frameRect.size.height < minSize.height) { frameRect.size.height = minSize.height; } if (frameRect.size.width < minSize.width) { frameRect.size.width = minSize.width; } [super setFrame:frameRect]; } @end gwenhywfar-5.12.1/gui/cocoa/CocoaSpacer.m0000644000175000017500000000115613142134462015115 00000000000000// // CocoaSpacer.m // // // Created by Samuel Strupp on 17.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaSpacer.h" #ifndef COCOA_SPACER_MM #define COCOA_SPACER_MM @implementation CocoaSpacer @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; } return self; } -(void) dealloc { [super dealloc]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(0.0, 0.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaHLayout.h0000644000175000017500000000054413142134474015263 00000000000000// // CocoaHLayout.h // // // Created by Samuel Strupp on 10.08.10. // #import #import "CocoaGwenGUIProtocol.h" @interface CocoaHLayout : NSView { NSMutableArray *subviewsInOrder; BOOL fillX; BOOL fillY; } @property BOOL fillX; @property BOOL fillY; -(void) addLayoutSubview:(NSView *)new_subview ; @end gwenhywfar-5.12.1/gui/cocoa/w_vline.mm0000644000175000017500000000521213142134462014550 00000000000000/*************************************************************************** begin : Auf 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaVLineView.h" static GWENHYWFAR_CB int CocoaGui_WVLine_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaVLineView *vLineView; vLineView=(CocoaVLineView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vLineView); switch(prop) { case GWEN_DialogProperty_Enabled: //gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: //gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WVLine_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaVLineView *vLineView; vLineView=(CocoaVLineView*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(vLineView); switch(prop) { case GWEN_DialogProperty_Enabled: //return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Focus: //return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int CocoaGui_WVLine_Setup(GWEN_WIDGET *w) { CocoaVLineView *vLineView; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); vLineView = [[[CocoaVLineView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 5.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) vLineView.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) vLineView.fillY = YES; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) vLineView); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) vLineView); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WHLine_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WHLine_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/cocoa_gui.h0000664000175000017500000000161014460564441014663 00000000000000/*************************************************************************** begin : August 03 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef COCOA_GUI_H #define COCOA_GUI_H #if (defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || defined _MSC_VER # ifdef BUILDING_COCOA_GUI # define COCOAGUI_API __attribute__ ((visibility("default"))) # else # define COCOAGUI_API # endif #else # define COCOAGUI_API #endif #include #include #ifdef __cplusplus extern "C" { #endif COCOAGUI_API GWEN_GUI *Cocoa_Gui_new(); #ifdef __cplusplus } #endif #endif gwenhywfar-5.12.1/gui/cocoa/libtest.m0000644000175000017500000001175713142134462014411 00000000000000/*************************************************************************** begin : August 03 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ //#include "../testdialogs/dlg_test.h" #include #include #include #include #include #import #import @interface AppDelegate : NSObject { } - (void)applicationDidFinishLaunching:(NSNotification *)aNotification; @end @implementation AppDelegate -(id) init { self = [super init]; if (self) { } return self; } -(void) dealloc { [super dealloc]; } - (void)windowWillClose:(NSNotification *)notification { [NSApp stop:self]; } - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSLog(@"Test"); NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 200.0, 200.0) styleMask:NSTitledWindowMask|NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES]; [window setDelegate:self]; [window makeKeyAndOrderFront:nil]; test1(); } @end int test1() { //fprintf(stderr, "Test\n"); NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Start"); GWEN_GUI *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } NSLog(@"GWEN Gui initialized"); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); //gtk_set_locale (); //gtk_init (&argc, &argv); // create GUI gui=Cocoa_Gui_new(); GWEN_Gui_SetGui(gui); NSLog(@"Cocoa Gui set"); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } NSLog(@"Test new"); rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); /* GWEN_GUI *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); gtk_set_locale (); gtk_init (&argc, &argv); // create GUI gui=Gtk2_Gui_new(); GWEN_Gui_SetGui(gui); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv);*/ [pool release]; return 0; } /*int test2(int argc, char **argv) { int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; GWEN_GUI *gui; gtk_set_locale (); gtk_init (&argc, &argv); gui=Gtk2_Gui_new(); GWEN_Gui_SetGui(gui); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

This is an example text..

" "

As you can see colors can " "be used.

" "", 10, 0); for (i1=1; i1<=10; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d\n", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 10, id1); for (i2=1; i2<=10; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (2)\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (1)\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; }*/ int test3(int argc, char **argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Cocoa-Test"); NSString *cocoa_string = @"Das ist ein Cocoa String"; [pool release]; return 0; } int main(int argc, char **argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSApplication *app = [NSApplication sharedApplication]; AppDelegate *app_delegate = [[AppDelegate alloc] init]; NSMenu *menu = [[NSMenu alloc] initWithTitle:@"Testprogramm"]; [menu addItemWithTitle:@"Quit" action:@selector(windowWillClose:) keyEquivalent:@"Q"]; [app setDelegate:app_delegate]; [app setMainMenu:menu]; [NSApp run]; [menu release]; [pool release]; //test1(argc, argv); //return test2(argc, argv); //return test3(argc, argv); /*#if 0 GWEN_GUI *gui; gtk_set_locale (); gtk_init (&argc, &argv); gui=Gtk2_Gui_new(); GWEN_Gui_SetGui(gui); return 0; #endif*/ } gwenhywfar-5.12.1/gui/cocoa/CocoaGroupBox.m0000644000175000017500000000142213142134462015441 00000000000000// // CocoaGroupBox.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaGroupBox.h" @implementation CocoaGroupBox @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; } return self; } -(void) dealloc { [super dealloc]; } #pragma mark Protocoll Methods - (NSSize) minSize { if ([[self contentView] conformsToProtocol:@protocol(CocoaGwenGUIProtocol)]) { NSSize size = [()[self contentView] minSize]; size.height += 24.0; size.width += 14.0; return size; } return NSMakeSize(22.0, 40.0); } - (BOOL) fillX { return fillX; } - (BOOL) fillY { return fillY; } @end gwenhywfar-5.12.1/gui/cocoa/w_pushbutton.mm0000644000175000017500000001511013142134462015644 00000000000000/*************************************************************************** begin : August 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaButton.h" static GWENHYWFAR_CB int CocoaGui_WPushButton_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaButton *button; button=(CocoaButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(button); switch(prop) { case GWEN_DialogProperty_Enabled: [button setEnabled:(value==0)?NO:YES]; return 0; case GWEN_DialogProperty_Focus: if ([button window]) { [[button window] makeFirstResponder:button]; } return 0; case GWEN_DialogProperty_Width: { NSRect frame = [button frame]; frame.size.width = value; [button setFrame:frame]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [button frame]; frame.size.height = value; [button setFrame:frame]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WPushButton_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaButton *button; button=(CocoaButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(button); switch(prop) { case GWEN_DialogProperty_Enabled: return ([button isEnabled]==YES)?1:0; case GWEN_DialogProperty_Focus: if ([button window]) { if ([[button window] firstResponder] == button) return 1; } return 0; case GWEN_DialogProperty_Width: return [button frame].size.width; case GWEN_DialogProperty_Height: return [button frame].size.height; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WPushButton_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CocoaButton *button; button=(CocoaButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(button); switch(prop) { case GWEN_DialogProperty_Title: { NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding]; [button setTitle:stringValue]; [stringValue release]; } return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WPushButton_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CocoaButton *button; button=(CocoaButton*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(button); switch(prop) { case GWEN_DialogProperty_Title: return [[button stringValue] cStringUsingEncoding:NSUTF8StringEncoding]; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void CocoaGui_WPushButton_Clicked_handler(NSButton *button, void* data) { GWEN_WIDGET *w; int rv; DBG_ERROR(0, "Clicked"); w=(GWEN_WIDGET*)data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) CocoaGui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int CocoaGui_WPushButton_Setup(GWEN_WIDGET *w) { CocoaButton *button; const char *s; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); //Create Button button = [[[CocoaButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 60.0, 24.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) button.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) button.fillY = YES; [button setBezelStyle:NSRoundedBezelStyle]; if (s && *s) { NSString *title = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding]; [button setTitle:title]; [title release]; } s=GWEN_Widget_GetIconFileName(w); if (s && *s) { GWEN_STRINGLIST *sl; sl=GWEN_Dialog_GetMediaPaths(GWEN_Widget_GetDialog(w)); if (sl) { int rv; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(sl, s, tbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Image file [%s] not found (%d)", s, rv); // ignore result here, instead create GtkImage with "broken mage" later } else { NSString *pathToIconFile = [[NSString alloc] initWithCString:GWEN_Buffer_GetStart(tbuf) encoding:NSUTF8StringEncoding]; if (pathToIconFile) { NSImage *icon = [[NSImage alloc] initWithContentsOfFile:pathToIconFile]; CGFloat height = 15.0; NSSize imageSize = [icon size]; imageSize.width = round(imageSize.width/(imageSize.height/height)); imageSize.height = 15.0; [icon setSize:imageSize]; [pathToIconFile release]; if (icon) { //[button setBezelStyle:NSRegularSquareBezelStyle]; [button setImage:icon]; [button setImagePosition:NSImageLeft]; //[[button cell] setImageScaling:NSImageScaleProportionallyUpOrDown]; [icon release]; } } } GWEN_Buffer_free(tbuf); } } GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) button); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) button); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WPushButton_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WPushButton_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WPushButton_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WPushButton_GetCharProperty); gwenActionPtr ptr = CocoaGui_WPushButton_Clicked_handler; [button setC_ActionPtr:ptr Data:w]; if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaTextBrowser.h0000644000175000017500000000072713142134474016171 00000000000000// // CocoaTextBrowser.h // // // Created by Samuel Strupp on 17.08.10. // #import #import #import "CocoaGwenGUIProtocol.h" @interface CocoaTextBrowser : WebView { BOOL fillX; BOOL fillY; NSString *loadedString; } @property BOOL fillX; @property BOOL fillY; -(void) setStringValue:(NSString *)value BasePath:(NSString *)base; -(void) setStringValue:(NSString *)value; -(NSString *) stringValue; @end gwenhywfar-5.12.1/gui/cocoa/CocoaPopUpButton.m0000644000175000017500000000353713142134462016144 00000000000000// // CocoaPopUpButton.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaPopUpButton.h" #ifndef COCOA_POPUP_BUTTON_MM #define COCOA_POPUP_BUTTON_MM @implementation CocoaPopUpButton @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frameRect pullsDown:(BOOL)flag { self = [super initWithFrame:frameRect pullsDown:flag]; if (self) { [self setTarget:self]; [self setAction:@selector(clicked:)]; c_actionPtr = nil; c_actionData = nil; fillX = NO; fillY = NO; minWidth = 40.0; } return self; } -(void) dealloc { [super dealloc]; } -(NSSize) neededTextSize { if ([self numberOfItems] > 0) { NSSize maxSize = NSZeroSize; NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor], NSForegroundColorAttributeName, [self font], NSFontAttributeName, nil]; NSArray *titles = [self itemTitles]; for (NSString *title in titles) { NSSize titleSize = [title sizeWithAttributes:attributes]; if (maxSize.width < titleSize.width) maxSize.width = titleSize.width; if (maxSize.height < titleSize.height) maxSize.height = titleSize.height; } return maxSize; } return NSZeroSize; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; minWidth = size.width + 40.0; } -(void) setC_PopUpActionPtr:(gwenPopUpActionPtr)ptr Data:(void*)data { c_actionPtr = ptr; c_actionData = data; } -(void) clicked:(id) sender { if (c_actionPtr) { c_actionPtr(self, c_actionData); } } - (void)setTitle:(NSString *)aString { [super setTitle:aString]; [self computeMinWidth]; } - (void)addItemWithTitle:(NSString *)title { [super addItemWithTitle:title]; [self computeMinWidth]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(minWidth, 24.0); } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaLineTextField.h0000644000175000017500000000116413142134474016375 00000000000000// // CocoaLineTextField.h // // // Created by Samuel Strupp on 10.08.10. // #ifndef COCOA_LINE_TEXTFIELD_H #define COCOA_LINE_TEXTFIELD_H #import #import "CocoaLabel.h" typedef void (*gwenTextFieldActionPtr)(NSTextField *textField, void *data); @interface CocoaLineTextField : CocoaLabel { gwenTextFieldActionPtr c_actionPtr; void *c_actionData; gwenTextFieldActionPtr c_textChangedActionPtr; void *c_textChangedActionData; } -(void) setC_ActionPtr:(gwenTextFieldActionPtr)ptr Data:(void *)data; -(void) setC_TextChanged_ActionPtr:(gwenTextFieldActionPtr)ptr Data:(void *)data; @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaLabel.h0000644000175000017500000000056713142134474014722 00000000000000// // CocoaLabel.h // // // Created by Samuel Strupp on 10.08.10. // #ifndef COCOA_LABEL_H #define COCOA_LABEL_H #import #import "CocoaGwenGUIProtocol.h" @interface CocoaLabel : NSTextField { BOOL fillX; BOOL fillY; CGFloat minWidth; } @property BOOL fillX; @property BOOL fillY; -(NSSize) neededTextSize; @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaGwenGUIProtocol.h0000644000175000017500000000042613142134462016661 00000000000000// // CocoaGwenGUIProtocol.h // CocoaGwenGuiTest // // Created by Samuel Strupp on 12.08.10. // Copyright 2010 Synium Software GmbH. All rights reserved. // #import @protocol CocoaGwenGUIProtocol - (NSSize) minSize; - (BOOL) fillX; - (BOOL) fillY; @end gwenhywfar-5.12.1/gui/cocoa/w_progressbar.mm0000644000175000017500000001266713142134462016000 00000000000000/*************************************************************************** begin : August 10 2010 copyright : (C) 2010 by Samuel Strupp *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #import "CocoaProgressbar.h" typedef struct W_PROGRESSBAR W_PROGRESSBAR; struct W_PROGRESSBAR { int minValue; int maxValue; int currentValue; }; GWEN_INHERIT(GWEN_WIDGET, W_PROGRESSBAR) static GWENHYWFAR_CB int CocoaGui_WProgressBar_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CocoaProgressbar *progressbar; W_PROGRESSBAR *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_PROGRESSBAR, w); assert(xw); progressbar=(CocoaProgressbar*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(progressbar); switch(prop) { case GWEN_DialogProperty_Enabled: return 0; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: { NSRect frame = [progressbar frame]; frame.size.width = value; [progressbar setFrame:frame]; } return 0; case GWEN_DialogProperty_Height: { NSRect frame = [progressbar frame]; frame.size.height = value; [progressbar setFrame:frame]; } return 0; case GWEN_DialogProperty_Value: { double d; xw->currentValue=value; d=(double)value; [progressbar setDoubleValue:d]; //NSLog(@"progressbar value = %f",d); return 0; } case GWEN_DialogProperty_MinValue: { double d; xw->minValue=value; d=(double)value; [progressbar setMinValue:d]; //NSLog(@"progressbar min value = %f",d); return 0; } case GWEN_DialogProperty_MaxValue: { double d; xw->maxValue=value; d=(double)value; [progressbar setMaxValue:d]; //NSLog(@"progressbar max value = %f",d); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int CocoaGui_WProgressBar_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CocoaProgressbar *progressbar; W_PROGRESSBAR *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_PROGRESSBAR, w); assert(xw); progressbar=(CocoaProgressbar*)(GWEN_Widget_GetImplData(w, COCOA_DIALOG_WIDGET_REAL)); assert(progressbar); switch(prop) { case GWEN_DialogProperty_Enabled: return 1; case GWEN_DialogProperty_Focus: return 0; case GWEN_DialogProperty_Width: return [progressbar frame].size.width; case GWEN_DialogProperty_Height: return [progressbar frame].size.height; case GWEN_DialogProperty_Value: return xw->currentValue; case GWEN_DialogProperty_MinValue: return xw->minValue; case GWEN_DialogProperty_MaxValue: return xw->maxValue; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int CocoaGui_WProgressBar_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char* CocoaGui_WProgressBar_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void GWENHYWFAR_CB CocoaGui_WProgressBar_FreeData(void *bp, void *p) { W_PROGRESSBAR *xw; xw=(W_PROGRESSBAR*) p; GWEN_FREE_OBJECT(xw); } int CocoaGui_WProgressBar_Setup(GWEN_WIDGET *w) { CocoaProgressbar *progressbar; //const char *s; uint32_t flags; GWEN_WIDGET *wParent; W_PROGRESSBAR *xw; GWEN_NEW_OBJECT(W_PROGRESSBAR, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_PROGRESSBAR, w, xw, CocoaGui_WProgressBar_FreeData); flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); //s=GWEN_Widget_GetText(w, 0); //g=gtk_progress_bar_new(); progressbar = [[[CocoaProgressbar alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 20.0)] autorelease]; if (flags & GWEN_WIDGET_FLAGS_FILLX) progressbar.fillX = YES; if (flags & GWEN_WIDGET_FLAGS_FILLY) progressbar.fillY = YES; [progressbar setIndeterminate:NO]; [progressbar setUsesThreadedAnimation:YES]; [progressbar startAnimation:nil]; GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_REAL, (void*) progressbar); GWEN_Widget_SetImplData(w, COCOA_DIALOG_WIDGET_CONTENT, (void*) progressbar); GWEN_Widget_SetSetIntPropertyFn(w, CocoaGui_WProgressBar_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, CocoaGui_WProgressBar_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, CocoaGui_WProgressBar_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, CocoaGui_WProgressBar_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cocoa/CocoaComboBox.m0000644000175000017500000000354313142134462015412 00000000000000// // CocoaComboBox.m // // // Created by Samuel Strupp on 10.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaComboBox.h" #ifndef COCOA_COMBOBOX_MM #define COCOA_COMBOBOX_MM @implementation CocoaComboBox @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setTarget:self]; [self setAction:@selector(textChanged:)]; c_actionPtr = nil; c_actionData = nil; c_actionPtr = nil; } return self; } -(void) dealloc { [super dealloc]; } -(NSSize) neededTextSize { if ([self numberOfItems] > 0) { NSSize maxSize = NSZeroSize; NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor], NSForegroundColorAttributeName, [self font], NSFontAttributeName, nil]; NSArray *objectValues = [self objectValues]; for (NSString *s in objectValues) { NSSize titleSize = [s sizeWithAttributes:attributes]; if (maxSize.width < titleSize.width) maxSize.width = titleSize.width; if (maxSize.height < titleSize.height) maxSize.height = titleSize.height; } return maxSize; } return NSZeroSize; } -(void) computeMinWidth { NSSize size = [self neededTextSize]; minWidth = size.width+44.0; } -(void) setC_ComboBoxActionPtr:(gwenComboBoxActionPtr)ptr Data:(void*)data { c_actionPtr = ptr; c_actionData = data; } -(void) textChanged:(id)sender { if (c_actionPtr) { c_actionPtr(self, c_actionData); } } - (void)setStringValue:(NSString *)aString { [super setStringValue:aString]; //damit hebeln wir die automatische Größen Berechnung vom CocoaLabel aus. } - (void)addItemWithObjectValue:(id)anObject { [super addItemWithObjectValue:anObject]; [self computeMinWidth]; } #pragma mark Protocoll Methods - (NSSize) minSize { return NSMakeSize(minWidth, 24.0); } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaSpinbox.m0000644000175000017500000000746213142134462015330 00000000000000// // CocoaSpinbox.m // // // Created by Samuel Strupp on 19.08.10. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaSpinbox.h" #ifndef COCOA_SPINBOX_MM #define COCOA_SPINBOX_MM @implementation CocoaSpinbox @synthesize fillX; @synthesize fillY; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { textfield = [[NSTextField alloc] initWithFrame:NSMakeRect(0.0, 0.0, 40.0, 27.0)]; [textfield setAlignment:NSRightTextAlignment]; [textfield setTarget:self]; [textfield setAction:@selector(getValueFromTextField:)]; [self addSubview:textfield]; stepper = [[NSStepper alloc] initWithFrame:NSMakeRect(40.0, 0.0, 19.0, 27.0)]; [stepper setTarget:self]; [stepper setAction:@selector(getValueFromStepper:)]; [stepper setValueWraps:NO]; [self addSubview:stepper]; fillX = NO; fillY = NO; minValue = NSIntegerMin; maxValue = NSIntegerMax; [stepper setMinValue:minValue]; [stepper setMaxValue:maxValue]; c_actionPtr = nil; c_actionData = nil; minWidth = 40.0; } return self; } -(void) dealloc { [stepper release]; [textfield release]; [super dealloc]; } -(void) setC_ActionPtr:(gwenSpinBoxActionPtr)ptr Data:(void*)data { c_actionPtr = ptr; c_actionData = data; } -(void) valueDidChange { if (c_actionPtr) { c_actionPtr(self, c_actionData); } } -(void) setFrame:(NSRect)frameRect { if (frameRect.size.height < 22.0) frameRect.size.height = 22.0; [super setFrame:frameRect]; NSRect bounds = [self bounds]; NSRect stepperFrame = NSMakeRect(bounds.origin.x+bounds.size.width-16.0, bounds.origin.y-3.0, 19.0, 27.0); [stepper setFrame:stepperFrame]; NSRect textfieldFrame = NSMakeRect(bounds.origin.x, bounds.origin.y, bounds.size.width-16.0, 22.0); [textfield setFrame:textfieldFrame]; } -(void) makeFirstResponder { if ([textfield window]) { [[textfield window] makeFirstResponder:textfield]; } } -(BOOL) isFirstResponder { if ([textfield window]) { if ([[textfield window] firstResponder] == textfield) return YES; } return NO; } -(void) setEnabled:(BOOL)value { [textfield setEnabled:value]; [stepper setEnabled:value]; } -(BOOL) isEnabled { return [textfield isEnabled]; } -(void) setIntegerValue:(NSInteger)new_value { if (new_value >= minValue && new_value <= maxValue) { [textfield setIntegerValue:new_value]; [stepper setIntegerValue:new_value]; } } -(NSInteger) integerValue { return [textfield integerValue]; } -(void) setMinValue:(NSInteger)new_min_value { minValue = new_min_value; [stepper setMinValue:minValue]; if (maxValue < minValue) maxValue = minValue; if ([self integerValue] < minValue) [self setIntegerValue:minValue]; } -(NSInteger) minValue { return minValue; } -(void) setMaxValue:(NSInteger)new_max_value { maxValue = new_max_value; [stepper setMaxValue:maxValue]; if (maxValue < minValue) minValue = maxValue; if ([self integerValue] > maxValue) [self setIntegerValue:maxValue]; } -(NSInteger) maxValue { return maxValue; } - (void)setStringValue:(NSString *)aString { NSInteger value = 0; if (aString && [aString length] > 0) { value = [aString integerValue]; } [self setIntegerValue:value]; } -(NSString*) stringValue { return [textfield stringValue]; } -(void) getValueFromStepper:(id)sender { NSInteger new_value = [stepper integerValue]; if (new_value >= minValue && new_value <= maxValue) { [textfield setIntegerValue:new_value]; [self valueDidChange]; } } -(void) getValueFromTextField:(id)sender { NSInteger new_value = [textfield integerValue]; if (new_value < minValue) new_value = minValue; if (new_value > maxValue) new_value = maxValue; [textfield setIntegerValue:new_value]; [stepper setIntegerValue:new_value]; [self valueDidChange]; } #pragma mark Protocol Methods - (NSSize) minSize { return NSMakeSize(minWidth, 22.0); } @end #endif gwenhywfar-5.12.1/gui/cocoa/CocoaGridLayout.m0000644000175000017500000002412513142134462015764 00000000000000// // CocoaGridLayout.m // // // Created by Samuel Strupp on 10.08.10. // Copyright 2010 Synium Software GmbH. All rights reserved. // #ifdef HAVE_CONFIG_H # include #endif #import "CocoaGridLayout.h" #import "CocoaGwenGUIProtocol.h" @implementation CocoaGridLayout @synthesize fillX; @synthesize fillY; @synthesize columns; @synthesize rows; - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { fillX = NO; fillY = NO; subviewsInOrder = [[NSMutableArray alloc] init]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(layoutSubviews) name:NSViewFrameDidChangeNotification object:self]; } return self; } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [subviewsInOrder release]; [super dealloc]; } /*- (void)drawRect:(NSRect)dirtyRect { //debug colors [[NSColor redColor] set]; NSRectFill(dirtyRect); }*/ #define borderDistance 8.0 #define cellDistance 4.0 -(void) layoutSubviews { NSRect bounds = [self bounds]; NSUInteger numOfSubViews = [subviewsInOrder count]; if (numOfSubViews > 0) { //Prepass to compute the sizes BOOL columnMode = (columns > 0); NSInteger neededColumns, neededRows; if (columnMode) { neededColumns = columns; neededRows = numOfSubViews/columns + numOfSubViews%columns; } else { if (rows > 0) { neededColumns = numOfSubViews/rows + numOfSubViews%rows; neededRows = rows; } else { //We choose column mode with one column neededColumns = 1; neededRows = numOfSubViews; } } CGFloat minWidthNeededForColumn[neededColumns]; CGFloat minHeightNeededForRow[neededRows]; char fillXFlags[neededColumns]; char fillYFlags[neededRows]; NSUInteger i; for (i=0; i)subview minSize]; if (minWidthNeededForColumn[actualColumn] < minSize.width) minWidthNeededForColumn[actualColumn] = minSize.width; if (minHeightNeededForRow[actualRow] < minSize.height) minHeightNeededForRow[actualRow] = minSize.height; if ([()subview fillX]) fillXFlags[actualColumn] = 1; if ([()subview fillY]) fillYFlags[actualRow] = 1; } } //compute exact sizes CGFloat maxWidth = bounds.size.width-borderDistance-borderDistance-(neededColumns-1)*cellDistance; NSInteger flexibleCells = 0; for(i=0; i 0.0 && flexibleCells > 0) { CGFloat flexibleStdWidth = maxWidth/flexibleCells; for (i=0; i 0.0 && flexibleCells > 0) { CGFloat flexibleStdHeight = maxHeight/flexibleCells; for (i=0; i= 0) actualFrame.origin.x += minWidthNeededForColumn[oldIndex]+cellDistance; actualFrame.origin.y = bounds.origin.y+bounds.size.height-borderDistance-minHeightNeededForRow[actualRow]; oldIndex = actualColumn; } } NSView* subview = [subviewsInOrder objectAtIndex:i]; actualFrame.size.height = minHeightNeededForRow[actualRow]; actualFrame.size.width = minWidthNeededForColumn[actualColumn]; NSRect realFrame = actualFrame; if ([subview conformsToProtocol:@protocol(CocoaGwenGUIProtocol)]) { BOOL flexWidth = [()subview fillX]; BOOL flexHeight = [()subview fillY]; if (!flexWidth || !flexHeight) { NSSize minSize = [()subview minSize]; if (!flexWidth && minSize.width < realFrame.size.width) realFrame.size.width = minSize.width; if (!flexHeight && minSize.height < realFrame.size.height) { realFrame.origin.y += realFrame.size.height-minSize.height; realFrame.size.height = minSize.height; } } } [subview setFrame:realFrame]; //NSLog(@"frame = %@", NSStringFromRect(actualFrame)); if (columnMode) actualFrame.origin.x += actualFrame.size.width+cellDistance; else if (actualRow+1 < neededRows) actualFrame.origin.y -= minHeightNeededForRow[actualRow+1]+cellDistance; } /*CGFloat sizesHeight[numOfSubViews]; CGFloat sizesWidth[numOfSubViews]; CGFloat exclusiveHeight = 0.0; NSUInteger exclusiveChilds = 0; NSUInteger i; for (i=0; i)subview fillX]) sizesWidth[i] = -1.0; else { CGFloat neededWidth = [()subview minSize].width; sizesWidth[i] = neededWidth; } if ([()subview fillY]) sizesHeight[i] = -1.0; else { CGFloat neededHeight = [()subview minSize].height; sizesHeight[i] = neededHeight; exclusiveHeight += neededHeight; exclusiveChilds++; } } else { sizesWidth[i] = -1.0; sizesHeight[i] = -1.0; } } //Compute standard Sizes for Subviews CGFloat stdHeight = 0.0; if (numOfSubViews > exclusiveChilds) { CGFloat fillHeight = bounds.size.height-exclusiveHeight; stdHeight = (fillHeight-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance))/(numOfSubViews-exclusiveChilds); } else { CGFloat fillHeight = bounds.size.height; stdHeight = (fillHeight-(borderDistance+borderDistance)-((numOfSubViews-1)*cellDistance))/(numOfSubViews); } CGFloat stdWidth = bounds.size.width-(borderDistance+borderDistance); //change Subviews Frame NSRect actualFrame = bounds; actualFrame.origin.x = borderDistance; actualFrame.origin.y += bounds.size.height-borderDistance; for (i=0; i 0) { NSInteger neededColumns, neededRows; BOOL columnMode = (columns > 0); if (columnMode) { neededColumns = columns; neededRows = numOfSubViews/columns + numOfSubViews%columns; } else { if (rows > 0) { neededColumns = numOfSubViews/rows + numOfSubViews%rows; neededRows = rows; } else { //We choose column mode with one column neededColumns = 1; neededRows = numOfSubViews; } } CGFloat minWidthNeededForColumn[neededColumns]; CGFloat minHeightNeededForRow[neededRows]; NSUInteger i; for (i=0; i)subview minSize]; if (minWidthNeededForColumn[actualColumn] < minSize.width) minWidthNeededForColumn[actualColumn] = minSize.width; if (minHeightNeededForRow[actualRow] < minSize.height) minHeightNeededForRow[actualRow] = minSize.height; } } CGFloat minNeededWidth = borderDistance+borderDistance+(neededColumns-1)*cellDistance; for (i=0; i #if (defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || defined _MSC_VER # ifdef BUILDING_GTK2_GUI # define GTK2GUI_API __attribute__ ((visibility("default"))) # else # define GTK2GUI_API # endif #else # define GTK2GUI_API #endif #include GTK2GUI_API GWEN_GUI *Gtk2_Gui_new(); #endif gwenhywfar-5.12.1/gui/gtk2/w_vspacer.c0000644000175000017500000000523113606365134014502 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WVSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WVSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk2Gui_WVSpacer_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_vbox_new(FALSE, 0); GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLY); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WVSpacer_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WVSpacer_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_progressbar.c0000644000175000017500000001504313606365666015404 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct W_PROGRESSBAR W_PROGRESSBAR; struct W_PROGRESSBAR { int minValue; int maxValue; int currentValue; }; GWEN_INHERIT(GWEN_WIDGET, W_PROGRESSBAR) static GWENHYWFAR_CB int Gtk2Gui_WProgressBar_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkProgressBar *g; W_PROGRESSBAR *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_PROGRESSBAR, w); assert(xw); g=GTK_PROGRESS_BAR(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: { xw->currentValue=value; if (xw->maxValue) { gdouble d; char numbuf[32]; d=(gdouble)(xw->currentValue-xw->minValue)/(gdouble)(xw->maxValue); gtk_progress_bar_set_fraction(g, d); snprintf(numbuf, sizeof(numbuf)-1, "%d %%", (int)(d*100.0)); numbuf[sizeof(numbuf)-1]=0; gtk_progress_bar_set_text(g, numbuf); } else { gtk_progress_bar_set_fraction(g, 0.0); gtk_progress_bar_set_text(g, ""); } return 0; } case GWEN_DialogProperty_MinValue: { xw->minValue=value; if (xw->maxValue) { gdouble d; char numbuf[32]; d=(gdouble)(xw->currentValue-xw->minValue)/(gdouble)(xw->maxValue); gtk_progress_bar_set_fraction(g, d); snprintf(numbuf, sizeof(numbuf)-1, "%d %%", (int)(d*100.0)); numbuf[sizeof(numbuf)-1]=0; gtk_progress_bar_set_text(g, numbuf); } else { gtk_progress_bar_set_fraction(g, 0.0); gtk_progress_bar_set_text(g, ""); } return 0; } case GWEN_DialogProperty_MaxValue: { xw->maxValue=value; if (xw->maxValue) { gdouble d; char numbuf[32]; d=(gdouble)(xw->currentValue-xw->minValue)/(gdouble)(xw->maxValue); gtk_progress_bar_set_fraction(g, d); snprintf(numbuf, sizeof(numbuf)-1, "%d %%", (int)(d*100.0)); numbuf[sizeof(numbuf)-1]=0; gtk_progress_bar_set_text(g, numbuf); return 0; } else { gtk_progress_bar_set_fraction(g, 0.0); gtk_progress_bar_set_text(g, ""); } } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WProgressBar_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkProgressBar *g; W_PROGRESSBAR *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_PROGRESSBAR, w); assert(xw); g=GTK_PROGRESS_BAR(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return xw->currentValue; case GWEN_DialogProperty_MinValue: return xw->minValue; case GWEN_DialogProperty_MaxValue: return xw->maxValue; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WProgressBar_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WProgressBar_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void GWENHYWFAR_CB Gtk2Gui_WProgressBar_FreeData(GWEN_UNUSED void *bp, void *p) { W_PROGRESSBAR *xw; xw=(W_PROGRESSBAR *) p; GWEN_FREE_OBJECT(xw); } int Gtk2Gui_WProgressBar_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*const char *s;*/ /*uint32_t flags;*/ GWEN_WIDGET *wParent; W_PROGRESSBAR *xw; GWEN_NEW_OBJECT(W_PROGRESSBAR, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_PROGRESSBAR, w, xw, Gtk2Gui_WProgressBar_FreeData); /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); /*s=GWEN_Widget_GetText(w, 0);*/ g=gtk_progress_bar_new(); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WProgressBar_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WProgressBar_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WProgressBar_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WProgressBar_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_listbox.c0000644000175000017500000003360513606365711014532 00000000000000/*************************************************************************** begin : Fri Jul 09 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #define W_LISTBOX_MAX_TYPES 256 static GWENHYWFAR_CB int Gtk2Gui_WListBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: { GtkTreePath *path; path=gtk_tree_path_new_from_indices(value, -1); gtk_tree_view_set_cursor(GTK_TREE_VIEW(g), path, NULL, FALSE); gtk_tree_path_free(path); return 0; } case GWEN_DialogProperty_SelectionMode: { GtkTreeSelection *sel; sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(g)); if (sel) { switch (value) { case GWEN_Dialog_SelectionMode_None: gtk_tree_selection_set_mode(sel, GTK_SELECTION_NONE); return 0; case GWEN_Dialog_SelectionMode_Single: gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); return 0; case GWEN_Dialog_SelectionMode_Multi: gtk_tree_selection_set_mode(sel, GTK_SELECTION_MULTIPLE); return 0; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", value); return GWEN_ERROR_INVALID; } break; } case GWEN_DialogProperty_ColumnWidth: { GtkTreeViewColumn *col; col=gtk_tree_view_get_column(GTK_TREE_VIEW(g), index); if (col) { gtk_tree_view_column_set_fixed_width(col, value); return 0; } /* no width */ return GWEN_ERROR_INVALID; } case GWEN_DialogProperty_SortDirection: { GtkTreeViewColumn *col; int i; int cols; /* remove sort indicator from all columns */ cols=GWEN_Widget_GetColumns(w); for (i=0; iW_LISTBOX_MAX_TYPES) cols=W_LISTBOX_MAX_TYPES; for (i=0; idata)); if (s && *s) GWEN_Buffer_AppendString(tbuf, s); cnt++; le=g_list_next(le); } /* while */ GWEN_Widget_SetText(w, GTK2_DIALOG_STRING_TITLE, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); g_list_free(cols); return GWEN_Widget_GetText(w, GTK2_DIALOG_STRING_TITLE); } return defaultValue; } case GWEN_DialogProperty_Value: { GtkTreePath *path; path=gtk_tree_path_new_from_indices(index, -1); if (path!=NULL) { GtkListStore *sto; GtkTreeIter iter; sto=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(g))); if (gtk_tree_model_get_iter(GTK_TREE_MODEL(sto), &iter, path)) { GList *cols; cols=gtk_tree_view_get_columns(GTK_TREE_VIEW(g)); if (cols) { GList *le; GWEN_BUFFER *tbuf; int cnt=0; tbuf=GWEN_Buffer_new(0, 256, 0, 1); le=g_list_first(cols); while (le) { gchar *s; if (cnt) GWEN_Buffer_AppendByte(tbuf, '\t'); gtk_tree_model_get(GTK_TREE_MODEL(sto), &iter, cnt, &s, -1, NULL); if (s) { GWEN_Buffer_AppendString(tbuf, s); g_free(s); } cnt++; le=g_list_next(le); } /* while */ GWEN_Widget_SetText(w, GTK2_DIALOG_STRING_VALUE, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); g_list_free(cols); return GWEN_Widget_GetText(w, GTK2_DIALOG_STRING_VALUE); } } gtk_tree_path_free(path); } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk2Gui_WListBox_CursorChanged_handler(GWEN_UNUSED GtkTreeView *g, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WListBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; GtkWidget *gScroll; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*gulong changed_handler_id;*/ /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); gScroll=gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gScroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); g=gtk_tree_view_new(); gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(g), TRUE); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(g), TRUE); gtk_container_add(GTK_CONTAINER(gScroll), GTK_WIDGET(g)); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) gScroll); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WListBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WListBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WListBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WListBox_GetCharProperty); /*changed_handler_id=*/g_signal_connect(g, "cursor-changed", G_CALLBACK(Gtk2Gui_WListBox_CursorChanged_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_groupbox.c0000644000175000017500000001243113606365604014706 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WGroupBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WGroupBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WGroupBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_frame_set_label(GTK_FRAME(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WGroupBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_frame_get_label(GTK_FRAME(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WGroupBox_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; uint32_t cflags; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK2_DIALOG_WIDGET_REAL)); assert(gChild); cflags=GWEN_Widget_GetFlags(wChild); gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, 0); return 0; } int Gtk2Gui_WGroupBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; GtkWidget *gContent; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); g=gtk_frame_new(s); gContent=gtk_vbox_new(TRUE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); gtk_container_add(GTK_CONTAINER(g), gContent); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) gContent); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WGroupBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WGroupBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WGroupBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WGroupBox_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk2Gui_WGroupBox_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_pushbutton.c0000644000175000017500000001412613606365201015250 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WPushButton_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WPushButton_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WPushButton_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_button_set_label(g, value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WPushButton_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_button_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk2Gui_WPushButton_Clicked_handler(GWEN_UNUSED GtkButton *button, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WPushButton_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*gulong clicked_handler_id;*/ /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ if (s && *s) g=gtk_button_new_with_mnemonic(s); else g=gtk_button_new(); s=GWEN_Widget_GetIconFileName(w); if (s && *s) { GWEN_STRINGLIST *sl; sl=GWEN_Dialog_GetMediaPaths(GWEN_Widget_GetDialog(w)); if (sl) { int rv; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(sl, s, tbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Image file [%s] not found (%d)", s, rv); /* ignore result here, instead create GtkImage with "broken mage" later */ } else { GtkWidget *gImage; gImage=gtk_image_new_from_file(GWEN_Buffer_GetStart(tbuf)); gtk_button_set_image(GTK_BUTTON(g), gImage); gtk_button_set_image_position(GTK_BUTTON(g), GTK_POS_LEFT); } GWEN_Buffer_free(tbuf); } } GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WPushButton_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WPushButton_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WPushButton_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WPushButton_GetCharProperty); /*clicked_handler_id=*/g_signal_connect(g, "clicked", G_CALLBACK(Gtk2Gui_WPushButton_Clicked_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/gtk2_gui_dialog.c0000644000175000017500000003261013606367455015554 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gtk2_gui_dialog_p.h" #include #include #include #include #include #include #include #include #include #include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) #define GTK2_DIALOG_WIDGET_REAL 0 #define GTK2_DIALOG_WIDGET_CONTENT 1 #define GTK2_DIALOG_WIDGET_DATA 2 #define GTK2_DIALOG_STRING_TITLE 0 #define GTK2_DIALOG_STRING_VALUE 1 #include "w_combobox.c" #include "w_label.c" #include "w_dialog.c" #include "w_gridlayout.c" #include "w_hlayout.c" #include "w_hline.c" #include "w_hspacer.c" #include "w_vlayout.c" #include "w_vline.c" #include "w_vspacer.c" #include "w_pushbutton.c" #include "w_lineedit.c" #include "w_textedit.c" #include "w_textbrowser.c" #include "w_stack.c" #include "w_tabbook.c" #include "w_groupbox.c" #include "w_progressbar.c" #include "w_listbox.c" #include "w_checkbox.c" #include "w_scrollarea.c" #include "w_radiobutton.c" #include "w_spinbox.c" GWEN_INHERIT(GWEN_DIALOG, GTK2_GUI_DIALOG) void Gtk2Gui_Dialog_Extend(GWEN_DIALOG *dlg) { GTK2_GUI_DIALOG *xdlg; GWEN_NEW_OBJECT(GTK2_GUI_DIALOG, xdlg); GWEN_INHERIT_SETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg, xdlg, Gtk2Gui_Dialog_FreeData); /* set virtual functions */ xdlg->setIntPropertyFn=GWEN_Dialog_SetSetIntPropertyFn(dlg, Gtk2Gui_Dialog_SetIntProperty); xdlg->getIntPropertyFn=GWEN_Dialog_SetGetIntPropertyFn(dlg, Gtk2Gui_Dialog_GetIntProperty); xdlg->setCharPropertyFn=GWEN_Dialog_SetSetCharPropertyFn(dlg, Gtk2Gui_Dialog_SetCharProperty); xdlg->getCharPropertyFn=GWEN_Dialog_SetGetCharPropertyFn(dlg, Gtk2Gui_Dialog_GetCharProperty); } void Gtk2Gui_Dialog_Unextend(GWEN_DIALOG *dlg) { GTK2_GUI_DIALOG *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); /* reset virtual functions */ GWEN_Dialog_SetSetIntPropertyFn(dlg, xdlg->setIntPropertyFn); GWEN_Dialog_SetGetIntPropertyFn(dlg, xdlg->getIntPropertyFn); GWEN_Dialog_SetSetCharPropertyFn(dlg, xdlg->setCharPropertyFn); GWEN_Dialog_SetGetCharPropertyFn(dlg, xdlg->getCharPropertyFn); GWEN_INHERIT_UNLINK(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); } void GWENHYWFAR_CB Gtk2Gui_Dialog_FreeData(GWEN_UNUSED void *bp, void *p) { GTK2_GUI_DIALOG *xdlg; xdlg=(GTK2_GUI_DIALOG *) p; if (xdlg->mainWidget) gtk_widget_destroy(xdlg->mainWidget); GWEN_FREE_OBJECT(xdlg); } GtkWidget *Gtk2Gui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg) { GTK2_GUI_DIALOG *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); return xdlg->mainWidget; } GWENHYWFAR_CB int Gtk2Gui_Dialog_SetIntProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { return GWEN_Widget_SetIntProperty(w, prop, index, value, doSignal); } GWENHYWFAR_CB int Gtk2Gui_Dialog_GetIntProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { return GWEN_Widget_GetIntProperty(w, prop, index, defaultValue); } GWENHYWFAR_CB int Gtk2Gui_Dialog_SetCharProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { return GWEN_Widget_SetCharProperty(w, prop, index, value, doSignal); } GWENHYWFAR_CB const char *Gtk2Gui_Dialog_GetCharProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { return GWEN_Widget_GetCharProperty(w, prop, index, defaultValue); } int Gtk2Gui_Dialog_Setup(GWEN_DIALOG *dlg, GWEN_UNUSED GtkWidget *parentWindow) { GTK2_GUI_DIALOG *xdlg; GWEN_WIDGET_TREE *wtree; GWEN_WIDGET *w; GtkWindow *gw; int rv; GList *tll; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); wtree=GWEN_Dialog_GetWidgets(dlg); if (wtree==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget tree in dialog"); return GWEN_ERROR_NOT_FOUND; } w=GWEN_Widget_Tree_GetFirst(wtree); if (w==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widgets in dialog"); return GWEN_ERROR_NOT_FOUND; } rv=Gtk2Gui_Dialog_SetupTree(w); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } gw=GTK_WINDOW(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); gtk_window_set_type_hint(GTK_WINDOW(gw), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(GTK_WINDOW(gw), GTK_WIN_POS_CENTER_ON_PARENT); /*gtk_window_set_keep_above(GTK_WINDOW(gw), TRUE);*/ xdlg->mainWidget=GTK_WIDGET(gw); tll=gtk_window_list_toplevels(); if (tll) { GList *element; GtkWindow *topLevel=NULL; for (element = tll; element; element = g_list_next(element)) { GtkWindow *win = GTK_WINDOW(element->data); if (gtk_window_is_active(win)) { topLevel=win; break; } } g_list_free(tll); if (topLevel) { DBG_NOTICE(GWEN_LOGDOMAIN, "Found active window [%s]", gtk_window_get_title(topLevel)); gtk_window_set_transient_for(gw, topLevel); } else { DBG_ERROR(GWEN_LOGDOMAIN, "No active window found..."); } } return 0; } void Gtk2Gui_Dialog_Leave(GWEN_DIALOG *dlg, int result) { GTK2_GUI_DIALOG *xdlg; GWEN_DIALOG *parent; /* get toplevel dialog, the one which actually is the GUI dialog */ while ((parent=GWEN_Dialog_GetParentDialog(dlg))) dlg=parent; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); xdlg->response=result; if (g_main_loop_is_running(xdlg->loop)) g_main_loop_quit(xdlg->loop); } static void run_unmap_handler(GWEN_UNUSED GtkWindow *window, gpointer data) { GWEN_DIALOG *dlg; GTK2_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); Gtk2Gui_Dialog_Leave(dlg, 0); } static gint run_delete_handler(GWEN_UNUSED GtkWindow *window, GWEN_UNUSED GdkEventAny *event, gpointer data) { GWEN_DIALOG *dlg; GTK2_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); Gtk2Gui_Dialog_Leave(dlg, 0); return TRUE; /* Do not destroy */ } static void run_destroy_handler(GWEN_UNUSED GtkWindow *window, gpointer data) { GWEN_DIALOG *dlg; GTK2_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); xdlg->destroyed=1; } int GTK2_Gui_Dialog_Run(GWEN_DIALOG *dlg, int untilEnd) { GTK2_GUI_DIALOG *xdlg; GtkWidget *g; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK2_GUI_DIALOG, dlg); assert(xdlg); g=Gtk2Gui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); Gtk2Gui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } xdlg->unmap_handler = g_signal_connect(g, "unmap", G_CALLBACK(run_unmap_handler), dlg); xdlg->delete_handler = g_signal_connect(g, "delete-event", G_CALLBACK(run_delete_handler), dlg); xdlg->destroy_handler = g_signal_connect(g, "destroy", G_CALLBACK(run_destroy_handler), dlg); xdlg->loop=g_main_loop_new(NULL, FALSE); if (untilEnd) g_main_loop_run(xdlg->loop); else { GMainContext *ctx; ctx=g_main_loop_get_context(xdlg->loop); while (g_main_context_pending(ctx)) g_main_context_iteration(ctx, FALSE); } g_main_loop_unref(xdlg->loop); if (!xdlg->destroyed) { g_signal_handler_disconnect(g, xdlg->unmap_handler); g_signal_handler_disconnect(g, xdlg->delete_handler); g_signal_handler_disconnect(g, xdlg->destroy_handler); } return xdlg->response; } int Gtk2Gui_Dialog_SetupTree(GWEN_WIDGET *w) { int rv; switch (GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: rv=Gtk2Gui_WDialog_Setup(w); break; case GWEN_Widget_TypeLabel: rv=Gtk2Gui_WLabel_Setup(w); break; case GWEN_Widget_TypeGridLayout: rv=Gtk2Gui_WGridLayout_Setup(w); break; case GWEN_Widget_TypeVLayout: rv=Gtk2Gui_WVLayout_Setup(w); break; case GWEN_Widget_TypeHLayout: rv=Gtk2Gui_WHLayout_Setup(w); break; case GWEN_Widget_TypePushButton: rv=Gtk2Gui_WPushButton_Setup(w); break; case GWEN_Widget_TypeLineEdit: rv=Gtk2Gui_WLineEdit_Setup(w); break; case GWEN_Widget_TypeHLine: rv=Gtk2Gui_WHLine_Setup(w); break; case GWEN_Widget_TypeVLine: rv=Gtk2Gui_WVLine_Setup(w); break; case GWEN_Widget_TypeVSpacer: rv=Gtk2Gui_WVSpacer_Setup(w); break; case GWEN_Widget_TypeHSpacer: rv=Gtk2Gui_WHSpacer_Setup(w); break; case GWEN_Widget_TypeComboBox: rv=Gtk2Gui_WComboBox_Setup(w); break; case GWEN_Widget_TypeTextEdit: rv=Gtk2Gui_WTextEdit_Setup(w); break; case GWEN_Widget_TypeWidgetStack: rv=Gtk2Gui_WStack_Setup(w); break; case GWEN_Widget_TypeTabBook: rv=Gtk2Gui_WTabBook_Setup(w); break; case GWEN_Widget_TypeTabPage: /* just re-use vbox */ GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLX | GWEN_WIDGET_FLAGS_FILLY); rv=Gtk2Gui_WVLayout_Setup(w); break; case GWEN_Widget_TypeGroupBox: rv=Gtk2Gui_WGroupBox_Setup(w); break; case GWEN_Widget_TypeTextBrowser: rv=Gtk2Gui_WTextBrowser_Setup(w); break; case GWEN_Widget_TypeProgressBar: rv=Gtk2Gui_WProgressBar_Setup(w); break; case GWEN_Widget_TypeSpinBox: rv=Gtk2Gui_WSpinBox_Setup(w); break; case GWEN_Widget_TypeListBox: rv=Gtk2Gui_WListBox_Setup(w); break; case GWEN_Widget_TypeCheckBox: rv=Gtk2Gui_WCheckBox_Setup(w); break; case GWEN_Widget_TypeScrollArea: rv=Gtk2Gui_WScrollArea_Setup(w); break; case GWEN_Widget_TypeRadioButton: rv=Gtk2Gui_WRadioButton_Setup(w); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unhandled widget type %d", GWEN_Widget_GetType(w)); rv=GWEN_ERROR_INVALID; break; } if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_WIDGET *wChild; /* handle children */ wChild=GWEN_Widget_Tree_GetFirstChild(w); while (wChild) { /* recursion */ rv=Gtk2Gui_Dialog_SetupTree(wChild); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } wChild=GWEN_Widget_Tree_GetNext(wChild); } } return 0; } int Gtk2Gui_GetRawText(const char *text, GWEN_BUFFER *tbuf) { const char *p=0; const char *p2=0; if (text==NULL) return 0; /* find begin of HTML area */ p=text; while ((p=strchr(p, '<'))) { const char *t; t=p; t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } p++; } /* while */ /* find end of HTML area */ if (p) { p2=p; p2+=6; /* skip "" */ while ((p2=strchr(p2, '<'))) { const char *t; t=p2; t++; if (toupper(*t)=='/') { t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } } p2++; } /* while */ } if (p && p2) { int startPos; /*int endPos;*/ p2+=7; /* skip "" */ startPos=(p-text); /*endPos=(p2-text);*/ /* append stuff before startPos */ if (startPos) GWEN_Buffer_AppendBytes(tbuf, text, startPos); if (*p2) GWEN_Buffer_AppendString(tbuf, p2); return 0; } else { GWEN_Buffer_AppendString(tbuf, text); return 0; } } gwenhywfar-5.12.1/gui/gtk2/w_stack.c0000644000175000017500000001166413606365472014160 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ /* * Note: This is a special use case for gtk_notebook. * To use it as a WidgetStack we have to disable drawing od tabs * and borders by calling: * - gtk_notebook_set_show_tabs(GTK_NOTEBOOK(g), FALSE); * - gtk_notebook_set_show_border(GTK_NOTEBOOK(g), FALSE); * */ static GWENHYWFAR_CB int Gtk2Gui_WStack_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: gtk_notebook_set_current_page(GTK_NOTEBOOK(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WStack_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Value: return gtk_notebook_get_current_page(GTK_NOTEBOOK(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WStack_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WStack_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WStack_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK2_DIALOG_WIDGET_REAL)); assert(gChild); gtk_notebook_append_page(GTK_NOTEBOOK(g), gChild, NULL); return 0; } int Gtk2Gui_WStack_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_notebook_new(); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(g), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(g), FALSE); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WStack_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WStack_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WStack_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WStack_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk2Gui_WStack_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/gtk2_gui_dialog_l.h0000644000175000017500000000223013142134462016050 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GTK2_GUI_DIALOG_L_H #define GTK2_GUI_DIALOG_L_H #include #include #include #define GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING 3 typedef struct { GWEN_DIALOG *dialog; GtkWindow *window; int response; GMainLoop *loop; int destroyed; } RunInfo; void Gtk2Gui_Dialog_Extend(GWEN_DIALOG *dlg); void Gtk2Gui_Dialog_Unextend(GWEN_DIALOG *dlg); int Gtk2Gui_Dialog_Setup(GWEN_DIALOG *dlg, GtkWidget *parentWindow); GtkWidget *Gtk2Gui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg); int GTK2_Gui_Dialog_Run(GWEN_DIALOG *dlg, int timeout); void Gtk2Gui_Dialog_Leave(GWEN_DIALOG *dlg, int result); int Gtk2Gui_GetRawText(const char *text, GWEN_BUFFER *tbuf); #endif gwenhywfar-5.12.1/gui/gtk2/w_hline.c0000644000175000017500000000511213606365005014131 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WHLine_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WHLine_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk2Gui_WHLine_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_hseparator_new(); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WHLine_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WHLine_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_combobox.c0000644000175000017500000001720713606364524014657 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct W_COMBOBOX W_COMBOBOX; struct W_COMBOBOX { GWEN_STRINGLIST *entries; }; GWEN_INHERIT(GWEN_WIDGET, W_COMBOBOX) static GWENHYWFAR_CB int Gtk2Gui_WComboBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; W_COMBOBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_COMBOBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: gtk_combo_box_set_active(GTK_COMBO_BOX(g), value); return 0; case GWEN_DialogProperty_ClearValues: { GtkListStore *store; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); gtk_list_store_clear(store); GWEN_StringList_Clear(xw->entries); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WComboBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Value: { gint i; i=gtk_combo_box_get_active(GTK_COMBO_BOX(g)); if (i==-1) return defaultValue; else return i; } case GWEN_DialogProperty_ValueCount: { GtkListStore *store; gint i; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); i=gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL); return i; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WComboBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; W_COMBOBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_COMBOBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: /* undefined */ break; case GWEN_DialogProperty_AddValue: { GtkListStore *store; GtkTreeIter iter; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, value, -1); GWEN_StringList_AppendString(xw->entries, value, 0, 0); return 0; } case GWEN_DialogProperty_ClearValues: { GtkListStore *store; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); gtk_list_store_clear(store); GWEN_StringList_Clear(xw->entries); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WComboBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { GtkWidget *g; W_COMBOBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_COMBOBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: { const char *s; s=GWEN_StringList_StringAt(xw->entries, index); if (s && *s) return s; else return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void changed_handler(GWEN_UNUSED GtkWidget *comboBox, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } static void GWENHYWFAR_CB Gtk2Gui_WComboBox_FreeData(GWEN_UNUSED void *bp, void *p) { W_COMBOBOX *xw; xw=(W_COMBOBOX *) p; GWEN_StringList_free(xw->entries); GWEN_FREE_OBJECT(xw); } int Gtk2Gui_WComboBox_Setup(GWEN_WIDGET *w) { W_COMBOBOX *xw; GtkWidget *g; GtkCellRenderer *cr; GtkListStore *store; uint32_t flags; GWEN_WIDGET *wParent; /*gulong changed_handler_id;*/ flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); /* create widget */ store=gtk_list_store_new(1, G_TYPE_STRING); if (flags & GWEN_WIDGET_FLAGS_READONLY) g=gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); else /* TODO: why the heck does *this* combo box have two columns in the list?? */ g=gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(store), 0); g_object_unref(store); cr=gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(g), cr, TRUE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(g), cr, "text", 0, NULL); GWEN_NEW_OBJECT(W_COMBOBOX, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_COMBOBOX, w, xw, Gtk2Gui_WComboBox_FreeData); xw->entries=GWEN_StringList_new(); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WComboBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WComboBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WComboBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WComboBox_GetCharProperty); /*changed_handler_id=*/g_signal_connect(g, "changed", G_CALLBACK(changed_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_checkbox.c0000644000175000017500000001303713606365762014637 00000000000000/*************************************************************************** begin : Mon Jul 12 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WCheckBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g), (value==0)?FALSE:TRUE); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WCheckBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g))==TRUE)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WCheckBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_button_set_label(g, value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WCheckBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_button_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk2Gui_WCheckBox_Toggled_handler(GWEN_UNUSED GtkButton *button, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WCheckBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*gulong toggled_handler_id;*/ /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ if (s && *s) g=gtk_check_button_new_with_mnemonic(s); else g=gtk_check_button_new(); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WCheckBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WCheckBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WCheckBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WCheckBox_GetCharProperty); /*toggled_handler_id=*/g_signal_connect(g, "toggled", G_CALLBACK(Gtk2Gui_WCheckBox_Toggled_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/gtk2_gui.c0000644000175000017500000001773413606367533014244 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gtk2_gui_p.h" #include "gtk2_gui_dialog_l.h" #include #include #include #include #include #include #include #include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) GWEN_INHERIT(GWEN_GUI, GTK2_GUI) GWEN_GUI *Gtk2_Gui_new() { GWEN_GUI *gui; GTK2_GUI *xgui; gui=GWEN_Gui_new(); GWEN_NEW_OBJECT(GTK2_GUI, xgui); GWEN_INHERIT_SETDATA(GWEN_GUI, GTK2_GUI, gui, xgui, Gtk2_Gui_FreeData); GWEN_Gui_AddFlags(gui, GWEN_GUI_FLAGS_DIALOGSUPPORTED); GWEN_Gui_UseDialogs(gui); xgui->execDialogFn=GWEN_Gui_SetExecDialogFn(gui, GTK2_Gui_ExecDialog); xgui->openDialogFn=GWEN_Gui_SetOpenDialogFn(gui, GTK2_Gui_OpenDialog); xgui->closeDialogFn=GWEN_Gui_SetCloseDialogFn(gui, GTK2_Gui_CloseDialog); xgui->runDialogFn=GWEN_Gui_SetRunDialogFn(gui, GTK2_Gui_RunDialog); xgui->getFileNameDialogFn=GWEN_Gui_SetGetFileNameFn(gui, GTK2_Gui_GetFileName); return gui; } GWENHYWFAR_CB void Gtk2_Gui_FreeData(GWEN_UNUSED void *bp, void *p) { GTK2_GUI *xgui; xgui=(GTK2_GUI *) p; GWEN_FREE_OBJECT(xgui); } GWENHYWFAR_CB int GTK2_Gui_ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid) { int rv; assert(dlg); rv=GTK2_Gui_OpenDialog(gui, dlg, guiid); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=GTK2_Gui_RunDialog(gui, dlg, 1); GTK2_Gui_CloseDialog(gui, dlg); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } GWENHYWFAR_CB int GTK2_Gui_OpenDialog(GWEN_UNUSED GWEN_GUI *gui, GWEN_DIALOG *dlg, GWEN_UNUSED uint32_t guiid) { int rv; GtkWidget *g; assert(dlg); Gtk2Gui_Dialog_Extend(dlg); rv=Gtk2Gui_Dialog_Setup(dlg, NULL); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Gtk2Gui_Dialog_Unextend(dlg); return rv; } g=Gtk2Gui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); Gtk2Gui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } rv=GWEN_Dialog_EmitSignalToAll(dlg, GWEN_DialogEvent_TypeInit, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error initializing dialog: %d", rv); Gtk2Gui_Dialog_Unextend(dlg); return rv; } /* show dialog */ gtk_widget_show_all(g); return 0; } GWENHYWFAR_CB int GTK2_Gui_CloseDialog(GWEN_UNUSED GWEN_GUI *gui, GWEN_DIALOG *dlg) { GtkWidget *g; int rv; assert(dlg); g=Gtk2Gui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); Gtk2Gui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } /* hide dialog */ gtk_widget_hide_all(g); /* send fini signal to dialog */ rv=GWEN_Dialog_EmitSignalToAll(dlg, GWEN_DialogEvent_TypeFini, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error deinitializing dialog: %d", rv); Gtk2Gui_Dialog_Unextend(dlg); return rv; } Gtk2Gui_Dialog_Unextend(dlg); return 0; } GWENHYWFAR_CB int GTK2_Gui_RunDialog(GWEN_UNUSED GWEN_GUI *gui, GWEN_DIALOG *dlg, int untilEnd) { int rv; assert(dlg); rv=GTK2_Gui_Dialog_Run(dlg, untilEnd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } GWENHYWFAR_CB int GTK2_Gui_GetFileName(GWEN_UNUSED GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, GWEN_UNUSED uint32_t flags, GWEN_UNUSED const char *patterns, GWEN_BUFFER *pathBuffer, GWEN_UNUSED uint32_t guiid) { char *folder=NULL; char *fileName=NULL; if (GWEN_Buffer_GetUsedBytes(pathBuffer)) { folder=strdup(GWEN_Buffer_GetStart(pathBuffer)); fileName=strchr(folder, GWEN_DIR_SEPARATOR); if (fileName) { *fileName=0; fileName++; if (*fileName==0) fileName=NULL; } } switch (fnt) { case GWEN_Gui_FileNameType_OpenFileName: { GtkWidget *dialog; if (!(caption && *caption)) caption=I18N("Open File"); dialog=gtk_file_chooser_dialog_new(caption, NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if (folder && *folder) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), folder); if (fileName && *fileName) gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), fileName); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); g_free(filename); gtk_widget_destroy(dialog); free(folder); return 0; } gtk_widget_destroy(dialog); free(folder); return GWEN_ERROR_USER_ABORTED; } case GWEN_Gui_FileNameType_SaveFileName: { GtkWidget *dialog; if (!(caption && *caption)) caption=I18N("Save File"); dialog=gtk_file_chooser_dialog_new(caption, NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE); if (folder && *folder) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), folder); if (fileName && *fileName) gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), fileName); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); g_free(filename); gtk_widget_destroy(dialog); free(folder); return 0; } gtk_widget_destroy(dialog); free(folder); return GWEN_ERROR_USER_ABORTED; } case GWEN_Gui_FileNameType_OpenDirectory: { GtkWidget *dialog; if (!(caption && *caption)) caption=I18N("Select Folder"); dialog=gtk_file_chooser_dialog_new(caption, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); g_free(filename); gtk_widget_destroy(dialog); free(folder); return 0; } gtk_widget_destroy(dialog); free(folder); return GWEN_ERROR_USER_ABORTED; } default: break; } free(folder); return GWEN_ERROR_USER_ABORTED; } gwenhywfar-5.12.1/gui/gtk2/w_spinbox.c0000644000175000017500000001430013606366200014511 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct W_SPINBOX W_SPINBOX; struct W_SPINBOX { GtkAdjustment *adjustment; }; GWEN_INHERIT(GWEN_WIDGET, W_SPINBOX) static GWENHYWFAR_CB int Gtk2Gui_WSpinBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; W_SPINBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_SPINBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: gtk_adjustment_set_value(GTK_ADJUSTMENT(xw->adjustment), value); return 0; case GWEN_DialogProperty_MinValue: gtk_adjustment_set_lower(GTK_ADJUSTMENT(xw->adjustment), value); return 0; case GWEN_DialogProperty_MaxValue: gtk_adjustment_set_upper(GTK_ADJUSTMENT(xw->adjustment), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WSpinBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; W_SPINBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_SPINBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return gtk_adjustment_get_value(GTK_ADJUSTMENT(xw->adjustment)); case GWEN_DialogProperty_MinValue: return gtk_adjustment_get_lower(GTK_ADJUSTMENT(xw->adjustment)); case GWEN_DialogProperty_MaxValue: return gtk_adjustment_get_upper(GTK_ADJUSTMENT(xw->adjustment)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WSpinBox_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WSpinBox_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void GWENHYWFAR_CB Gtk2Gui_WSpinBox_FreeData(GWEN_UNUSED void *bp, void *p) { W_SPINBOX *xw; xw=(W_SPINBOX *) p; GWEN_FREE_OBJECT(xw); } static void Gtk2Gui_WSpinBox_Changed_handler(GWEN_UNUSED GtkAdjustment *adjustment, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WSpinBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*const char *s;*/ /*uint32_t flags;*/ GWEN_WIDGET *wParent; W_SPINBOX *xw; /*gulong changed_handler_id;*/ GWEN_NEW_OBJECT(W_SPINBOX, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_SPINBOX, w, xw, Gtk2Gui_WSpinBox_FreeData); /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); /*s=GWEN_Widget_GetText(w, 0);*/ xw->adjustment=GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 5.0, 5.0)); g=gtk_spin_button_new(xw->adjustment, 1.0, 0); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WSpinBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WSpinBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WSpinBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WSpinBox_GetCharProperty); /*changed_handler_id=*/g_signal_connect(g, "value-changed", G_CALLBACK(Gtk2Gui_WSpinBox_Changed_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/Makefile.am0000666000175000017500000000242113642701350014375 00000000000000AM_CPPFLAGS=-I$(gwenhywfar_symlinkdir) $(GTK2_CFLAGS) \ @visibility_cflags@ DEFS+=-DBUILDING_GTK2_GUI -DPACKAGE=\"$(PACKAGE)\" pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-gtk2.pc lib_LTLIBRARIES=libgwengui-gtk2.la libgwengui_gtk2_la_LIBADD=$(GTK2_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) libgwengui_gtk2_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) noinst_HEADERS=\ gtk2_gui_p.h \ gtk2_gui_dialog_l.h \ gtk2_gui_dialog_p.h libgwengui_gtk2_la_SOURCES=\ gtk2_gui_dialog.c \ gtk2_gui.c EXTRA_DIST=\ w_combobox.c \ w_label.c \ w_dialog.c \ w_gridlayout.c \ w_groupbox.c \ w_hlayout.c \ w_hline.c \ w_hspacer.c \ w_lineedit.c \ w_vlayout.c \ w_vline.c \ w_vspacer.c \ w_pushbutton.c \ w_textbrowser.c \ w_textedit.c \ w_stack.c \ w_tabbook.c \ w_progressbar.c \ w_listbox.c \ w_checkbox.c \ w_scrollarea.c \ w_radiobutton.c \ w_spinbox.c iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-gtk2 iheader_HEADERS= \ gtk2_gui.h noinst_PROGRAMS = libtest libtest_SOURCES = libtest.c libtest_LDADD = libgwengui-gtk2.la $(GTK2_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../testdialogs/libgwengui-test.la gwenhywfar-5.12.1/gui/gtk2/w_label.c0000644000175000017500000001133313606364565014125 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WLabel_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkLabel *g; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WLabel_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkLabel *g; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WLabel_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkLabel *g; GWEN_BUFFER *tbuf; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); tbuf=GWEN_Buffer_new(0, 128, 0, 1); if (value && *value) Gtk2Gui_GetRawText(value, tbuf); switch (prop) { case GWEN_DialogProperty_Title: gtk_label_set_text(g, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); GWEN_Buffer_free(tbuf); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WLabel_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkLabel *g; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_label_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk2Gui_WLabel_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; GWEN_BUFFER *tbuf; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); tbuf=GWEN_Buffer_new(0, 128, 0, 1); if (s && *s) Gtk2Gui_GetRawText(s, tbuf); g=gtk_label_new(GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WLabel_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WLabel_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WLabel_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WLabel_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_gridlayout.c0000644000175000017500000001521313606364704015225 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct GTK2_GRIDLAYOUT_WIDGET GTK2_GRIDLAYOUT_WIDGET; struct GTK2_GRIDLAYOUT_WIDGET { int sortByRow; int allocatedColumns; int allocatedRows; int currentColumn; int currentRow; }; GWEN_INHERIT(GWEN_WIDGET, GTK2_GRIDLAYOUT_WIDGET) static GWENHYWFAR_CB int Gtk2Gui_WGridLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WGridLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WGridLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WGridLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WGridLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GTK2_GRIDLAYOUT_WIDGET *xw; GtkWidget *g; GtkWidget *gChild; uint32_t cflags; int x; int y; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, GTK2_GRIDLAYOUT_WIDGET, w); assert(xw); cflags=GWEN_Widget_GetFlags(wChild); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK2_DIALOG_WIDGET_REAL)); assert(gChild); if (xw->sortByRow) { /* fill rows, enter next column if column full */ y=(xw->currentRow)++; if (y>=xw->allocatedRows) { xw->currentRow=0; y=(xw->currentRow)++; xw->currentColumn++; } x=xw->currentColumn; if (x>=xw->allocatedColumns) { xw->allocatedColumns=x+1; gtk_table_resize(GTK_TABLE(g), xw->allocatedRows, xw->allocatedColumns); } } else { /* fill columns, enter next row if row full */ x=(xw->currentColumn)++; if (x>=xw->allocatedColumns) { xw->currentColumn=0; x=(xw->currentColumn)++; xw->currentRow++; } y=xw->currentRow; if (y>=xw->allocatedRows) { xw->allocatedRows=y+1; gtk_table_resize(GTK_TABLE(g), xw->allocatedRows, xw->allocatedColumns); } } gtk_table_attach(GTK_TABLE(g), gChild, x, x+1, y, y+1, (cflags & GWEN_WIDGET_FLAGS_FILLX)?(GTK_FILL|GTK_EXPAND):0, (cflags & GWEN_WIDGET_FLAGS_FILLY)?(GTK_FILL|GTK_EXPAND):0, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); return 0; } static GWENHYWFAR_CB void Gtk2Gui_WGridLayout_FreeData(GWEN_UNUSED void *bp, void *p) { GTK2_GRIDLAYOUT_WIDGET *xw; xw=(GTK2_GRIDLAYOUT_WIDGET *) p; GWEN_FREE_OBJECT(xw); } int Gtk2Gui_WGridLayout_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; GTK2_GRIDLAYOUT_WIDGET *xw; int rows; int cols; GWEN_NEW_OBJECT(GTK2_GRIDLAYOUT_WIDGET, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, GTK2_GRIDLAYOUT_WIDGET, w, xw, Gtk2Gui_WGridLayout_FreeData); /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); cols=GWEN_Widget_GetColumns(w); rows=GWEN_Widget_GetRows(w); if (rows>0) { xw->sortByRow=1; xw->allocatedRows=rows; xw->allocatedColumns=1; } else { xw->sortByRow=0; xw->allocatedColumns=cols; xw->allocatedRows=1; } g=gtk_table_new(xw->allocatedRows, xw->allocatedColumns, FALSE); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WGridLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WGridLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WGridLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WGridLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk2Gui_WGridLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_textbrowser.c0000644000175000017500000001500013606365421015421 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WTextBrowser_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(gs); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(gs), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(gs)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WTextBrowser_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(gs); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(gs))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(gs))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WTextBrowser_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ GWEN_BUFFER *tbuf; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(gs); tbuf=GWEN_Buffer_new(0, 128, 0, 1); if (value && *value) Gtk2Gui_GetRawText(value, tbuf); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkAdjustment *va; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); gtk_text_buffer_set_text(tb, GWEN_Buffer_GetStart(tbuf), -1); /* scroll to end */ va=gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(gs)); if (va) gtk_adjustment_set_value(va, va->upper); GWEN_Buffer_free(tbuf); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); GWEN_Buffer_free(tbuf); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WTextBrowser_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(gs); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkTextIter startIter; GtkTextIter endIter; gchar *s; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); gtk_text_buffer_get_start_iter(tb, &startIter); gtk_text_buffer_get_end_iter(tb, &endIter); s=gtk_text_buffer_get_text(tb, &startIter, &endIter, FALSE); if (s) { GWEN_Widget_SetText(w, GTK2_DIALOG_STRING_VALUE, s); g_free(s); return GWEN_Widget_GetText(w, GTK2_DIALOG_STRING_VALUE); } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk2Gui_WTextBrowser_Setup(GWEN_WIDGET *w) { GtkWidget *gs; GtkWidget *g; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ gs=gtk_scrolled_window_new(NULL, NULL); g=gtk_text_view_new(); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(gs), g); if (s && *s) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 128, 0, 1); Gtk2Gui_GetRawText(s, tbuf); gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)), GWEN_Buffer_GetStart(tbuf), -1); GWEN_Buffer_free(tbuf); } GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) gs); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WTextBrowser_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WTextBrowser_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WTextBrowser_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WTextBrowser_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_vline.c0000644000175000017500000000511213606365117014153 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WVLine_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WVLine_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk2Gui_WVLine_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_vseparator_new(); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WVLine_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WVLine_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/Makefile.in0000644000175000017500000007572315032533614014422 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = libtest$(EXEEXT) subdir = gui/gtk2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gwengui-gtk2.pc CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgwengui_gtk2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) am_libgwengui_gtk2_la_OBJECTS = gtk2_gui_dialog.lo gtk2_gui.lo libgwengui_gtk2_la_OBJECTS = $(am_libgwengui_gtk2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgwengui_gtk2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libgwengui_gtk2_la_LDFLAGS) \ $(LDFLAGS) -o $@ am_libtest_OBJECTS = libtest.$(OBJEXT) libtest_OBJECTS = $(am_libtest_OBJECTS) libtest_DEPENDENCIES = libgwengui-gtk2.la $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../testdialogs/libgwengui-test.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/gtk2_gui.Plo \ ./$(DEPDIR)/gtk2_gui_dialog.Plo ./$(DEPDIR)/libtest.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwengui_gtk2_la_SOURCES) $(libtest_SOURCES) DIST_SOURCES = $(libgwengui_gtk2_la_SOURCES) $(libtest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gwengui-gtk2.pc.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DBUILDING_GTK2_GUI -DPACKAGE=\"$(PACKAGE)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) $(GTK2_CFLAGS) \ @visibility_cflags@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-gtk2.pc lib_LTLIBRARIES = libgwengui-gtk2.la libgwengui_gtk2_la_LIBADD = $(GTK2_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) libgwengui_gtk2_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) noinst_HEADERS = \ gtk2_gui_p.h \ gtk2_gui_dialog_l.h \ gtk2_gui_dialog_p.h libgwengui_gtk2_la_SOURCES = \ gtk2_gui_dialog.c \ gtk2_gui.c EXTRA_DIST = \ w_combobox.c \ w_label.c \ w_dialog.c \ w_gridlayout.c \ w_groupbox.c \ w_hlayout.c \ w_hline.c \ w_hspacer.c \ w_lineedit.c \ w_vlayout.c \ w_vline.c \ w_vspacer.c \ w_pushbutton.c \ w_textbrowser.c \ w_textedit.c \ w_stack.c \ w_tabbook.c \ w_progressbar.c \ w_listbox.c \ w_checkbox.c \ w_scrollarea.c \ w_radiobutton.c \ w_spinbox.c iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-gtk2 iheader_HEADERS = \ gtk2_gui.h libtest_SOURCES = libtest.c libtest_LDADD = libgwengui-gtk2.la $(GTK2_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../testdialogs/libgwengui-test.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/gtk2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/gtk2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gwengui-gtk2.pc: $(top_builddir)/config.status $(srcdir)/gwengui-gtk2.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-gtk2.la: $(libgwengui_gtk2_la_OBJECTS) $(libgwengui_gtk2_la_DEPENDENCIES) $(EXTRA_libgwengui_gtk2_la_DEPENDENCIES) $(AM_V_CCLD)$(libgwengui_gtk2_la_LINK) -rpath $(libdir) $(libgwengui_gtk2_la_OBJECTS) $(libgwengui_gtk2_la_LIBADD) $(LIBS) libtest$(EXEEXT): $(libtest_OBJECTS) $(libtest_DEPENDENCIES) $(EXTRA_libtest_DEPENDENCIES) @rm -f libtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(libtest_OBJECTS) $(libtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk2_gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk2_gui_dialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/gtk2_gui.Plo -rm -f ./$(DEPDIR)/gtk2_gui_dialog.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iheaderHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/gtk2_gui.Plo -rm -f ./$(DEPDIR)/gtk2_gui_dialog.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-iheaderHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/gtk2/w_hlayout.c0000644000175000017500000001200013606364767014527 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WHLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WHLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WHLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WHLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WHLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; uint32_t cflags; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK2_DIALOG_WIDGET_REAL)); assert(gChild); cflags=GWEN_Widget_GetFlags(wChild); gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLX)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLX)?TRUE:FALSE, 0); return 0; } int Gtk2Gui_WHLayout_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); #if 0 /* using equal width here doesn't seem to be working as expected: * I would expect al children be of equal width, but instead all children are * equally distant to each other while still being of different width... */ g=gtk_hbox_new((flags & GWEN_WIDGET_FLAGS_EQUAL_WIDTH)?TRUE:FALSE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); #else g=gtk_hbox_new(FALSE, GTK2_GUI_DIALOG_DEFAULT_BOX_SPACING); #endif GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WHLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WHLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WHLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WHLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk2Gui_WHLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_textedit.c0000644000175000017500000001427513606365364014706 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WTextEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WTextEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WTextEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkTextIter endIter; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); if (value && *value) gtk_text_buffer_set_text(tb, value, -1); else gtk_text_buffer_set_text(tb, "", -1); gtk_text_buffer_get_end_iter(tb, &endIter); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(g), &endIter, 0.5, FALSE, 0.0, 0.0); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WTextEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkTextIter startIter; GtkTextIter endIter; gchar *s; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); gtk_text_buffer_get_start_iter(tb, &startIter); gtk_text_buffer_get_end_iter(tb, &endIter); s=gtk_text_buffer_get_text(tb, &startIter, &endIter, FALSE); if (s) { GWEN_Widget_SetText(w, GTK2_DIALOG_STRING_VALUE, s); g_free(s); return GWEN_Widget_GetText(w, GTK2_DIALOG_STRING_VALUE); } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk2Gui_WTextEdit_Changed_handler(GWEN_UNUSED GtkTextBuffer *buffer, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WTextEdit_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*gulong changed_handler_id;*/ /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ g=gtk_text_view_new(); if (s && *s) gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)), s, -1); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WTextEdit_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WTextEdit_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WTextEdit_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WTextEdit_GetCharProperty); /*changed_handler_id=*/g_signal_connect(gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)), "changed", G_CALLBACK(Gtk2Gui_WTextEdit_Changed_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_lineedit.c0000644000175000017500000001556513606365320014644 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WLineEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WLineEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WLineEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: gtk_entry_set_text(GTK_ENTRY(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WLineEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: return gtk_entry_get_text(GTK_ENTRY(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk2Gui_WLineEdit_Deleted_text_handler(GWEN_UNUSED GtkEntryBuffer *entrybuffer, GWEN_UNUSED guint arg1, GWEN_UNUSED guint arg2, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } static void Gtk2Gui_WLineEdit_Inserted_text_handler(GWEN_UNUSED GtkEntryBuffer *entrybuffer, GWEN_UNUSED guint arg1, GWEN_UNUSED gchar *arg2, GWEN_UNUSED guint arg3, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WLineEdit_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; uint32_t flags; GWEN_WIDGET *wParent; /*gulong deleted_text_handler_id;*/ /*gulong inserted_text_handler_id;*/ gboolean text_is_visible; flags=GWEN_Widget_GetFlags(w); text_is_visible = (flags & GWEN_WIDGET_FLAGS_PASSWORD) == 0; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ g=gtk_entry_new(); if (s && *s) gtk_entry_set_text(GTK_ENTRY(g), s); gtk_entry_set_visibility(GTK_ENTRY(g), text_is_visible); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WLineEdit_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WLineEdit_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WLineEdit_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WLineEdit_GetCharProperty); /*deleted_text_handler_id=*/g_signal_connect(gtk_entry_get_buffer(GTK_ENTRY(g)), "deleted-text", G_CALLBACK(Gtk2Gui_WLineEdit_Deleted_text_handler), w); /*inserted_text_handler_id=*/g_signal_connect(gtk_entry_get_buffer(GTK_ENTRY(g)), "inserted-text", G_CALLBACK(Gtk2Gui_WLineEdit_Inserted_text_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/libtest.c0000644000175000017500000000750213142134474014156 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include "config.h" /* for OS_WIN32 */ #include "gtk2_gui.h" #include "../testdialogs/dlg_test.h" #include "../testdialogs/dlg_test2.h" #include #include #include #include #include int test1(int argc, char **argv) { GWEN_GUI *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); gtk_set_locale(); gtk_init(&argc, &argv); /* create GUI */ gui=Gtk2_Gui_new(); GWEN_Gui_SetGui(gui); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int test2(int argc, char **argv) { int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; GWEN_GUI *gui; gtk_set_locale(); gtk_init(&argc, &argv); gui=Gtk2_Gui_new(); GWEN_Gui_SetGui(gui); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

This is an example text..

" "

As you can see colors can " "be used.

" "", 10, 0); for (i1=1; i1<=10; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d\n", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 10, id1); for (i2=1; i2<=10; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (2)\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (1)\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int test3(int argc, char **argv) { GWEN_GUI *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); gtk_set_locale(); gtk_init(&argc, &argv); /* create GUI */ gui=Gtk2_Gui_new(); GWEN_Gui_SetGui(gui); dlg=Dlg_Test2_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int main(int argc, char **argv) { if (argc>1) { if (strcasecmp(argv[1], "1")==0) return test1(argc, argv); else if (strcasecmp(argv[1], "2")==0) return test2(argc, argv); else if (strcasecmp(argv[1], "3")==0) return test3(argc, argv); } return test1(argc, argv); } gwenhywfar-5.12.1/gui/gtk2/w_radiobutton.c0000644000175000017500000001440013606366101015362 00000000000000/*************************************************************************** begin : Mon Jul 12 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WRadioButton_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g), (value==0)?FALSE:TRUE); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WRadioButton_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g))==TRUE)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WRadioButton_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_button_set_label(g, value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WRadioButton_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_button_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk2Gui_WRadioButton_Toggled_handler(GWEN_UNUSED GtkButton *button, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk2Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk2Gui_WRadioButton_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; /*uint32_t flags;*/ GWEN_WIDGET *wParent; GWEN_WIDGET *wT; /*gulong toggled_handler_id;*/ int groupId; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); groupId=GWEN_Widget_GetGroupId(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ if (s && *s) g=gtk_radio_button_new_with_mnemonic(NULL, s); else g=gtk_radio_button_new(NULL); /* get root widget */ wT=wParent; while (GWEN_Widget_Tree_GetParent(wT)) wT=GWEN_Widget_Tree_GetParent(wT); /* get first radio button of the same group */ while (wT) { if ((GWEN_Widget_GetType(wT)==GWEN_Widget_TypeRadioButton) && GWEN_Widget_GetGroupId(wT)==groupId) break; wT=GWEN_Widget_Tree_GetBelow(wT); } if (wT && wT!=w) { GSList *grp; grp=gtk_radio_button_get_group(GTK_RADIO_BUTTON(GWEN_Widget_GetImplData(wT, GTK2_DIALOG_WIDGET_REAL))); gtk_radio_button_set_group(GTK_RADIO_BUTTON(g), grp); } /* set pointers */ GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WRadioButton_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WRadioButton_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WRadioButton_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WRadioButton_GetCharProperty); /*toggled_handler_id=*/g_signal_connect(g, "toggled", G_CALLBACK(Gtk2Gui_WRadioButton_Toggled_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/w_tabbook.c0000644000175000017500000001126713606365551014471 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WTabBook_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: gtk_notebook_set_current_page(GTK_NOTEBOOK(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WTabBook_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Value: return gtk_notebook_get_current_page(GTK_NOTEBOOK(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WTabBook_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk2Gui_WTabBook_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk2Gui_WTabBook_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; const char *s; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK2_DIALOG_WIDGET_REAL)); assert(gChild); s=GWEN_Widget_GetText(wChild, 0); gtk_notebook_append_page(GTK_NOTEBOOK(g), gChild, (s && *s)?gtk_label_new(s):NULL); return 0; } int Gtk2Gui_WTabBook_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_notebook_new(); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WTabBook_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WTabBook_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk2Gui_WTabBook_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk2Gui_WTabBook_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk2Gui_WTabBook_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk2/gtk2_gui_p.h0000644000175000017500000000321313142134462014537 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GTK2_GUI_P_H #define GTK2_GUI_P_H #include "gtk2_gui.h" #include typedef struct GTK2_GUI GTK2_GUI; struct GTK2_GUI { GWEN_GUI_EXEC_DIALOG_FN execDialogFn; GWEN_GUI_OPEN_DIALOG_FN openDialogFn; GWEN_GUI_CLOSE_DIALOG_FN closeDialogFn; GWEN_GUI_RUN_DIALOG_FN runDialogFn; GWEN_GUI_GET_FILENAME_FN getFileNameDialogFn; }; static GWENHYWFAR_CB void Gtk2_Gui_FreeData(void *bp, void *p); static GWENHYWFAR_CB int GTK2_Gui_ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static GWENHYWFAR_CB int GTK2_Gui_OpenDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static GWENHYWFAR_CB int GTK2_Gui_CloseDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg); static GWENHYWFAR_CB int GTK2_Gui_RunDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, int timeout); static GWENHYWFAR_CB int GTK2_Gui_GetFileName(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); #endif gwenhywfar-5.12.1/gui/gtk2/gwengui-gtk2.pc.in0000644000175000017500000000104413142134462015577 00000000000000# pkg-config configuration for gwengui_gtk2 # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@includedir@/gwenhywfar datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Human-readable name Name: gwengui-gtk2 # Human-readable description Description: GTK2 Implementation of the GWEN_DIALOG framework. Version: @VERSION@ Libs: -L@libdir@ -lgwengui-gtk2 Cflags: -I@includedir@ gwenhywfar-5.12.1/gui/gtk2/w_hspacer.c0000644000175000017500000000523113606365025014463 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk2Gui_WHSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk2Gui_WHSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK2_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk2Gui_WHSpacer_Setup(GWEN_WIDGET *w) { GtkWidget *g; /*uint32_t flags;*/ GWEN_WIDGET *wParent; /*flags=GWEN_Widget_GetFlags(w);*/ wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_hbox_new(FALSE, 0); GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLX); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK2_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk2Gui_WHSpacer_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk2Gui_WHSpacer_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/cpp/0000755000175000017500000000000015032533715012334 500000000000000gwenhywfar-5.12.1/gui/cpp/gwengui-cpp-config-version.cmake.in0000644000175000017500000000050013142134462021025 00000000000000set(PACKAGE_VERSION "@GWENHYWFAR_VERSION_STRING@") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") set(PACKAGE_VERSION_EXACT TRUE) endif() endif() gwenhywfar-5.12.1/gui/cpp/cppgui.cpp0000664000175000017500000002201113265727202014247 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "cppgui_p.hpp" #include #include #include #include #include #include #include #include GWEN_INHERIT(GWEN_GUI, CppGui); int CppGuiLinker::Print(GWEN_GUI *gui, const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->print(docTitle, docType, descr, text, guiid); } int CppGuiLinker::GetPassword(GWEN_GUI *gui, uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, GWEN_GUI_PASSWORD_METHOD methodId, GWEN_DB_NODE *methodParams, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->getPassword(flags, token, title, text, buffer, minLen, maxLen, methodId, methodParams, guiid); } int CppGuiLinker::SetPasswordStatus(GWEN_GUI *gui, const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->setPasswordStatus(token, pin, status, guiid); } int CppGuiLinker::CheckCert(GWEN_GUI *gui, const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->checkCert(cert, sio, guiid); } int CppGuiLinker::LogHook(GWEN_GUI *gui, const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->logHook(logDomain, priority, s); } int CppGuiLinker::ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->execDialog(dlg, guiid); } int CppGuiLinker::OpenDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); DBG_ERROR(0, "CppGuiLinker::OpenDialog"); return xgui->openDialog(dlg, guiid); } int CppGuiLinker::CloseDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->closeDialog(dlg); } int CppGuiLinker::RunDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, int untilEnd) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->runDialog(dlg, untilEnd); } int CppGuiLinker::GetFileName(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid) { CppGui *xgui; assert(gui); xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); assert(xgui); return xgui->getFileName(caption, fnt, flags, patterns, pathBuffer, guiid); } GWENHYWFAR_CB void CppGuiLinker::freeData(void *bp, void *p) { CppGui *xgui; DBG_NOTICE(0, "CppGuiLinker: Freeing CppGui"); xgui=(CppGui*)p; if (xgui->_gui) { xgui->_gui=0; } delete xgui; } CppGui::CppGui() :_checkCertFn(NULL) ,_gui(NULL) { _gui=GWEN_Gui_new(); GWEN_INHERIT_SETDATA(GWEN_GUI, CppGui, _gui, this, CppGuiLinker::freeData); GWEN_Gui_UseDialogs(_gui); _checkCertFn=GWEN_Gui_SetCheckCertFn(_gui, CppGuiLinker::CheckCert); _printFn=GWEN_Gui_SetPrintFn(_gui, CppGuiLinker::Print); _getPasswordFn=GWEN_Gui_SetGetPasswordFn(_gui, CppGuiLinker::GetPassword); _setPasswordStatusFn=GWEN_Gui_SetSetPasswordStatusFn(_gui, CppGuiLinker::SetPasswordStatus); GWEN_Gui_SetLogHookFn(_gui, CppGuiLinker::LogHook); _execDialogFn=GWEN_Gui_SetExecDialogFn(_gui, CppGuiLinker::ExecDialog); _openDialogFn=GWEN_Gui_SetOpenDialogFn(_gui, CppGuiLinker::OpenDialog); _closeDialogFn=GWEN_Gui_SetCloseDialogFn(_gui, CppGuiLinker::CloseDialog); _runDialogFn=GWEN_Gui_SetRunDialogFn(_gui, CppGuiLinker::RunDialog); _getFileNameFn=GWEN_Gui_SetGetFileNameFn(_gui, CppGuiLinker::GetFileName); } CppGui::~CppGui() { if (_gui) { GWEN_INHERIT_UNLINK(GWEN_GUI, CppGui, _gui) GWEN_Gui_free(_gui); } } int CppGui::checkCert(const GWEN_SSLCERTDESCR *cd, GWEN_SYNCIO *sio, uint32_t guiid) { return checkCertBuiltIn(cd, sio, guiid); } int CppGui::logHook(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s) { /* not hooked */ return 0; } int CppGui::execDialog(GWEN_DIALOG *dlg, uint32_t guiid) { return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::openDialog(GWEN_DIALOG *dlg, uint32_t guiid) { DBG_ERROR(0, "CppGui::OpenDialog"); return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::closeDialog(GWEN_DIALOG *dlg) { return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::runDialog(GWEN_DIALOG *dlg, int untilEnd) { return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid) { DBG_ERROR(0, "Not supported"); return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::print(const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid) { if (_printFn) return _printFn(_gui, docTitle, docType, descr, text, guiid); else return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::checkCertBuiltIn(const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid) { if (_checkCertFn) return _checkCertFn(_gui, cert, sio, guiid); else { DBG_ERROR(0, "No built-in checkcert function?"); return GWEN_ERROR_NOT_SUPPORTED; } } int CppGui::getPassword(uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, GWEN_GUI_PASSWORD_METHOD methodId, GWEN_DB_NODE *methodParams, uint32_t guiid) { if (_getPasswordFn) return _getPasswordFn(_gui, flags, token, title, text, buffer, minLen, maxLen, methodId, methodParams, guiid); else return GWEN_ERROR_NOT_SUPPORTED; } int CppGui::setPasswordStatus(const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid) { if (_setPasswordStatusFn) return _setPasswordStatusFn(_gui, token, pin, status, guiid); else return GWEN_ERROR_NOT_SUPPORTED; } void CppGui::setPasswordDb(GWEN_DB_NODE *dbPasswords, int persistent) { GWEN_Gui_SetPasswordDb(_gui, dbPasswords, persistent); } void CppGui::setPasswordStore(GWEN_PASSWD_STORE *sto) { GWEN_Gui_SetPasswdStore(_gui, sto); } GWEN_GUI *CppGui::getCInterface() { return _gui; } CppGui *CppGui::getCppGui() { GWEN_GUI *gui; CppGui *xgui; gui=GWEN_Gui_GetGui(); if (gui==NULL) return NULL; xgui=GWEN_INHERIT_GETDATA(GWEN_GUI, CppGui, gui); return xgui; } gwenhywfar-5.12.1/gui/cpp/cppdialog_p.hpp0000644000175000017500000000317513142134462015250 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef CPPDIALOG_P_HPP #define CPPDIALOG_P_HPP #include "cppdialog.hpp" class CppDialogLinker { friend class CppDialog; static GWENHYWFAR_CB int SetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); static GWENHYWFAR_CB int GetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); static GWENHYWFAR_CB int SetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); static GWENHYWFAR_CB const char *GetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); static GWENHYWFAR_CB void freeData(void *bp, void *p); }; #endif /* CPPDIALOG_P_HPP */ gwenhywfar-5.12.1/gui/cpp/cppwidget_p.hpp0000644000175000017500000000305213142134462015266 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef CPPWIDGET_P_HPP #define CPPWIDGET_P_HPP #include "cppwidget.hpp" class CppWidgetLinker { friend class CppWidget; static GWENHYWFAR_CB int SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); static GWENHYWFAR_CB int GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); static GWENHYWFAR_CB int SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); static GWENHYWFAR_CB const char *GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); static GWENHYWFAR_CB int AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild); static GWENHYWFAR_CB void freeData(void *bp, void *p); }; #endif /* CPPDIALOG_P_HPP */ gwenhywfar-5.12.1/gui/cpp/api.h0000664000175000017500000000254114460564441013206 00000000000000/*************************************************************************** copyright : (C) 2012 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_GUI_CPP_API_H #define GWEN_GUI_CPP_API_H #include #if (defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || defined _MSC_VER # ifdef BUILDING_CPP_GUI /* building Cpp */ # if GWENHYWFAR_SYS_IS_WINDOWS /* for windows */ # ifdef __declspec # define CPPGUI_API __declspec (dllexport) # else /* if __declspec */ # define CPPGUI_API # endif /* if NOT __declspec */ # else /* for non-win32 */ # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE # define CPPGUI_API __attribute__((visibility("default"))) # else # define CPPGUI_API # endif # endif # else /* not building Cpp */ # if GWENHYWFAR_SYS_IS_WINDOWS /* for windows */ # ifdef __declspec # define CPPGUI_API __declspec (dllimport) # else /* if __declspec */ # define CPPGUI_API # endif /* if NOT __declspec */ # else /* for non-win32 */ # define CPPGUI_API # endif # endif #endif #endif gwenhywfar-5.12.1/gui/cpp/cppgui.hpp0000664000175000017500000000703313265727202014263 00000000000000/*************************************************************************** copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef CPPGUI_HPP #define CPPGUI_HPP #include #include //#include //#include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) #define I18S(msg) msg #include #include class CppGui; #include #include /** * @brief A C++ binding for the C module @ref GWEN_GUI * * This class simply is a C++ binding for the C module @ref GWEN_GUI. * It redirects C callbacks used by GWEN_GUI to virtual functions in * this class. * * @author Martin Preuss */ class CPPGUI_API CppGui { friend class CppGuiLinker; private: GWEN_GUI_CHECKCERT_FN _checkCertFn; GWEN_GUI_PRINT_FN _printFn; GWEN_GUI_GETPASSWORD_FN _getPasswordFn; GWEN_GUI_SETPASSWORDSTATUS_FN _setPasswordStatusFn; GWEN_GUI_EXEC_DIALOG_FN _execDialogFn; GWEN_GUI_OPEN_DIALOG_FN _openDialogFn; GWEN_GUI_CLOSE_DIALOG_FN _closeDialogFn; GWEN_GUI_RUN_DIALOG_FN _runDialogFn; GWEN_GUI_GET_FILENAME_FN _getFileNameFn; public: CppGui(); virtual ~CppGui(); static CPPGUI_API CppGui *getCppGui(); GWEN_GUI *getCInterface(); void setPasswordDb(GWEN_DB_NODE *dbPasswords, int persistent); void setPasswordStore(GWEN_PASSWD_STORE *sto); protected: GWEN_GUI *_gui; /** @name User Interaction * */ /*@{*/ /** * See @ref CppGui_Print */ virtual int print(const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid); virtual int getPassword(uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, GWEN_GUI_PASSWORD_METHOD methodId, GWEN_DB_NODE *methodParams, uint32_t guiid); virtual int setPasswordStatus(const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid); virtual int checkCert(const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid); virtual int logHook(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s); virtual int execDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int openDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int closeDialog(GWEN_DIALOG *dlg); virtual int runDialog(GWEN_DIALOG *dlg, int untilEnd); virtual int getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); int checkCertBuiltIn(const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid); }; #endif /* CPPGUI_HPP */ gwenhywfar-5.12.1/gui/cpp/cppgui_p.hpp0000664000175000017500000000567413265727202014613 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef CPPGUI_P_HPP #define CPPGUI_P_HPP #include "cppgui.hpp" class CppGuiLinker { friend class CppGui; static int GWENHYWFAR_CB Print(GWEN_GUI *gui, const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid); static int GWENHYWFAR_CB GetPassword(GWEN_GUI *gui, uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, GWEN_GUI_PASSWORD_METHOD methodId, GWEN_DB_NODE *methodParams, uint32_t guiid); static int GWENHYWFAR_CB SetPasswordStatus(GWEN_GUI *gui, const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid); static int GWENHYWFAR_CB CheckCert(GWEN_GUI *gui, const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *io, uint32_t guiid); static int GWENHYWFAR_CB LogHook(GWEN_GUI *gui, const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s); static int GWENHYWFAR_CB ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static int GWENHYWFAR_CB OpenDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static int GWENHYWFAR_CB CloseDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg); static int GWENHYWFAR_CB RunDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, int untilEnd); static int GWENHYWFAR_CB GetFileName(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); static GWENHYWFAR_CB void freeData(void *bp, void *p); }; #endif /* CPPGUI_P_HPP */ gwenhywfar-5.12.1/gui/cpp/cppdialog.hpp0000644000175000017500000000471213142134462014727 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef CPPDIALOG_HPP #define CPPDIALOG_HPP #include #include #include #include class CppDialog; /** * @brief A C++ binding for the C module @ref GWEN_DIALOG * * This class simply is a C++ binding for the C module @ref GWEN_DIALOG. * It redirects C callbacks used by GWEN_DIALOG to virtual functions in * this class. * * @author Martin Preuss */ class CPPGUI_API CppDialog { friend class CppDialogLinker; private: GWEN_DIALOG_SETINTPROPERTY_FN _setIntPropertyFn; GWEN_DIALOG_GETINTPROPERTY_FN _getIntPropertyFn; GWEN_DIALOG_SETCHARPROPERTY_FN _setCharPropertyFn; GWEN_DIALOG_GETCHARPROPERTY_FN _getCharPropertyFn; public: CppDialog(GWEN_DIALOG *dlg); virtual ~CppDialog(); GWEN_DIALOG *getCInterface(); static CPPGUI_API CppDialog *getDialog(GWEN_DIALOG *dlg); protected: GWEN_DIALOG *_dialog; CppDialog(); int emitSignal(GWEN_DIALOG_EVENTTYPE t, const char *sender); GWEN_WIDGET_TREE *getWidgets() const; GWEN_WIDGET *findWidgetByName(const char *name); GWEN_WIDGET *findWidgetByImplData(int index, void *ptr); virtual int setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); virtual int getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); virtual int setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); virtual const char *getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); }; #endif /* CPPDIALOG_HPP */ gwenhywfar-5.12.1/gui/cpp/Makefile.am0000666000175000017500000000150113642701350014306 00000000000000AM_CPPFLAGS=-I$(gwenhywfar_symlinkdir) $(fox_includes) -Ihtml \ @visibility_cflags@ DEFS+=-DBUILDING_CPP_GUI -DPACKAGE=\"$(PACKAGE)\" lib_LTLIBRARIES=libgwengui-cpp.la cmakeconfigdir = $(libdir)/cmake/gwengui-cpp-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwengui-cpp-config.cmake gwengui-cpp-config-version.cmake noinst_HEADERS=\ cppdialog_p.hpp \ cppgui_p.hpp \ cppwidget_p.hpp libgwengui_cpp_la_LIBADD=$(top_builddir)/src/$(gwenhywfar_internal_libname) libgwengui_cpp_la_LDFLAGS=-no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_cpp_la_SOURCES=\ cppdialog.cpp \ cppgui.cpp \ cppwidget.cpp iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-cpp iheader_HEADERS=\ api.h \ cppgui.hpp \ cppdialog.hpp \ cppwidget.hpp gwenhywfar-5.12.1/gui/cpp/cppdialog.cpp0000644000175000017500000001344013142134462014720 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "cppdialog_p.hpp" #include #include #include #include #include #include #include #include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) GWEN_INHERIT(GWEN_DIALOG, CppDialog); int CppDialogLinker::SetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CppDialog *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, CppDialog, dlg); assert(xdlg); return xdlg->setIntProperty(w, prop, index, value, doSignal); } int CppDialogLinker::GetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CppDialog *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, CppDialog, dlg); assert(xdlg); return xdlg->getIntProperty(w, prop, index, defaultValue); } int CppDialogLinker::SetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CppDialog *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, CppDialog, dlg); assert(xdlg); return xdlg->setCharProperty(w, prop, index, value, doSignal); } const char *CppDialogLinker::GetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CppDialog *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, CppDialog, dlg); assert(xdlg); return xdlg->getCharProperty(w, prop, index, defaultValue); } void CppDialogLinker::freeData(void *bp, void *p) { CppDialog *xdlg; xdlg=(CppDialog*) p; if (xdlg->_dialog) xdlg->_dialog=NULL; delete xdlg; } CppDialog::CppDialog() :_dialog(NULL) { } CppDialog::CppDialog(GWEN_DIALOG *dlg) :_dialog(NULL) { _dialog=dlg; GWEN_INHERIT_SETDATA(GWEN_DIALOG, CppDialog, _dialog, this, CppDialogLinker::freeData); _setIntPropertyFn=GWEN_Dialog_SetSetIntPropertyFn(_dialog, CppDialogLinker::SetIntProperty); _getIntPropertyFn=GWEN_Dialog_SetGetIntPropertyFn(_dialog, CppDialogLinker::GetIntProperty); _setCharPropertyFn=GWEN_Dialog_SetSetCharPropertyFn(_dialog, CppDialogLinker::SetCharProperty); _getCharPropertyFn=GWEN_Dialog_SetGetCharPropertyFn(_dialog, CppDialogLinker::GetCharProperty); } CppDialog::~CppDialog() { if (_dialog) { GWEN_INHERIT_UNLINK(GWEN_DIALOG, CppDialog, _dialog) } } CppDialog *CppDialog::getDialog(GWEN_DIALOG *dlg) { CppDialog *xdlg; GWEN_DIALOG *pdlg; while( (pdlg=GWEN_Dialog_GetParentDialog(dlg)) ) dlg=pdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, CppDialog, dlg); assert(xdlg); return xdlg; } GWEN_DIALOG *CppDialog::getCInterface() { return _dialog; } int CppDialog::setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { if (_setIntPropertyFn) return _setIntPropertyFn(_dialog, w, prop, index, value, doSignal); else return GWEN_ERROR_NOT_SUPPORTED; } int CppDialog::getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { if (_getIntPropertyFn) return _getIntPropertyFn(_dialog, w, prop, index, defaultValue); else return defaultValue; } int CppDialog::setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { if (_setCharPropertyFn) return _setCharPropertyFn(_dialog, w, prop, index, value, doSignal); else return GWEN_ERROR_NOT_SUPPORTED; } const char *CppDialog::getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { if (_getCharPropertyFn) return _getCharPropertyFn(_dialog, w, prop, index, defaultValue); else return defaultValue; } int CppDialog::emitSignal(GWEN_DIALOG_EVENTTYPE t, const char *sender) { assert(_dialog); return GWEN_Dialog_EmitSignal(_dialog, t, sender); } GWEN_WIDGET_TREE *CppDialog::getWidgets() const { assert(_dialog); return GWEN_Dialog_GetWidgets(_dialog); } GWEN_WIDGET *CppDialog::findWidgetByName(const char *name) { assert(_dialog); return GWEN_Dialog_FindWidgetByName(_dialog, name); } GWEN_WIDGET *CppDialog::findWidgetByImplData(int index, void *ptr) { assert(_dialog); return GWEN_Dialog_FindWidgetByImplData(_dialog, index, ptr); } gwenhywfar-5.12.1/gui/cpp/gwengui-cpp-config.cmake.in0000666000175000017500000000302413702435660017360 00000000000000 # Macros cmake's CONFIGURE_PACKAGE_CONFIG_FILE() would create macro(set_and_check _var _file) set(${_var} "${_file}") if(NOT EXISTS "${_file}") message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") endif() endmacro() macro(check_required_components _NAME) foreach(comp ${${_NAME}_FIND_COMPONENTS}) if(NOT ${_NAME}_${comp}_FOUND) if(${_NAME}_FIND_REQUIRED_${comp}) set(${_NAME}_FOUND FALSE) endif() endif() endforeach() endmacro() include(CMakeFindDependencyMacro) find_dependency(gwenhywfar "@GWENHYWFAR_VERSION_STRING@") set_and_check(prefix "@prefix@") set_and_check(exec_prefix "@exec_prefix@") set_and_check(includedir "@includedir@") set_and_check(GWENGUI_CPP_INCLUDE_DIRS "@gwenhywfar_headerdir@") if(WIN32) set_and_check(GWENGUI_CPP_LIBRARIES "@libdir@/libgwengui-cpp.dll.a") elseif(APPLE) set_and_check(GWENGUI_CPP_LIBRARIES "@libdir@/libgwengui-cpp.dylib") else() set_and_check(GWENGUI_CPP_LIBRARIES "@libdir@/libgwengui-cpp.so") endif() set(GWENGUI_CPP_FOUND true) if(GWENGUI_CPP_FOUND AND NOT TARGET gwenhywfar::gui-cpp) add_library(gwenhywfar::gui-cpp UNKNOWN IMPORTED) set_target_properties(gwenhywfar::gui-cpp PROPERTIES IMPORTED_LOCATION "${GWENGUI_CPP_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${GWENGUI_CPP_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES gwenhywfar::core ) endif() set(GWENGUI_CPP_LIBRARIES ${GWENGUI_CPP_LIBRARIES} ${GWENHYWFAR_LIBRARIES}) mark_as_advanced( GWENGUI_CPP_INCLUDE_DIRS GWENGUI_CPP_LIBRARIES ) gwenhywfar-5.12.1/gui/cpp/cppwidget.cpp0000644000175000017500000001441313142134462014745 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "cppwidget_p.hpp" #include "cppdialog.hpp" #include #include #include #include #include #include #include #include #include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) GWEN_INHERIT(GWEN_WIDGET, CppWidget); int CppWidgetLinker::SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { CppWidget *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, CppWidget, w); assert(xw); return xw->setIntProperty(prop, index, value, doSignal); } int CppWidgetLinker::GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { CppWidget *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, CppWidget, w); assert(xw); return xw->getIntProperty(prop, index, defaultValue); } int CppWidgetLinker::SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { CppWidget *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, CppWidget, w); assert(xw); return xw->setCharProperty(prop, index, value, doSignal); } const char *CppWidgetLinker::GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { CppWidget *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, CppWidget, w); assert(xw); return xw->getCharProperty(prop, index, defaultValue); } int CppWidgetLinker::AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { CppWidget *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, CppWidget, w); assert(xw); return xw->addChildGuiWidget(wChild); } void CppWidgetLinker::freeData(void *bp, void *p) { CppWidget *xw; xw=(CppWidget*) p; if (xw->_widget) xw->_widget=NULL; delete xw; } CppWidget::CppWidget() :_widget(NULL) { } CppWidget::CppWidget(GWEN_WIDGET *w) :_widget(w) { GWEN_INHERIT_SETDATA(GWEN_WIDGET, CppWidget, _widget, this, CppWidgetLinker::freeData); _setIntPropertyFn=GWEN_Widget_SetSetIntPropertyFn(_widget, CppWidgetLinker::SetIntProperty); _getIntPropertyFn=GWEN_Widget_SetGetIntPropertyFn(_widget, CppWidgetLinker::GetIntProperty); _setCharPropertyFn=GWEN_Widget_SetSetCharPropertyFn(_widget, CppWidgetLinker::SetCharProperty); _getCharPropertyFn=GWEN_Widget_SetGetCharPropertyFn(_widget, CppWidgetLinker::GetCharProperty); _addChildGuiWidgetFn=GWEN_Widget_SetAddChildGuiWidgetFn(_widget, CppWidgetLinker::AddChildGuiWidget); } CppWidget::~CppWidget() { if (_widget) { GWEN_INHERIT_UNLINK(GWEN_WIDGET, CppWidget, _widget) } } GWEN_WIDGET *CppWidget::getCInterface() { return _widget; } CppWidget *CppWidget::getWidget(GWEN_WIDGET *w) { CppWidget *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, CppWidget, w); assert(xw); return xw; } CppDialog *CppWidget::getDialog() { GWEN_DIALOG *dlg; dlg=GWEN_Widget_GetDialog(_widget); if (dlg) return CppDialog::getDialog(dlg); else return NULL; } int CppWidget::setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { if (_setIntPropertyFn) return _setIntPropertyFn(_widget, prop, index, value, doSignal); else return GWEN_ERROR_NOT_SUPPORTED; } int CppWidget::getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { if (_getIntPropertyFn) return _getIntPropertyFn(_widget, prop, index, defaultValue); else return defaultValue; } int CppWidget::setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { if (_setCharPropertyFn) return _setCharPropertyFn(_widget, prop, index, value, doSignal); else return GWEN_ERROR_NOT_SUPPORTED; } const char *CppWidget::getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { if (_getCharPropertyFn) return _getCharPropertyFn(_widget, prop, index, defaultValue); else return defaultValue; } int CppWidget::addChildGuiWidget(GWEN_WIDGET *wChild) { if (_addChildGuiWidgetFn) return _addChildGuiWidgetFn(_widget, wChild); else return GWEN_ERROR_NOT_SUPPORTED; } const char *CppWidget::getName() { return GWEN_Widget_GetName(_widget); } GWEN_WIDGET_TYPE CppWidget::getType() { return GWEN_Widget_GetType(_widget); } int CppWidget::getColumns() { return GWEN_Widget_GetColumns(_widget); } int CppWidget::getRows() { return GWEN_Widget_GetRows(_widget); } uint32_t CppWidget::getFlags() { return GWEN_Widget_GetFlags(_widget); } int CppWidget::getGroupId() { return GWEN_Widget_GetGroupId(_widget); } int CppWidget::getWidth() { return GWEN_Widget_GetWidth(_widget); } int CppWidget::getHeight() { return GWEN_Widget_GetHeight(_widget); } const char *CppWidget::getText(int idx) { return GWEN_Widget_GetText(_widget, idx); } const char *CppWidget::getIconFileName() { return GWEN_Widget_GetIconFileName(_widget); } const char *CppWidget::getImageFileName() { return GWEN_Widget_GetImageFileName(_widget); } gwenhywfar-5.12.1/gui/cpp/cppwidget.hpp0000644000175000017500000000473213142134462014755 00000000000000/*************************************************************************** begin : Tue Jul 13 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef CPPWIDGET_HPP #define CPPWIDGET_HPP #include #include #include class CppWidget; class CppDialog; #include /** * @brief A C++ binding for the C module @ref GWEN_WIDGET * * This class simply is a C++ binding for the C module @ref GWEN_WIDGET. * It redirects C callbacks used by GWEN_WIDGET to virtual functions in * this class. * * @author Martin Preuss */ class CPPGUI_API CppWidget { friend class CppWidgetLinker; private: GWEN_WIDGET_SETINTPROPERTY_FN _setIntPropertyFn; GWEN_WIDGET_GETINTPROPERTY_FN _getIntPropertyFn; GWEN_WIDGET_SETCHARPROPERTY_FN _setCharPropertyFn; GWEN_WIDGET_GETCHARPROPERTY_FN _getCharPropertyFn; GWEN_WIDGET_ADDCHILDGUIWIDGET_FN _addChildGuiWidgetFn; public: CppWidget(GWEN_WIDGET *w); virtual ~CppWidget(); GWEN_WIDGET *getCInterface(); static CPPGUI_API CppWidget *getWidget(GWEN_WIDGET *w); CppDialog *getDialog(); const char *getName(); GWEN_WIDGET_TYPE getType(); int getColumns(); int getRows(); uint32_t getFlags(); int getGroupId(); int getWidth(); int getHeight(); const char *getText(int idx); const char *getIconFileName(); const char *getImageFileName(); protected: GWEN_WIDGET *_widget; CppWidget(); virtual int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); virtual int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); virtual int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); virtual const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); virtual int addChildGuiWidget(GWEN_WIDGET *wChild); }; #endif /* CPPWIDGET_HPP */ gwenhywfar-5.12.1/gui/cpp/Makefile.in0000644000175000017500000007404215032533614014326 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gui/cpp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gwengui-cpp-config.cmake \ gwengui-cpp-config-version.cmake CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakeconfigdir)" \ "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libgwengui_cpp_la_DEPENDENCIES = \ $(top_builddir)/src/$(gwenhywfar_internal_libname) am_libgwengui_cpp_la_OBJECTS = cppdialog.lo cppgui.lo cppwidget.lo libgwengui_cpp_la_OBJECTS = $(am_libgwengui_cpp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgwengui_cpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libgwengui_cpp_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/cppdialog.Plo ./$(DEPDIR)/cppgui.Plo \ ./$(DEPDIR)/cppwidget.Plo am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgwengui_cpp_la_SOURCES) DIST_SOURCES = $(libgwengui_cpp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(cmakeconfig_DATA) HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/gwengui-cpp-config-version.cmake.in \ $(srcdir)/gwengui-cpp-config.cmake.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DBUILDING_CPP_GUI -DPACKAGE=\"$(PACKAGE)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) $(fox_includes) -Ihtml \ @visibility_cflags@ lib_LTLIBRARIES = libgwengui-cpp.la cmakeconfigdir = $(libdir)/cmake/gwengui-cpp-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwengui-cpp-config.cmake gwengui-cpp-config-version.cmake noinst_HEADERS = \ cppdialog_p.hpp \ cppgui_p.hpp \ cppwidget_p.hpp libgwengui_cpp_la_LIBADD = $(top_builddir)/src/$(gwenhywfar_internal_libname) libgwengui_cpp_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_cpp_la_SOURCES = \ cppdialog.cpp \ cppgui.cpp \ cppwidget.cpp iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-cpp iheader_HEADERS = \ api.h \ cppgui.hpp \ cppdialog.hpp \ cppwidget.hpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/cpp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/cpp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gwengui-cpp-config.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-cpp-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-cpp-config-version.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-cpp-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-cpp.la: $(libgwengui_cpp_la_OBJECTS) $(libgwengui_cpp_la_DEPENDENCIES) $(EXTRA_libgwengui_cpp_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgwengui_cpp_la_LINK) -rpath $(libdir) $(libgwengui_cpp_la_OBJECTS) $(libgwengui_cpp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppdialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppgui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppwidget.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-cmakeconfigDATA: $(cmakeconfig_DATA) @$(NORMAL_INSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cmakeconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cmakeconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakeconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakeconfigdir)" || exit $$?; \ done uninstall-cmakeconfigDATA: @$(NORMAL_UNINSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(cmakeconfigdir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakeconfigdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/cppdialog.Plo -rm -f ./$(DEPDIR)/cppgui.Plo -rm -f ./$(DEPDIR)/cppwidget.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-cmakeconfigDATA install-iheaderHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/cppdialog.Plo -rm -f ./$(DEPDIR)/cppgui.Plo -rm -f ./$(DEPDIR)/cppwidget.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-cmakeconfigDATA uninstall-iheaderHEADERS \ uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am \ install-cmakeconfigDATA install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-iheaderHEADERS \ install-info install-info-am install-libLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-cmakeconfigDATA \ uninstall-iheaderHEADERS uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/fox16/0000755000175000017500000000000015032533716012516 500000000000000gwenhywfar-5.12.1/gui/fox16/fox16_gui_updater_l.hpp0000644000175000017500000000144713142134462017016 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_GUI_UPDATER_L_HPP #define FOX16_GUI_UPDATER_L_HPP #include #include class FOX16_GuiUpdater: public FXObject { FXDECLARE(FOX16_GuiUpdater) public: enum { ID_CHORE=1 }; FOX16_GuiUpdater(); ~FOX16_GuiUpdater(); void guiUpdate(); long onChore(FXObject*, FXSelector, void*); protected: FXuint m_guiIdleFlag; }; #endif gwenhywfar-5.12.1/gui/fox16/api.h0000664000175000017500000000257014460564441013371 00000000000000/*************************************************************************** copyright : (C) 2004 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GWEN_GUI_FOX16_API_H #define GWEN_GUI_FOX16_API_H #include #if defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) || defined _MSC_VER # ifdef BUILDING_FOX16_GUI /* building Fox16 */ # if GWENHYWFAR_SYS_IS_WINDOWS /* for windows */ # ifdef __declspec # define FOX16GUI_API __declspec (dllexport) # else /* if __declspec */ # define FOX16GUI_API # endif /* if NOT __declspec */ # else /* for non-win32 */ # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE # define FOX16GUI_API __attribute__((visibility("default"))) # else # define FOX16GUI_API # endif # endif # else /* not building Fox16 */ # if GWENHYWFAR_SYS_IS_WINDOWS /* for windows */ # ifdef __declspec # define FOX16GUI_API __declspec (dllimport) # else /* if __declspec */ # define FOX16GUI_API # endif /* if NOT __declspec */ # else /* for non-win32 */ # define FOX16GUI_API # endif # endif #endif #endif gwenhywfar-5.12.1/gui/fox16/fox16_gui_updater.cpp0000644000175000017500000000223313142134462016470 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_gui_updater_l.hpp" #include FXDEFMAP(FOX16_GuiUpdater) FOX16_GuiUpdaterMap[]= { FXMAPFUNC(SEL_CHORE, FOX16_GuiUpdater::ID_CHORE, FOX16_GuiUpdater::onChore), }; FXIMPLEMENT(FOX16_GuiUpdater, FXObject, FOX16_GuiUpdaterMap, ARRAYNUMBER(FOX16_GuiUpdaterMap)) FOX16_GuiUpdater::FOX16_GuiUpdater() :FXObject() , m_guiIdleFlag(0) { } FOX16_GuiUpdater::~FOX16_GuiUpdater() { } void FOX16_GuiUpdater::guiUpdate() { FXApp *a=FXApp::instance(); a->addChore(this, ID_CHORE); a->flush(true); m_guiIdleFlag=0; a->runUntil(m_guiIdleFlag); } long FOX16_GuiUpdater::onChore(FXObject*, FXSelector, void*) { m_guiIdleFlag=1; return 1; } gwenhywfar-5.12.1/gui/fox16/fox16_gui.hpp0000664000175000017500000000572314156451716014774 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_GUI_HPP #define FOX16_GUI_HPP #include #include #include #include #include /* TODO: * - catch closing of dialog and send GWEN_DialogEvent_TypeClose. * */ class FOX16_GuiUpdater; class FOX16GUI_API FOX16_Gui: public CppGui { public: class FOX16GUI_API WinScope { friend class FOX16_Gui; public: typedef enum { WIN_SCOPE_TYPE_WINDOW=0, } WIN_SCOPE_TYPE; WinScope(uint32_t parentId, FXWindow *w); WinScope(FXWindow *w); ~WinScope(); uint32_t getParentId() const { return m_parentId;}; uint32_t getId() const { return m_id;}; FXWindow *getWindow() const { return m_window;}; protected: WinScope(WIN_SCOPE_TYPE t, uint32_t parentId, FXWindow *w); WIN_SCOPE_TYPE getType() const { return m_type;}; uint32_t m_parentId; uint32_t m_id; FXWindow *m_window; WIN_SCOPE_TYPE m_type; }; typedef std::list WinScopePtrList; enum { ID_MAINWINDOW=1 }; FOX16_Gui(FXApp* a); ~FOX16_Gui(); FXApp *getApp() { return m_app;}; FOX16GUI_API static FXString getRawText(const char *text); FOX16GUI_API static FXString getHtmlText(const char *text); FXWindow *getGuiWindow(uint32_t id); FOX16GUI_API static FOX16_Gui *getFgGui(); virtual int openDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int closeDialog(GWEN_DIALOG *dlg); virtual int runDialog(GWEN_DIALOG *dlg, int untilEnd); HTML_FONT *getFont(const char *fontName, int fontSize, uint32_t fontFlags); protected: uint32_t getNextId(); uint32_t getIdOfLastScope(); void addWinScope(WinScope *ws); void delWinScope(WinScope *ws); void dumpScopeList(); HTML_FONT *findFont(const char *fontName, int fontSize, uint32_t fontFlags); int print(const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid); int execDialog(GWEN_DIALOG *dlg, uint32_t guiid); int getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); WinScope *findWinScope(uint32_t id); WinScope *findWinScopeExt(uint32_t id); FXApp *m_app; WinScopePtrList m_scopeList; uint32_t m_lastId; FOX16_GuiUpdater *m_updater; HTML_FONT_LIST *m_fontList; }; #endif gwenhywfar-5.12.1/gui/fox16/fox16_gui_dialog_l.hpp0000664000175000017500000000714314156451716016624 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_GUI_DIALOG_L_HPP #define FOX16_GUI_DIALOG_L_HPP #include "fox16_gui.hpp" #include #include #include #include #include #include class FOX16_GuiDialog: public FXObject, public CppDialog { FXDECLARE(FOX16_GuiDialog) protected: class RadioButtonGroup { protected: FXDataTarget m_radioTarget; int m_groupId; FXint m_radioValue; int m_buttonCount; std::list m_buttonList; public: RadioButtonGroup(int groupId, FXObject* tgt=NULL, FXSelector sel=0) :m_radioTarget(m_radioValue, tgt, sel), m_groupId(groupId), m_radioValue(0), m_buttonCount(0) {}; ~RadioButtonGroup() { std::list::iterator it; for (it=m_buttonList.begin(); it!=m_buttonList.end(); it++) /* reset target pointer in buttons because we are about to destroy the FXDataTarget */ (*it)->setTarget(NULL); }; int getGroupId() { return m_groupId;}; FXDataTarget *getDataTarget() { return &m_radioTarget;}; int getButtonCount() { return m_buttonList.size();}; FXint getRadioValue() const { return m_radioValue;}; void addButton(FXRadioButton *rb) { m_buttonList.push_back(rb); }; }; public: enum { ID_WIDGET_FIRST=1, ID_WIDGET_LAST=1000, ID_LAST }; FOX16_GuiDialog(FOX16_Gui *gui, GWEN_DIALOG *dlg); virtual ~FOX16_GuiDialog(); static FOX16_GuiDialog *getDialog(GWEN_DIALOG *dlg); long onSelCommand(FXObject *sender, FXSelector sel, void *ptr); long onSelChanged(FXObject *sender, FXSelector sel, void *ptr); long onSelKeyPress(FXObject *sender, FXSelector sel, void *ptr); long onSelKeyRelease(FXObject *sender, FXSelector sel, void *ptr); FXIcon *getIcon(const char *fileName); bool setup(FXWindow *parentWindow); int execute(); int cont(); int openDialog(); int closeDialog(); FXDialogBox *getMainWindow() { return _mainWidget;}; protected: FOX16_Gui *_gui; int _widgetCount; FXDialogBox *_mainWidget; FXIconSource *m_iconSource; std::list m_iconList; std::list m_radioGroups; bool m_sizeChanged; FOX16_GuiDialog(); FXWindow *setupTree(FXWindow *parentWindow, GWEN_WIDGET *w); void guiUpdate(); virtual int setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); virtual int getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); virtual int setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); virtual const char *getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); }; #endif /* FOX16_DIALOG_L_HPP */ gwenhywfar-5.12.1/gui/fox16/fox16_htmlctx.hpp0000644000175000017500000000365313142134462015657 00000000000000/*************************************************************************** begin : Mon Feb 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_HTMLCTX_HPP #define FOX16_HTMLCTX_HPP #include #include #include #include #include class FOX16GUI_API FOX16_HtmlCtx { friend class FOX16_HtmlCtxLinker; public: FOX16_HtmlCtx(uint32_t flags); ~FOX16_HtmlCtx(); void setText(const char *s); int getWidth(); int getHeight(); HTML_FONT *getFont(const char *fontName, int fontSize, uint32_t fontFlags); HTML_IMAGE *getImage(const char *imageName); void addMediaPath(const char *s); int layout(int width, int height); void dump(); void paint(FXDC *dc, int xOffset, int yOffset); void paintAt(FXDC *dc, int xOffset, int yOffset, int xText, int yText, int w, int h); void setBackgroundColor(FXColor c); void setForegroundColor(FXColor c); protected: GWEN_XML_CONTEXT *_context; FXFont *_font; FXColor _fgColor; FXColor _bgColor; FXIconSource *m_iconSource; FXFont *_getFoxFont(HTML_FONT *fnt); void _paint(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset); void _paintAt(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset, int xText, int yText, int w, int h); int getTextWidth(HTML_FONT *fnt, const char *s); int getTextHeight(HTML_FONT *fnt, const char *s); uint32_t getColorFromName(const char *name); }; #endif gwenhywfar-5.12.1/gui/fox16/fox16_htmllabel.cpp0000664000175000017500000001470214156451716016144 00000000000000/*************************************************************************** begin : Tue Feb 23 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_htmllabel.hpp" #include "fox16_htmlctx.hpp" #include #include #include #include #define MAX_DEFAULT_WIDTH 400 #define ICON_SPACE 4 FXDEFMAP(FOX16_HtmlLabel) FOX16_HtmlLabelMap[]= { FXMAPFUNC(SEL_PAINT,0,FOX16_HtmlLabel::onPaint), }; // Object implementation FXIMPLEMENT(FOX16_HtmlLabel, FXFrame, FOX16_HtmlLabelMap, ARRAYNUMBER(FOX16_HtmlLabelMap)) FOX16_HtmlLabel::FOX16_HtmlLabel(FXComposite* p, const FXString& text, FXuint opts, FXint x, FXint y, FXint w, FXint h, FXint pl, FXint pr, FXint pt, FXint pb) :FXFrame(p, opts, x, y, w, h, pl, pr, pt, pb) ,m_htmlCtx(NULL) ,m_minWidth(0) ,m_maxDefaultWidth(-1) ,m_haveDefaultDims(false) ,m_mediaPaths(NULL) ,m_icon(NULL) { m_mediaPaths=GWEN_StringList_new(); setText(text); flags|=FLAG_ENABLED|FLAG_DIRTY|FLAG_RECALC; } FOX16_HtmlLabel::FOX16_HtmlLabel() :FXFrame() ,m_htmlCtx(NULL) ,m_minWidth(0) ,m_mediaPaths(NULL) ,m_icon(NULL) { flags|=FLAG_ENABLED; } FOX16_HtmlLabel::~FOX16_HtmlLabel() { if (m_htmlCtx) delete m_htmlCtx; GWEN_StringList_free(m_mediaPaths); } void FOX16_HtmlLabel::setText(const FXString& text) { m_haveDefaultDims=false; m_text=text; updateHtml(); flags|=FLAG_DIRTY; layout(); recalc(); update(); } void FOX16_HtmlLabel::addMediaPath(const char *s) { assert(s); GWEN_StringList_AppendString(m_mediaPaths, s, 0, 1); } void FOX16_HtmlLabel::setIcon(FXIcon *ic) { m_icon=ic; flags|=FLAG_DIRTY; layout(); recalc(); update(); } void FOX16_HtmlLabel::calcDefaultDims() { #if 0 int w; if (options & FLAGS_NO_WORDWRAP) w=-1; else if (options & FLAGS_USE_FULL_WIDTH) w=width; else w=m_maxDefaultWidth; m_htmlCtx->layout(w-border*2, -1); m_defaultWidth=m_htmlCtx->getWidth(); m_defaultHeight=m_htmlCtx->getHeight(); m_haveDefaultDims=true; #else int w; if (options & FLAGS_NO_WORDWRAP) w=-1; else if (options & FLAGS_USE_FULL_WIDTH) w=width; else if (m_maxDefaultWidth!=-1) w=m_maxDefaultWidth; else { int wTmp=1024; int mask=1024; int i; for (i=0; i<10; i++) { double ar, nw, nh; m_htmlCtx->layout(wTmp-border*2, -1); nw=(double) (m_htmlCtx->getWidth()); nh=(double)(m_htmlCtx->getHeight()); ar=nw/nh; if (ar>=3.5 && ar<4.0) break; if (ar>4.0) /* w/h too high, so we need to reduce the width */ wTmp&=~mask; mask>>=1; wTmp|=mask; } w=wTmp; } /* TODO: handle icon size correctly */ m_htmlCtx->layout(w-border*2, -1); m_defaultWidth=m_htmlCtx->getWidth(); m_defaultHeight=m_htmlCtx->getHeight(); m_haveDefaultDims=true; //DBG_ERROR(0, "Labelsize: %d / %d", m_defaultWidth, m_defaultHeight); #endif } FXint FOX16_HtmlLabel::getDefaultWidth() { int w; if (m_htmlCtx==NULL) updateHtml(); if (!m_haveDefaultDims) calcDefaultDims(); w=m_defaultWidth; if (m_icon) w+=m_icon->getWidth()+ICON_SPACE; //DBG_ERROR(0, "GetDefaultWidth[%s]: Width= %d", m_text.text(), w); return w; } FXint FOX16_HtmlLabel::getDefaultHeight() { int h; if (m_htmlCtx==NULL) updateHtml(); if (!m_haveDefaultDims) calcDefaultDims(); h=m_defaultHeight; if (m_icon) { int ih; ih=m_icon->getHeight(); if (ih>h) h=ih; } //DBG_ERROR(0, "GetDefaultHeight[%s]: Height= %d", m_text.text(), h); return h; } long FOX16_HtmlLabel::onPaint(FXObject*, FXSelector, void *ptr) { FXEvent *ev=(FXEvent*)ptr; FXDCWindow dc(this, ev); dc.setForeground(backColor); dc.fillRectangle(border, border, width-(border*2), height-(border*2)); if (m_htmlCtx) { //DBG_ERROR(0, "Paint: Labelsize= %d / %d", m_htmlCtx->getWidth(), m_htmlCtx->getHeight()); if (m_icon) { int th; int ih; int ty=border; if(isEnabled()) dc.drawIcon(m_icon, border, border); else dc.drawIconSunken(m_icon, border, border); ih=m_icon->getHeight(); th=m_htmlCtx->getHeight(); if (ih>th) ty+=(ih-th)/2; m_htmlCtx->paint(&dc, border+ICON_SPACE+m_icon->getWidth(), ty); } else { m_htmlCtx->paint(&dc, border, border); } } else { DBG_ERROR(GWEN_LOGDOMAIN, "No HtmlContext"); } drawFrame(dc, 0, 0, width, height); return 1; } void FOX16_HtmlLabel::create() { FXFrame::create(); if (m_icon) m_icon->create(); updateHtml(); recalc(); } void FOX16_HtmlLabel::layout() { #if 0 int w; m_haveDefaultDims=false; if (options & FLAGS_NO_WORDWRAP) w=-1; else if (options & FLAGS_USE_FULL_WIDTH) { w=width; if (m_icon) w-=(m_icon->getWidth()+ICON_SPACE); } else w=m_maxDefaultWidth; if (m_htmlCtx==NULL) updateHtml(); m_htmlCtx->layout(w-border*2, height-border*2); update(); flags&=~FLAG_DIRTY; #else int w; //DBG_ERROR(0, "Layout[%s]: Width=%d, height=%d", m_text.text(), width, height); if (m_htmlCtx==NULL) updateHtml(); if (!m_haveDefaultDims) calcDefaultDims(); if (options & FLAGS_NO_WORDWRAP) w=-1; else if (options & FLAGS_USE_FULL_WIDTH) { w=width; if (m_icon) w-=(m_icon->getWidth()+ICON_SPACE); } else w=m_defaultWidth; m_htmlCtx->layout(w-border*2, height-border*2); update(); flags&=~FLAG_DIRTY; #endif } void FOX16_HtmlLabel::updateHtml() { GWEN_STRINGLISTENTRY *se; if (m_htmlCtx) delete m_htmlCtx; m_haveDefaultDims=false; m_htmlCtx=new FOX16_HtmlCtx(0); /* copy media paths to context */ se=GWEN_StringList_FirstEntry(m_mediaPaths); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); assert(s); m_htmlCtx->addMediaPath(s); se=GWEN_StringListEntry_Next(se); } m_htmlCtx->setBackgroundColor(backColor); m_htmlCtx->setForegroundColor(fxcolorfromname("black")); m_htmlCtx->setText(m_text.text()); flags|=FLAG_DIRTY; } gwenhywfar-5.12.1/gui/fox16/fox16_htmltext.hpp0000644000175000017500000000353413142134462016043 00000000000000/*************************************************************************** begin : Sat Jun 19 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_HTMLTEXT_HPP #define FOX16_HTMLTEXT_HPP #include #include class FOX16_HtmlCtx; class FOX16GUI_API FOX16_HtmlText: public FXScrollArea { FXDECLARE(FOX16_HtmlText) public: enum { /** don't wrap the text. If this flag is given as parameter to the constructor * then you'll have to insert line-breaks into the text yourself. */ FLAGS_NO_WORDWRAP = 0x00080000 }; FOX16_HtmlText(FXComposite* p, const FXString& text, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0); ~FOX16_HtmlText(); /// Set the text for this label void setText(const FXString& text); /// Get the text for this label FXString getText() const { return m_text; } virtual FXint getContentWidth(); virtual FXint getContentHeight(); void setMinimumWidth(int i) { m_minWidth=i;}; void makePositionVisible(FXint pos); long onPaint(FXObject*, FXSelector, void*); void layout(); protected: FOX16_HtmlCtx *m_htmlCtx; FXString m_text; int m_minWidth; int m_maxDefaultWidth; bool m_haveDefaultDims; FXint m_defaultWidth; FXint m_defaultHeight; FXint margintop; // Margins top FXint marginbottom; // Margin bottom FXint marginleft; // Margin left FXint marginright; // Margin right FXint barwidth; FOX16_HtmlText(); void updateHtml(); void calcDefaultDims(); }; #endif gwenhywfar-5.12.1/gui/fox16/fox16_gui_sortinglist_l.hpp0000644000175000017500000000501014154416117017725 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_GUI_SORTINGLIST_HPP #define FOX16_GUI_SORTINGLIST_HPP #include class FOX16_GuiSortingList: public FXFoldingList { FXDECLARE(FOX16_GuiSortingList) public: public: FOX16_GuiSortingList(FXComposite *p, FXObject* tgt=NULL, FXSelector sel=0, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0); virtual ~FOX16_GuiSortingList(); FXFoldingItem *getItem(int idx); virtual void sortByColumn(int c, bool up); FXbool getHeaderArrowDir(int c) const; void setHeaderArrowDir(int c, FXbool b); long onHeaderClicked(FXObject*, FXSelector, void* ptr); protected: FOX16_GuiSortingList(); static FXint sortFuncCol0a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol0d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol1a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol1d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol2a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol2d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol3a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol3d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol4a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol4d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol5a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol5d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol6a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol6d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol7a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol7d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol8a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol8d(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol9a(const FXFoldingItem*,const FXFoldingItem*); static FXint sortFuncCol9d(const FXFoldingItem*,const FXFoldingItem*); }; #endif gwenhywfar-5.12.1/gui/fox16/fox16_gui.cpp0000664000175000017500000002475714156451716014777 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_gui.hpp" #include "fox16_gui_dialog_l.hpp" #include "fox16_gui_updater_l.hpp" #include FOX16_Gui::WinScope::WinScope(uint32_t parentId, FXWindow *w) : m_parentId(parentId) , m_id(0) , m_window(w) , m_type(WIN_SCOPE_TYPE_WINDOW) { FOX16_Gui *gui=FOX16_Gui::getFgGui(); assert(gui); if (m_parentId==0) m_parentId=gui->getIdOfLastScope(); m_id=gui->getNextId(); gui->addWinScope(this); } FOX16_Gui::WinScope::WinScope(FXWindow *w) : m_parentId() , m_id(ID_MAINWINDOW) , m_window(w) , m_type(WIN_SCOPE_TYPE_WINDOW) { FOX16_Gui *gui=FOX16_Gui::getFgGui(); assert(gui); gui->addWinScope(this); } FOX16_Gui::WinScope::WinScope(FOX16_Gui::WinScope::WIN_SCOPE_TYPE t, uint32_t parentId, FXWindow *w) : m_parentId(parentId) , m_id(0) , m_window(w) , m_type(t) { FOX16_Gui *gui=FOX16_Gui::getFgGui(); assert(gui); if (m_parentId==0) m_parentId=gui->getIdOfLastScope(); m_id=gui->getNextId(); gui->addWinScope(this); } FOX16_Gui::WinScope::~WinScope() { FOX16_Gui *gui=FOX16_Gui::getFgGui(); assert(gui); gui->delWinScope(this); } FOX16_Gui::FOX16_Gui(FXApp *a) :CppGui() ,m_app(a) ,m_lastId(0) ,m_updater() ,m_fontList(NULL) { m_updater=new FOX16_GuiUpdater(); GWEN_Gui_AddFlags(_gui, GWEN_GUI_FLAGS_DIALOGSUPPORTED); GWEN_Gui_UseDialogs(_gui); GWEN_Gui_SetName(_gui, "fox16-gui"); m_fontList=HtmlFont_List_new(); } FOX16_Gui::~FOX16_Gui() { if (!m_scopeList.empty()) { DBG_ERROR(GWEN_LOGDOMAIN, "ScopeList is not empty!"); } if (m_updater) delete m_updater; HtmlFont_List_free(m_fontList); } uint32_t FOX16_Gui::getNextId() { return ++m_lastId; } uint32_t FOX16_Gui::getIdOfLastScope() { if (!m_scopeList.empty()) return m_scopeList.back()->getId(); return 0; } void FOX16_Gui::addWinScope(WinScope *ws) { m_scopeList.push_back(ws); } void FOX16_Gui::delWinScope(WinScope *ws) { m_scopeList.remove(ws); } FOX16_Gui::WinScope *FOX16_Gui::findWinScope(uint32_t id) { WinScopePtrList::iterator it; for (it=m_scopeList.begin(); it!=m_scopeList.end(); it++) { if ((*it)->getId()==id) return (*it); } return NULL; } FXWindow *FOX16_Gui::getGuiWindow(uint32_t id) { return m_app->getActiveWindow(); } FOX16_Gui *FOX16_Gui::getFgGui() { CppGui *cppgui; cppgui=CppGui::getCppGui(); if (cppgui) return dynamic_cast(cppgui); else return NULL; } void FOX16_Gui::dumpScopeList() { WinScopePtrList::iterator it; for (it=m_scopeList.begin(); it!=m_scopeList.end(); it++) { const char *s; switch((*it)->getType()) { case WinScope::WIN_SCOPE_TYPE_WINDOW: s="window"; break; default: s="unknown"; break; } fprintf(stderr, "WinScope: id %08x, parent %08x, type %s\n", (*it)->getId(), (*it)->getParentId(), s); } } int FOX16_Gui::print(const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid) { DBG_ERROR(GWEN_LOGDOMAIN, "Not implemented"); return GWEN_ERROR_NOT_IMPLEMENTED; } FXString FOX16_Gui::getRawText(const char *text) { const char *p=0; const char *p2=0; if (text==NULL) return FXString(""); /* find begin of HTML area */ p=text; while ((p=strchr(p, '<'))) { const char *t; t=p; t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } p++; } /* while */ /* find end of HTML area */ if (p) { p2=p; p2+=6; /* skip "" */ while ((p2=strchr(p2, '<'))) { const char *t; t=p2; t++; if (toupper(*t)=='/') { t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } } p2++; } /* while */ } if (p && p2) { p2+=7; /* skip "" */ int startPos=(p-text); int endPos=(p2-text); FXString result; result=FXString(text); result.erase(startPos, endPos); return result; } else return FXString(text); } FXString FOX16_Gui::getHtmlText(const char *text) { const char *p=0; const char *p2=0; if (text==NULL) return FXString(""); /* find begin of HTML area */ p=text; while ((p=strchr(p, '<'))) { const char *t; t=p; t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } p++; } /* while */ /* find end of HTML area */ if (p) { p+=6; /* skip "" */ p2=p; while ((p2=strchr(p2, '<'))) { const char *t; t=p2; t++; if (toupper(*t)=='/') { t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } } p2++; } /* while */ } if (p && p2) return FXString(p, p2-p); else return FXString(text); } int FOX16_Gui::execDialog(GWEN_DIALOG *dlg, uint32_t guiid) { FOX16_GuiDialog foxDlg(this, dlg); FXWindow *owner; /* get main window of parent dialog (if any) */ owner=m_app->getActiveWindow(); /* setup widget tree for the dialog */ if (!(foxDlg.setup(owner))) { return GWEN_ERROR_GENERIC; } return foxDlg.execute(); } int FOX16_Gui::openDialog(GWEN_DIALOG *dlg, uint32_t guiid) { FOX16_GuiDialog *foxDlg; FXWindow *owner; /* get main window of parent dialog (if any) */ owner=m_app->getActiveWindow(); foxDlg=new FOX16_GuiDialog(this, dlg); /* setup widget tree for the dialog */ if (!(foxDlg->setup(owner))) { delete foxDlg; return GWEN_ERROR_GENERIC; } foxDlg->openDialog(); m_updater->guiUpdate(); return 0; } int FOX16_Gui::closeDialog(GWEN_DIALOG *dlg) { FOX16_GuiDialog *foxDlg; foxDlg=FOX16_GuiDialog::getDialog(dlg); assert(foxDlg); foxDlg->closeDialog(); delete foxDlg; m_updater->guiUpdate(); return 0; } int FOX16_Gui::runDialog(GWEN_DIALOG *dlg, int untilEnd) { FOX16_GuiDialog *foxDlg; foxDlg=FOX16_GuiDialog::getDialog(dlg); assert(foxDlg); if (untilEnd) return foxDlg->cont(); else { m_updater->guiUpdate(); return 0; } } int FOX16_Gui::getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid) { FXString sCaption; FXString sPatterns; FXString sPath; FXString str; FXWindow *owner; if (caption) sCaption=FXString(caption); if (patterns) { const char *s1; const char *s2; s1=patterns; while(s1 && *s1) { s2=strchr(s1, '\t'); if (s2) { str=FXString(s1, s2-s1); /* skip tab */ s2++; } else { str=FXString(s1); s2=NULL; } if (str.contains('(')) { if (!sPatterns.empty()) sPatterns+='\n'; sPatterns+=str.before('('); str=str.after('('); sPatterns+='('; sPatterns+=str.substitute(';', ','); } else { if (!sPatterns.empty()) sPatterns+='\n'; sPatterns+=str.substitute(';', ','); } s1=s2; } } if (GWEN_Buffer_GetUsedBytes(pathBuffer)) sPath=FXString(GWEN_Buffer_GetStart(pathBuffer)); owner=m_app->getModalWindow(); if (owner==NULL) { owner=m_app->getActiveWindow(); } if (owner==NULL) { owner=m_app->getRootWindow(); } if (owner==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not determine owner window"); return GWEN_ERROR_INTERNAL; } switch(fnt) { case GWEN_Gui_FileNameType_OpenFileName: str=FXFileDialog::getOpenFilename(owner, sCaption, sPath, sPatterns, 0); break; case GWEN_Gui_FileNameType_SaveFileName: str=FXFileDialog::getSaveFilename(owner, sCaption, sPath, sPatterns, 0); break; case GWEN_Gui_FileNameType_OpenDirectory: str=FXFileDialog::getOpenDirectory(owner, sCaption, sPath); break; } if (str.empty()) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty filename returned."); return GWEN_ERROR_ABORTED; } else { GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, str.text()); return 0; } } HTML_FONT *FOX16_Gui::findFont(const char *fontName, int fontSize, uint32_t fontFlags) { HTML_FONT *fnt; assert(m_fontList); fnt=HtmlFont_List_First(m_fontList); while(fnt) { const char *s; s=HtmlFont_GetFontName(fnt); if (s && *s && HtmlFont_GetFontSize(fnt)==fontSize && HtmlFont_GetFontFlags(fnt)==fontFlags && strcasecmp(s, fontName)==0) break; fnt=HtmlFont_List_Next(fnt); } return fnt; } HTML_FONT *FOX16_Gui::getFont(const char *fontName, int fontSize, uint32_t fontFlags) { HTML_FONT *fnt; fnt=findFont(fontName, fontSize, fontFlags); if (fnt) return fnt; else { fnt=HtmlFont_new(); HtmlFont_SetFontName(fnt, fontName); HtmlFont_SetFontSize(fnt, fontSize); HtmlFont_SetFontFlags(fnt, fontFlags); HtmlFont_List_Add(fnt, m_fontList); return fnt; } } gwenhywfar-5.12.1/gui/fox16/fox16_gui_dialog.cpp0000664000175000017500000015425414202761344016303 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_gui_dialog_l.hpp" #include "fox16_gui_sortinglist_l.hpp" #include "fox16_htmllabel.hpp" #include "fox16_htmltext.hpp" #include "theme.h" #include #include #include #include #include #include #include #define FOX16_DIALOG_WIDGET_REAL 0 #define FOX16_DIALOG_WIDGET_CONTENT 1 #define FOX16_DIALOG_STRING_TITLE 0 #define FOX16_DIALOG_STRING_VALUE 1 FXDEFMAP(FOX16_GuiDialog) FOX16_GuiDialogMap[]= { FXMAPFUNCS(SEL_COMMAND, FOX16_GuiDialog::ID_WIDGET_FIRST, FOX16_GuiDialog::ID_WIDGET_LAST, FOX16_GuiDialog::onSelCommand), FXMAPFUNCS(SEL_CHANGED, FOX16_GuiDialog::ID_WIDGET_FIRST, FOX16_GuiDialog::ID_WIDGET_LAST, FOX16_GuiDialog::onSelChanged), FXMAPFUNCS(SEL_KEYPRESS, FOX16_GuiDialog::ID_WIDGET_FIRST, FOX16_GuiDialog::ID_WIDGET_LAST, FOX16_GuiDialog::onSelKeyPress), FXMAPFUNCS(SEL_KEYRELEASE, FOX16_GuiDialog::ID_WIDGET_FIRST, FOX16_GuiDialog::ID_WIDGET_LAST, FOX16_GuiDialog::onSelKeyRelease) }; FXIMPLEMENT(FOX16_GuiDialog, FXObject, FOX16_GuiDialogMap, ARRAYNUMBER(FOX16_GuiDialogMap)) FOX16_GuiDialog::FOX16_GuiDialog() :FXObject() ,CppDialog() ,_gui(NULL) ,_widgetCount(0) ,_mainWidget(NULL) ,m_iconSource(NULL) ,m_sizeChanged(FALSE) { } FOX16_GuiDialog::FOX16_GuiDialog(FOX16_Gui *gui, GWEN_DIALOG *dlg) :FXObject() ,CppDialog(dlg) ,_gui(gui) ,_widgetCount(0) ,_mainWidget(NULL) ,m_iconSource(NULL) ,m_sizeChanged(FALSE) { } FOX16_GuiDialog::~FOX16_GuiDialog() { if (_mainWidget) delete _mainWidget; if (!m_iconList.empty()) { std::list::iterator it; for (it=m_iconList.begin(); it!=m_iconList.end(); it++) delete *it; m_iconList.clear(); } if (m_iconSource) delete m_iconSource; if (!m_radioGroups.empty()) { std::list::iterator it; for (it=m_radioGroups.begin(); it!=m_radioGroups.end(); it++) delete *it; } } FOX16_GuiDialog *FOX16_GuiDialog::getDialog(GWEN_DIALOG *dlg) { CppDialog *cppDlg; cppDlg=CppDialog::getDialog(dlg); if (cppDlg) return dynamic_cast(cppDlg); return NULL; } FXIcon *FOX16_GuiDialog::getIcon(const char *fileName) { GWEN_STRINGLIST *sl; sl=GWEN_Dialog_GetMediaPaths(_dialog); if (sl) { GWEN_BUFFER *tbuf; int rv; FXIcon *ic; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(sl, fileName, tbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return NULL; } if (m_iconSource==NULL) m_iconSource=new FXIconSource(FXApp::instance()); DBG_DEBUG(GWEN_LOGDOMAIN, "Loading [%s]", GWEN_Buffer_GetStart(tbuf)); ic=m_iconSource->loadIconFile(GWEN_Buffer_GetStart(tbuf)); if (ic==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not load icon [%s]", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return NULL; } m_iconList.push_back(ic); GWEN_Buffer_free(tbuf); return ic; } else { DBG_ERROR(GWEN_LOGDOMAIN, "No media paths in dialog"); return NULL; } } int FOX16_GuiDialog::execute() { FXDialogBox *dialogBox; int rv; dialogBox=_mainWidget; /* execute dialog */ dialogBox->show(PLACEMENT_OWNER); rv=dialogBox->execute(); GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); if (rv==0) { /* aborted */ return 0; } else /* accepted */ return 1; } int FOX16_GuiDialog::setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { DBG_DEBUG(GWEN_LOGDOMAIN, "SetIntProperty([%s], %d)", GWEN_Widget_GetName(w), value); switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeNone: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeComboBox: { THEMECOMBOBOX *f; f=(THEMECOMBOBOX*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: if (valuegetNumItems()) { f->setCurrentItem(value, doSignal?TRUE:FALSE); return 0; } else { DBG_ERROR(GWEN_LOGDOMAIN, "Index %d out of range in widget [%s]", value, GWEN_Widget_GetName(w)); return GWEN_ERROR_INVALID; } case GWEN_DialogProperty_ClearValues: f->clearItems(); return 0; default: break; } break; } case GWEN_Widget_TypeRadioButton: { FXRadioButton *f; f=(FXRadioButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setCheck((value==0)?FALSE:TRUE, doSignal?TRUE:FALSE); return 0; default: break; } break; } case GWEN_Widget_TypeProgressBar: { FXProgressBar *f; f=(FXProgressBar*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setProgress(value); return 0; case GWEN_DialogProperty_MinValue: if (value!=0) { DBG_ERROR(GWEN_LOGDOMAIN, "MinValue should be 0!"); return GWEN_ERROR_INVALID; } return 0; case GWEN_DialogProperty_MaxValue: f->setTotal(value); return 0; default: break; } break; } case GWEN_Widget_TypeSpinBox: { FXSpinner *f; f=(FXSpinner*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setValue(value); return 0; case GWEN_DialogProperty_MinValue: { FXint lo, hi; f->getRange(lo, hi); lo=value; f->setRange(lo, hi); return 0; } case GWEN_DialogProperty_MaxValue: { FXint lo, hi; f->getRange(lo, hi); hi=value; if (hisetRange(lo, hi); return 0; } default: break; } break; } case GWEN_Widget_TypeListBox: { FOX16_GuiSortingList *f; FXFoldingItem *fi; f=(FOX16_GuiSortingList*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: fi=f->getItem(value); if (fi) { f->killSelection(); f->setCurrentItem(fi, doSignal?TRUE:FALSE); f->selectItem(fi); f->makeItemVisible(fi); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Value %d out of range", value); return GWEN_ERROR_INVALID; } return 0; case GWEN_DialogProperty_ColumnWidth: f->setHeaderSize(index, value); return 0; case GWEN_DialogProperty_SelectionMode: switch(value) { case GWEN_Dialog_SelectionMode_None: /* simply fall-through */ case GWEN_Dialog_SelectionMode_Single: f->setListStyle(FOLDINGLIST_BROWSESELECT); return 0; case GWEN_Dialog_SelectionMode_Multi: f->setListStyle(FOLDINGLIST_EXTENDEDSELECT); return 0; ; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", value); return GWEN_ERROR_INVALID; case GWEN_DialogProperty_SelectionState: { FXFoldingItem *ti; ti=f->getItem(index); if (ti==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Index %d out of range", index); return GWEN_ERROR_INVALID; } ti->setSelected((value==0)?FALSE:TRUE); return 0; } case GWEN_DialogProperty_ClearValues: f->clearItems(); return 0; case GWEN_DialogProperty_SortDirection: { int i; for (i=0; igetNumHeaders(); i++) { if (i==index) { switch(value) { case GWEN_DialogSortDirection_None: f->setHeaderArrowDir(i, MAYBE); break; case GWEN_DialogSortDirection_Up: f->setHeaderArrowDir(i, TRUE); break; case GWEN_DialogSortDirection_Down: f->setHeaderArrowDir(i, FALSE); break; } } else f->setHeaderArrowDir(i, MAYBE); } switch(value) { case GWEN_DialogSortDirection_None: break; case GWEN_DialogSortDirection_Up: f->sortByColumn(i, true); break; case GWEN_DialogSortDirection_Down: f->sortByColumn(i, false); break; } } return 0; case GWEN_DialogProperty_Sort: { int i; for (i=0; igetNumHeaders(); i++) { FXbool b; b=f->getHeaderArrowDir(i); if (b!=MAYBE) { if (b==TRUE) f->sortByColumn(i, true); else f->sortByColumn(i, false); break; } } } return 0; default: break; } break; } case GWEN_Widget_TypeCheckBox: { FXCheckButton *f; f=(FXCheckButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setCheck((value==0)?FALSE:TRUE, doSignal?TRUE:FALSE); return 0; default: break; } break; } case GWEN_Widget_TypeTabBook: { FXTabBook *f; f=(FXTabBook*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setCurrent(value, doSignal?TRUE:FALSE); return 0; default: break; } break; } case GWEN_Widget_TypeWidgetStack: { FXSwitcher *f; f=(FXSwitcher*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setCurrent(value, doSignal?TRUE:FALSE); return 0; default: break; } break; } case GWEN_Widget_TypeLabel: case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: ; } { FXWindow *f; f=(FXWindow*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Width: f->recalc(); f->resize(value, f->getHeight()); m_sizeChanged=TRUE; return 0; case GWEN_DialogProperty_Height: f->recalc(); f->resize(f->getWidth(), value); m_sizeChanged=TRUE; return 0; case GWEN_DialogProperty_Enabled: if (value==0) f->disable(); else f->enable(); return 0; case GWEN_DialogProperty_Focus: f->setFocus(); return 0; case GWEN_DialogProperty_Visibility: if (value==0) { f->hide(); f->recalc(); } else { f->show(); f->recalc(); } return 0; case GWEN_DialogProperty_Title: case GWEN_DialogProperty_Value: case GWEN_DialogProperty_MinValue: case GWEN_DialogProperty_MaxValue: case GWEN_DialogProperty_AddValue: case GWEN_DialogProperty_ClearValues: case GWEN_DialogProperty_ValueCount: case GWEN_DialogProperty_ColumnWidth: case GWEN_DialogProperty_SelectionMode: case GWEN_DialogProperty_SelectionState: case GWEN_DialogProperty_SortDirection: case GWEN_DialogProperty_Sort: case GWEN_DialogProperty_ToolTip: case GWEN_DialogProperty_WindowId: case GWEN_DialogProperty_None: case GWEN_DialogProperty_Unknown: ; } } DBG_WARN(0, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } int FOX16_GuiDialog::getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: return defaultValue; case GWEN_Widget_TypeComboBox: { THEMECOMBOBOX *f; f=(THEMECOMBOBOX*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return f->getCurrentItem(); case GWEN_DialogProperty_ValueCount: return f->getNumItems(); default: break; } break; } case GWEN_Widget_TypeRadioButton: { FXRadioButton *f; f=(FXRadioButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return (f->getCheck()==TRUE)?1:0; default: break; } break; } case GWEN_Widget_TypeProgressBar: { FXProgressBar *f; f=(FXProgressBar*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return f->getProgress(); case GWEN_DialogProperty_MinValue: return 0; case GWEN_DialogProperty_MaxValue: return f->getTotal(); default: break; } break; } case GWEN_Widget_TypeSpinBox: { FXSpinner *f; f=(FXSpinner*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return f->getValue(); case GWEN_DialogProperty_MinValue: { FXint lo, hi; f->getRange(lo, hi); return lo; } case GWEN_DialogProperty_MaxValue: { FXint lo, hi; f->getRange(lo, hi); return hi; } default: break; } break; } case GWEN_Widget_TypeListBox: { FOX16_GuiSortingList *f; FXFoldingItem *fi; int i=0; f=(FOX16_GuiSortingList*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: fi=f->getCurrentItem(); if (fi==NULL) return defaultValue; else { FXFoldingItem *ti; ti=fi; while( (ti=ti->getPrev()) ) i++; return i; } case GWEN_DialogProperty_ValueCount: return f->getNumItems(); case GWEN_DialogProperty_ColumnWidth: return f->getHeaderSize(index); case GWEN_DialogProperty_SelectionMode: { switch(f->getListStyle()) { case FOLDINGLIST_BROWSESELECT: return GWEN_Dialog_SelectionMode_Single; case FOLDINGLIST_EXTENDEDSELECT: return GWEN_Dialog_SelectionMode_Multi; default: return GWEN_Dialog_SelectionMode_None; } break; } case GWEN_DialogProperty_SelectionState: { FXFoldingItem *ti; int i=index; ti=f->getFirstItem(); while(ti && i) { ti=ti->getNext(); i--; } if (ti) return (ti->isSelected()==TRUE)?1:0; return defaultValue; } case GWEN_DialogProperty_SortDirection: { int i; for (i=0; igetNumHeaders(); i++) { if (i==index) { FXbool b; b=f->getHeaderArrowDir(i); if (b==MAYBE) return GWEN_DialogSortDirection_None; else if (b==TRUE) return GWEN_DialogSortDirection_Up; else return GWEN_DialogSortDirection_Down; } } DBG_ERROR(GWEN_LOGDOMAIN, "Column %d out of range", index); } return defaultValue; default: break; } break; } case GWEN_Widget_TypeCheckBox: { FXCheckButton *f; f=(FXCheckButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return (f->getCheck()==TRUE)?1:0; default: break; } break; } case GWEN_Widget_TypeTabBook: { FXTabBook *f; f=(FXTabBook*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return f->getCurrent(); default: break; } break; } case GWEN_Widget_TypeWidgetStack: { FXSwitcher *f; f=(FXSwitcher*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: return f->getCurrent(); default: break; } break; } case GWEN_Widget_TypeLabel: case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: break; } /* generic properties every widget has */ { FXWindow *f; f=(FXWindow*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Width: return f->getWidth(); case GWEN_DialogProperty_Height: return f->getHeight(); case GWEN_DialogProperty_Enabled: return (f->isEnabled()==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (f->hasFocus())?1:0; case GWEN_DialogProperty_WindowId: return f->id(); case GWEN_DialogProperty_Title: case GWEN_DialogProperty_Value: case GWEN_DialogProperty_MinValue: case GWEN_DialogProperty_MaxValue: case GWEN_DialogProperty_AddValue: case GWEN_DialogProperty_ClearValues: case GWEN_DialogProperty_ValueCount: case GWEN_DialogProperty_ColumnWidth: case GWEN_DialogProperty_SelectionMode: case GWEN_DialogProperty_SelectionState: case GWEN_DialogProperty_SortDirection: case GWEN_DialogProperty_Sort: case GWEN_DialogProperty_Visibility: case GWEN_DialogProperty_ToolTip: case GWEN_DialogProperty_None: case GWEN_DialogProperty_Unknown: ; } } DBG_WARN(0, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int FOX16_GuiDialog::setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { FXString strValue; FXString htmlValue; if (value && *value) { strValue=FOX16_Gui::getRawText(value); htmlValue=FOX16_Gui::getHtmlText(value); } switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeNone: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeLabel: { FOX16_HtmlLabel *f; f=(FOX16_HtmlLabel*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->setText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeTextBrowser: { FOX16_HtmlText *f; f=(FOX16_HtmlText*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setText(htmlValue); f->makePositionVisible(strValue.length()); return 0; case GWEN_DialogProperty_AddValue: f->setText(f->getText()+htmlValue); return 0; case GWEN_DialogProperty_ClearValues: f->setText(""); return 0; default: break; } break; } case GWEN_Widget_TypePushButton: { THEMEBUTTON *f; f=(THEMEBUTTON*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->setText(value); return 0; case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeLineEdit: { FXTextField *f; f=(FXTextField*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setText(value, doSignal?TRUE:FALSE); return 0; case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeTextEdit: { FXText *f; f=(FXText*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: f->setText(strValue); return 0; case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeComboBox: { THEMECOMBOBOX *f; f=(THEMECOMBOBOX*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: // undefined break; case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; case GWEN_DialogProperty_AddValue: { int i; f->appendItem(strValue); i=f->getNumItems(); if (i>10) i=10; f->setNumVisible(i); return 0; } case GWEN_DialogProperty_ClearValues: f->clearItems(); return 0; default: break; } break; } case GWEN_Widget_TypeGroupBox: { FXGroupBox *f; f=(FXGroupBox*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->setText(strValue); return 0; default: break; } break; } case GWEN_Widget_TypeRadioButton: { FXRadioButton *f; f=(FXRadioButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->setText(strValue); return 0; case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeCheckBox: { FXCheckButton *f; f=(FXCheckButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->setText(strValue); return 0; case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeTabPage: { FXWindow *f1; THEMETABITEM *f2; f1=(FXWindow*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f1); f2=(THEMETABITEM*) (f1->getPrev()); assert(f2); switch(prop) { case GWEN_DialogProperty_Title: f2->setText(strValue); return 0; case GWEN_DialogProperty_ToolTip: f2->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeDialog: { FXDialogBox *f; f=(FXDialogBox*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->setTitle(strValue); return 0; default: break; } break; } case GWEN_Widget_TypeListBox: { FXFoldingList *f; FXString str; FXString t; FXint n=0; f=(FXFoldingList*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: f->getHeader()->clearItems(); str=strValue; while(!(t=str.section('\t',n)).empty()) { f->appendHeader(t, NULL, 20); n++; } return 0; case GWEN_DialogProperty_AddValue: f->appendItem(NULL, strValue); return 0; case GWEN_DialogProperty_ClearValues: f->clearItems(); return 0; default: break; } break; } case GWEN_Widget_TypeSpinBox: { FXSpinner *f; f=(FXSpinner*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_ToolTip: f->setTipText(htmlValue); return 0; default: break; } break; } case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: ; } /* this block is just to make sure we get warnings when new * properties are available but not handled here */ switch(prop) { case GWEN_DialogProperty_Title: case GWEN_DialogProperty_Value: case GWEN_DialogProperty_MinValue: case GWEN_DialogProperty_MaxValue: case GWEN_DialogProperty_Enabled: case GWEN_DialogProperty_AddValue: case GWEN_DialogProperty_ClearValues: case GWEN_DialogProperty_ValueCount: case GWEN_DialogProperty_ColumnWidth: case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: case GWEN_DialogProperty_SelectionMode: case GWEN_DialogProperty_SelectionState: case GWEN_DialogProperty_Focus: case GWEN_DialogProperty_SortDirection: case GWEN_DialogProperty_Sort: case GWEN_DialogProperty_Visibility: case GWEN_DialogProperty_ToolTip: case GWEN_DialogProperty_WindowId: case GWEN_DialogProperty_None: case GWEN_DialogProperty_Unknown: break; } DBG_WARN(0, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } const char *FOX16_GuiDialog::getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { FXString str; switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: return defaultValue; case GWEN_Widget_TypeNone: return defaultValue; case GWEN_Widget_TypeLabel: { FOX16_HtmlLabel *f; f=(FOX16_HtmlLabel*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypePushButton: { THEMEBUTTON *f; f=(THEMEBUTTON*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypeLineEdit: { FXTextField *f; f=(FXTextField*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_VALUE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_VALUE); } default: break; } break; } case GWEN_Widget_TypeTextEdit: { FXText *f; f=(FXText*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_VALUE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_VALUE); } default: break; } break; } case GWEN_Widget_TypeTextBrowser: { FOX16_HtmlText *f; f=(FOX16_HtmlText*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_VALUE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_VALUE); } default: break; } break; } case GWEN_Widget_TypeComboBox: { THEMECOMBOBOX *f; f=(THEMECOMBOBOX*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Value: if (indexgetNumItems()) { str=f->getItem(index); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_VALUE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_VALUE); } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Index %d out of range", index); return defaultValue; } default: break; } break; } case GWEN_Widget_TypeGroupBox: { FXGroupBox *f; f=(FXGroupBox*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypeRadioButton: { FXRadioButton *f; f=(FXRadioButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypeCheckBox: { FXCheckButton *f; f=(FXCheckButton*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: str=f->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypeTabPage: { FXWindow *f1; THEMETABITEM *f2; f1=(FXWindow*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f1); f2=(THEMETABITEM*) (f1->getPrev()); assert(f2); switch(prop) { case GWEN_DialogProperty_Title: str=f2->getText(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypeDialog: { FXDialogBox *f; f=(FXDialogBox*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: str=f->getTitle(); if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } default: break; } break; } case GWEN_Widget_TypeListBox: { FXFoldingList *f; FXHeader *fh; FXFoldingItem *fi; f=(FXFoldingList*)GWEN_Widget_GetImplData(w, FOX16_DIALOG_WIDGET_REAL); assert(f); switch(prop) { case GWEN_DialogProperty_Title: fh=f->getHeader(); if (fh) { int i; for (i=0; igetNumItems(); i++) { if (!str.empty()) str+="\t"; str+=fh->getItemText(i); } } if (str.empty()) return defaultValue; else { GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_TITLE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_TITLE); } case GWEN_DialogProperty_Value: fi=f->getFirstItem(); if (fi) { int i=index; while(fi && i>0) { fi=fi->getNext(); i--; } if (fi) { str=fi->getText(); if (str.empty()) return defaultValue; GWEN_Widget_SetText(w, FOX16_DIALOG_STRING_VALUE, str.text()); return GWEN_Widget_GetText(w, FOX16_DIALOG_STRING_VALUE); } else { DBG_ERROR(GWEN_LOGDOMAIN, "Index %d out of range", index); return defaultValue; } } else { DBG_ERROR(GWEN_LOGDOMAIN, "Empty list"); return defaultValue; } default: break; } break; } case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeSpinBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: break; } /* this block is just to make sure we get warnings when new * properties are available but not handled here */ switch(prop) { case GWEN_DialogProperty_Title: case GWEN_DialogProperty_Value: case GWEN_DialogProperty_MinValue: case GWEN_DialogProperty_MaxValue: case GWEN_DialogProperty_Enabled: case GWEN_DialogProperty_AddValue: case GWEN_DialogProperty_ClearValues: case GWEN_DialogProperty_ValueCount: case GWEN_DialogProperty_ColumnWidth: case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: case GWEN_DialogProperty_SelectionMode: case GWEN_DialogProperty_SelectionState: case GWEN_DialogProperty_Focus: case GWEN_DialogProperty_SortDirection: case GWEN_DialogProperty_Sort: case GWEN_DialogProperty_Visibility: case GWEN_DialogProperty_ToolTip: case GWEN_DialogProperty_WindowId: case GWEN_DialogProperty_None: case GWEN_DialogProperty_Unknown: break; } DBG_WARN(0, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } long FOX16_GuiDialog::onSelCommand(FXObject *sender, FXSelector sel, void *ptr) { GWEN_WIDGET *w; const char *wname; int rv=GWEN_DialogEvent_ResultNotHandled; FXDialogBox *dialogBox; w=GWEN_Dialog_FindWidgetByImplData(_dialog, FOX16_DIALOG_WIDGET_REAL, sender); if (w==NULL) { if (!m_radioGroups.empty()) { std::list::iterator it; RadioButtonGroup *grp=NULL; for (it=m_radioGroups.begin(); it!=m_radioGroups.end(); it++) { if ((*it)->getDataTarget()==sender) { grp=*it; break; } } if (grp==NULL) { DBG_WARN(GWEN_LOGDOMAIN, "Widget or RadioButtonGroup not found"); return 0; } else { DBG_INFO(0, "Found button group %d: %d", grp->getGroupId(), grp->getRadioValue()); // no signal for now return 1; } } } wname=GWEN_Widget_GetName(w); dialogBox=_mainWidget; DBG_DEBUG(GWEN_LOGDOMAIN, "Command for [%s] (type: %s)", wname?wname:"(unnamed)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeNone: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeLabel: case GWEN_Widget_TypeTextEdit: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeSpinBox: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeRadioButton: /* use SEL_UPDATED for FXRadioButton */ case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: /* nothing to do for these types */ ; } if (rv==GWEN_DialogEvent_ResultAccept) { dialogBox->getApp()->stopModal(dialogBox, 1); } else if (rv==GWEN_DialogEvent_ResultReject) { dialogBox->getApp()->stopModal(dialogBox, 0); } return 1; } long FOX16_GuiDialog::onSelChanged(FXObject *sender, FXSelector sel, void *ptr) { GWEN_WIDGET *w; int rv=GWEN_DialogEvent_ResultNotHandled; FXDialogBox *dialogBox; w=GWEN_Dialog_FindWidgetByImplData(_dialog, FOX16_DIALOG_WIDGET_REAL, sender); if (w==NULL) { DBG_INFO(0, "Widget not found"); return 0; } dialogBox=_mainWidget; switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeNone: return GWEN_ERROR_GENERIC; case GWEN_Widget_TypeSpinBox: case GWEN_Widget_TypeLineEdit: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeLabel: case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: ; } if (rv==GWEN_DialogEvent_ResultAccept) { GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); dialogBox->getApp()->stopModal(dialogBox, 1); } else if (rv==GWEN_DialogEvent_ResultReject) { GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); dialogBox->getApp()->stopModal(dialogBox, 0); } return 1; } long FOX16_GuiDialog::onSelKeyPress(FXObject *sender, FXSelector sel, void *ptr) { GWEN_WIDGET *w; FXEvent* event=(FXEvent*)ptr; int rv; w=GWEN_Dialog_FindWidgetByImplData(_dialog, FOX16_DIALOG_WIDGET_REAL, sender); if (w==NULL) { DBG_INFO(0, "Widget not found"); return 0; } switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: return 0; case GWEN_Widget_TypeDialog: /* catch ENTER key */ if (event->code==KEY_Return || event->code==KEY_KP_Enter) { return 1; } return 0; case GWEN_Widget_TypeLabel: case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeSpinBox: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: rv=GWEN_Dialog_EmitSignalToAll2(_dialog, GWEN_DialogEvent_TypeKeyPressed, "", event->code, NULL); if (rv!=GWEN_DialogEvent_ResultNotHandled) return 1; } return 0; } long FOX16_GuiDialog::onSelKeyRelease(FXObject *sender, FXSelector sel, void *ptr) { GWEN_WIDGET *w; FXEvent* event=(FXEvent*)ptr; int rv; w=GWEN_Dialog_FindWidgetByImplData(_dialog, FOX16_DIALOG_WIDGET_REAL, sender); if (w==NULL) { DBG_INFO(0, "Widget not found"); return 0; } switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: /* catch ENTER key */ if (event->code==KEY_Return || event->code==KEY_KP_Enter) { return 1; } return 0; case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: case GWEN_Widget_TypeLabel: case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeSpinBox: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: rv=GWEN_Dialog_EmitSignalToAll2(_dialog, GWEN_DialogEvent_TypeKeyReleased, "", event->code, NULL); if (rv!=GWEN_DialogEvent_ResultNotHandled) return 1; } return 0; } bool FOX16_GuiDialog::setup(FXWindow *parentWindow) { FXWindow *xw; GWEN_WIDGET_TREE *wtree; GWEN_WIDGET *w; int rv; wtree=GWEN_Dialog_GetWidgets(_dialog); if (wtree==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget tree in dialog"); return false; } w=GWEN_Widget_Tree_GetFirst(wtree); if (w==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widgets in dialog"); return false; } xw=setupTree(parentWindow, w); if (xw==NULL) { DBG_INFO(0, "here"); return false; } _mainWidget=dynamic_cast(xw); assert(_mainWidget); /* create X11 server side resources */ xw->create(); m_sizeChanged=FALSE; rv=GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeInit, ""); if (rv<0) { DBG_INFO(0, "Error initializing dialog: %d", rv); return false; } if (!m_sizeChanged) { DBG_ERROR(0, "Resizing dialog myself"); xw->resize(xw->getDefaultWidth(), xw->getDefaultHeight()); } xw->layout(); return true; } FXWindow *FOX16_GuiDialog::setupTree(FXWindow *parentWindow, GWEN_WIDGET *w) { const char *s; const char *name; FXuint opts=0; uint32_t flags; FXString text; FXString htmlText; FXComposite *parentComposite=NULL; FXWindow *wChild=NULL; FXWindow *wContent=NULL; GWEN_WIDGET *parentWidget; int cols; int rows; /* sample data */ flags=GWEN_Widget_GetFlags(w); s=GWEN_Widget_GetText(w, 0); if (s) { text=FXString(s); htmlText=FOX16_Gui::getHtmlText(s); } name=GWEN_Widget_GetName(w); cols=GWEN_Widget_GetColumns(w); rows=GWEN_Widget_GetRows(w); parentWidget=GWEN_Widget_Tree_GetParent(w); /* check for parent type */ if (parentWindow) parentComposite=dynamic_cast(parentWindow); if (parentComposite==NULL) { switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: /* these types don't need the parent to be a FXComposite */ break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Parent of widget [%s] (type %d) is not a composite", name?name:"(unnamed)", GWEN_Widget_GetType(w)); return NULL; } } /* setup info for new widget */ if (flags & GWEN_WIDGET_FLAGS_FILLX) opts|=LAYOUT_FILL_X | LAYOUT_FILL_COLUMN; if (flags & GWEN_WIDGET_FLAGS_FILLY) opts|=LAYOUT_FILL_Y; if (flags & GWEN_WIDGET_FLAGS_DECOR_SHRINKABLE) opts|=DECOR_SHRINKABLE; if (flags & GWEN_WIDGET_FLAGS_DECOR_STRETCHABLE) opts|=DECOR_STRETCHABLE; if (flags & GWEN_WIDGET_FLAGS_DECOR_MINIMIZE) opts|=DECOR_MINIMIZE; if (flags & GWEN_WIDGET_FLAGS_DECOR_MAXIMIZE) opts|=DECOR_MAXIMIZE; if (flags & GWEN_WIDGET_FLAGS_DECOR_CLOSE) opts|=DECOR_CLOSE; if (flags & GWEN_WIDGET_FLAGS_DECOR_MENU) opts|=DECOR_MENU; if (flags & GWEN_WIDGET_FLAGS_EQUAL_WIDTH) opts|=PACK_UNIFORM_WIDTH; if (flags & GWEN_WIDGET_FLAGS_EQUAL_HEIGHT) opts|=PACK_UNIFORM_HEIGHT; if (flags & GWEN_WIDGET_FLAGS_JUSTIFY_LEFT) opts|=JUSTIFY_LEFT; if (flags & GWEN_WIDGET_FLAGS_JUSTIFY_RIGHT) opts|=JUSTIFY_RIGHT; if (flags & GWEN_WIDGET_FLAGS_JUSTIFY_TOP) opts|=JUSTIFY_TOP; if (flags & GWEN_WIDGET_FLAGS_JUSTIFY_BOTTOM) opts|=JUSTIFY_BOTTOM; if (flags & GWEN_WIDGET_FLAGS_JUSTIFY_CENTERX) opts|=JUSTIFY_CENTER_X; if (flags & GWEN_WIDGET_FLAGS_JUSTIFY_CENTERY) opts|=JUSTIFY_CENTER_Y; if (flags & GWEN_WIDGET_FLAGS_FRAME_SUNKEN) opts|=FRAME_SUNKEN; if (flags & GWEN_WIDGET_FLAGS_FRAME_RAISED) opts|=FRAME_RAISED; if (flags & GWEN_WIDGET_FLAGS_FRAME_THICK) opts|=FRAME_THICK; if (flags & GWEN_WIDGET_FLAGS_FRAME_GROOVE) opts|=FRAME_GROOVE; /* create THIS widget */ switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeLabel: { FOX16_HtmlLabel *label; int wi; const char *s; GWEN_STRINGLISTENTRY *se; if (flags & GWEN_WIDGET_FLAGS_NO_WORDWRAP) opts|=FOX16_HtmlLabel::FLAGS_NO_WORDWRAP; label=new FOX16_HtmlLabel(parentComposite, htmlText, opts); s=GWEN_Widget_GetIconFileName(w); if (s && *s) { FXIcon *ic; ic=getIcon(s); if (ic) label->setIcon(ic); } wi=GWEN_Widget_GetWidth(w); if (wi>0) label->setMaxDefaultWidth(wi); /* copy media paths to label */ se=GWEN_StringList_FirstEntry(GWEN_Dialog_GetMediaPaths(_dialog)); while(se) { const char *s; s=GWEN_StringListEntry_Data(se); assert(s); label->addMediaPath(s); se=GWEN_StringListEntry_Next(se); } wChild=label; break; } case GWEN_Widget_TypePushButton: { const char *s; FXIcon *ic=NULL; if (flags & GWEN_WIDGET_FLAGS_DEFAULT_WIDGET) opts|=BUTTON_DEFAULT | BUTTON_INITIAL | BUTTON_NORMAL; else opts|=BUTTON_NORMAL; s=GWEN_Widget_GetIconFileName(w); if (s && *s) ic=getIcon(s); wChild=new THEMEBUTTON(parentComposite, text, ic, /* icon */ this, ID_WIDGET_FIRST+_widgetCount, opts); break; } case GWEN_Widget_TypeLineEdit: if (flags & GWEN_WIDGET_FLAGS_PASSWORD) opts|=TEXTFIELD_PASSWD; if (flags & GWEN_WIDGET_FLAGS_READONLY) opts|=TEXTFIELD_READONLY; wChild=new FXTextField(parentComposite, cols?cols:16, this, ID_WIDGET_FIRST+_widgetCount, opts | TEXTFIELD_NORMAL | TEXTFIELD_ENTER_ONLY); break; case GWEN_Widget_TypeTextEdit: { FXText *f; if (flags & GWEN_WIDGET_FLAGS_READONLY) opts|=TEXT_READONLY; f=new FXText(parentComposite, this, ID_WIDGET_FIRST+_widgetCount, opts | HSCROLLING_OFF); if (cols) f->setVisibleColumns(cols); if (rows) f->setVisibleRows(rows); wChild=f; break; } case GWEN_Widget_TypeTextBrowser: { FOX16_HtmlText *f; f=new FOX16_HtmlText(parentComposite, "", opts | HSCROLLING_OFF); wChild=f; break; } case GWEN_Widget_TypeComboBox: if (flags & GWEN_WIDGET_FLAGS_READONLY) opts|=COMBOBOX_STATIC; wChild=new THEMECOMBOBOX(parentComposite, cols?cols:16, this, ID_WIDGET_FIRST+_widgetCount, opts); break; case GWEN_Widget_TypeRadioButton: { FXRadioButton *rb; int groupId; RadioButtonGroup *grp=NULL; std::list::iterator it; groupId=GWEN_Widget_GetGroupId(w); for (it=m_radioGroups.begin(); it!=m_radioGroups.end(); it++) { if ((*it)->getGroupId()==groupId) { grp=*it; } } if (grp==NULL) { grp=new RadioButtonGroup(groupId, this, ID_WIDGET_FIRST+_widgetCount); m_radioGroups.push_back(grp); } rb=new FXRadioButton(parentComposite, text, grp->getDataTarget(), FXDataTarget::ID_OPTION+grp->getButtonCount(), opts | RADIOBUTTON_NORMAL); grp->addButton(rb); wChild=rb; break; } case GWEN_Widget_TypeProgressBar: wChild=new FXProgressBar(parentComposite, this, ID_WIDGET_FIRST+_widgetCount, opts | PROGRESSBAR_NORMAL | PROGRESSBAR_PERCENTAGE); break; case GWEN_Widget_TypeGroupBox: wChild=new FXGroupBox(parentComposite, text, opts | GROUPBOX_NORMAL | FRAME_LINE); break; case GWEN_Widget_TypeHSpacer: wChild=new FXSpring(parentComposite, opts | LAYOUT_FILL_X); break; case GWEN_Widget_TypeVSpacer: wChild=new FXSpring(parentComposite, opts | LAYOUT_FILL_Y); break; case GWEN_Widget_TypeHLayout: wChild=new FXHorizontalFrame(parentComposite, opts, 0, 0, 0, 0, 0, 0, 0, 0); break; case GWEN_Widget_TypeVLayout: wChild=new FXVerticalFrame(parentComposite, opts, 0, 0, 0, 0, 0, 0, 0, 0); break; case GWEN_Widget_TypeGridLayout: if (cols & rows) { DBG_ERROR(GWEN_LOGDOMAIN, "State columns *or* rows, not both in widget [%s]", name?name:"(unnamed)"); return NULL; } if (cols) wChild=new FXMatrix(parentComposite, cols, opts | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 0, 0, 0, 0); else wChild=new FXMatrix(parentComposite, rows, opts | MATRIX_BY_ROWS, 0, 0, 0, 0, 0, 0, 0, 0); break; case GWEN_Widget_TypeListBox: wChild=new FOX16_GuiSortingList(parentComposite, this, ID_WIDGET_FIRST+_widgetCount, opts | FRAME_SUNKEN|FRAME_THICK | LISTBOX_NORMAL); break; case GWEN_Widget_TypeDialog: if (parentWindow) wChild=new FXDialogBox(parentWindow, name?FXString(name):FXString(""), opts | DECOR_TITLE | DECOR_BORDER); else wChild=new FXDialogBox(FXApp::instance(), name?FXString(name):FXString(""), opts | DECOR_TITLE | DECOR_BORDER); break; case GWEN_Widget_TypeTabBook: wChild=new FXTabBook(parentComposite, this, ID_WIDGET_FIRST+_widgetCount, opts | TABBOOK_NORMAL); break; case GWEN_Widget_TypeTabPage: if (parentWidget==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Widget [%s] has no parent", name?name:"(unnamed)"); return NULL; } else { FXTabBook *tbook=dynamic_cast(parentWindow); if (tbook==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Parent of widget [%s] needs to be of type TabBook", name?name:"(unnamed)"); return NULL; } new THEMETABITEM(tbook, text, NULL, opts | TAB_TOP_NORMAL); wChild=new FXVerticalFrame(tbook, opts); } break; case GWEN_Widget_TypeCheckBox: wChild=new FXCheckButton(parentComposite, text, this, ID_WIDGET_FIRST+_widgetCount, opts | CHECKBUTTON_NORMAL); break; case GWEN_Widget_TypeScrollArea: { FXScrollWindow *f; f=new FXScrollWindow(parentComposite, opts); wChild=f; wContent=f->contentWindow(); break; } case GWEN_Widget_TypeWidgetStack: wChild=new FXSwitcher(parentComposite, opts); break; case GWEN_Widget_TypeHLine: wChild=new FXHorizontalSeparator(parentComposite, opts | SEPARATOR_GROOVE); break; case GWEN_Widget_TypeVLine: wChild=new FXVerticalSeparator(parentComposite, opts | SEPARATOR_GROOVE); break; case GWEN_Widget_TypeSpinBox: wChild=new FXSpinner(parentComposite, cols?cols:16, this, ID_WIDGET_FIRST+_widgetCount, opts | SPIN_NORMAL); break; case GWEN_Widget_TypeUnknown: DBG_ERROR(GWEN_LOGDOMAIN, "Widget [%s] is of type \'unknown\'", name?name:"(unnamed)"); return NULL; case GWEN_Widget_TypeNone: DBG_ERROR(GWEN_LOGDOMAIN, "Widget [%s] is of type \'none\'", name?name:"(unnamed)"); return NULL; } assert(wChild); _widgetCount++; if (wContent==NULL) wContent=wChild; GWEN_Widget_SetImplData(w, FOX16_DIALOG_WIDGET_REAL, (void*) wChild); GWEN_Widget_SetImplData(w, FOX16_DIALOG_WIDGET_CONTENT, (void*) wContent); /* handle children */ w=GWEN_Widget_Tree_GetFirstChild(w); while(w) { if (NULL==setupTree(wContent, w)) return NULL; w=GWEN_Widget_Tree_GetNext(w); } return wChild; } int FOX16_GuiDialog::cont() { FXDialogBox *dialogBox; dialogBox=_mainWidget; return dialogBox->getApp()->runModalFor(dialogBox); } int FOX16_GuiDialog::openDialog() { FXDialogBox *dialogBox; dialogBox=_mainWidget; /* show dialog */ dialogBox->layout(); dialogBox->show(PLACEMENT_OWNER); return 0; } int FOX16_GuiDialog::closeDialog() { FXDialogBox *dialogBox; dialogBox=_mainWidget; /* let dialog write its settings */ GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); /* hide dialog */ dialogBox->hide(); delete _mainWidget; _mainWidget=NULL; return 0; } gwenhywfar-5.12.1/gui/fox16/fox16_gui_sortinglist.cpp0000644000175000017500000001512414154415152017412 00000000000000/*************************************************************************** begin : Fri Jan 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_gui_sortinglist_l.hpp" #include FXDEFMAP(FOX16_GuiSortingList) FOX16_GuiSortingListMap[]= { FXMAPFUNC(SEL_COMMAND, FXFoldingList::ID_HEADER_CHANGE, FOX16_GuiSortingList::onHeaderClicked) }; FXIMPLEMENT(FOX16_GuiSortingList, FXFoldingList, FOX16_GuiSortingListMap, ARRAYNUMBER(FOX16_GuiSortingListMap)) FOX16_GuiSortingList::FOX16_GuiSortingList(FXComposite *p, FXObject* tgt, FXSelector sel, FXuint opts, FXint x, FXint y, FXint w, FXint h) :FXFoldingList(p, tgt, sel, opts, x, y, w, h) { } FOX16_GuiSortingList::FOX16_GuiSortingList() :FXFoldingList() { } FOX16_GuiSortingList::~FOX16_GuiSortingList() { } FXFoldingItem *FOX16_GuiSortingList::getItem(int index) { FXFoldingItem *ti; int i=index; ti=getFirstItem(); while(ti && i) { ti=ti->getNext(); i--; } return ti; } FXbool FOX16_GuiSortingList::getHeaderArrowDir(int c) const { return header->getArrowDir(c); } void FOX16_GuiSortingList::setHeaderArrowDir(int c, FXbool b) { header->setArrowDir(c, b); } long FOX16_GuiSortingList::onHeaderClicked(FXObject*, FXSelector, void* ptr) { FXint idx=(FXint)(FXival)ptr; FXbool b; int i; b=header->getArrowDir(idx); for (i=0; igetNumItems(); i++) header->setArrowDir(i, MAYBE); if (b==TRUE) { /* was up, becomes down */ header->setArrowDir(idx, FALSE); sortByColumn(idx, false); } else if (b==FALSE) { /* was down, becomes MAYBE */ header->setArrowDir(idx, MAYBE); } else { /* was MAYBE, becomes up */ header->setArrowDir(idx, TRUE); sortByColumn(idx, true); } return 1; } void FOX16_GuiSortingList::sortByColumn(int c, bool up) { switch(c) { case 0: if (up) setSortFunc(sortFuncCol0a); else setSortFunc(sortFuncCol0d); break; case 1: if (up) setSortFunc(sortFuncCol1a); else setSortFunc(sortFuncCol1d); break; case 2: if (up) setSortFunc(sortFuncCol2a); else setSortFunc(sortFuncCol2d); break; case 3: if (up) setSortFunc(sortFuncCol3a); else setSortFunc(sortFuncCol3d); break; case 4: if (up) setSortFunc(sortFuncCol4a); else setSortFunc(sortFuncCol4d); break; case 5: if (up) setSortFunc(sortFuncCol5a); else setSortFunc(sortFuncCol5d); break; case 6: if (up) setSortFunc(sortFuncCol6a); else setSortFunc(sortFuncCol6d); break; case 7: if (up) setSortFunc(sortFuncCol7a); else setSortFunc(sortFuncCol7d); break; case 8: if (up) setSortFunc(sortFuncCol8a); else setSortFunc(sortFuncCol8d); break; case 9: if (up) setSortFunc(sortFuncCol9a); else setSortFunc(sortFuncCol9d); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Column %d is out of range (no more functions)", c); return; } sortItems(); } FXint FOX16_GuiSortingList::sortFuncCol0a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 0); } FXint FOX16_GuiSortingList::sortFuncCol0d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 0); } FXint FOX16_GuiSortingList::sortFuncCol1a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 1); } FXint FOX16_GuiSortingList::sortFuncCol1d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 1); } FXint FOX16_GuiSortingList::sortFuncCol2a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 2); } FXint FOX16_GuiSortingList::sortFuncCol2d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 2); } FXint FOX16_GuiSortingList::sortFuncCol3a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 3); } FXint FOX16_GuiSortingList::sortFuncCol3d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 3); } FXint FOX16_GuiSortingList::sortFuncCol4a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 4); } FXint FOX16_GuiSortingList::sortFuncCol4d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 4); } FXint FOX16_GuiSortingList::sortFuncCol5a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 5); } FXint FOX16_GuiSortingList::sortFuncCol5d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 5); } FXint FOX16_GuiSortingList::sortFuncCol6a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 6); } FXint FOX16_GuiSortingList::sortFuncCol6d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 6); } FXint FOX16_GuiSortingList::sortFuncCol7a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 7); } FXint FOX16_GuiSortingList::sortFuncCol7d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 7); } FXint FOX16_GuiSortingList::sortFuncCol8a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 8); } FXint FOX16_GuiSortingList::sortFuncCol8d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 8); } FXint FOX16_GuiSortingList::sortFuncCol9a(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(a->getText().text(),b->getText().text(), 9); } FXint FOX16_GuiSortingList::sortFuncCol9d(const FXFoldingItem *a, const FXFoldingItem *b) { return compareSectionCase(b->getText().text(),a->getText().text(), 9); } gwenhywfar-5.12.1/gui/fox16/fox16_htmltext.cpp0000644000175000017500000001231513142134462016033 00000000000000/*************************************************************************** begin : Tue Feb 23 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_htmltext.hpp" #include "fox16_htmlctx.hpp" #include #include #include #define MAX_DEFAULT_WIDTH 400 #define BORDER 2 FXDEFMAP(FOX16_HtmlText) FOX16_HtmlTextMap[]= { FXMAPFUNC(SEL_PAINT,0,FOX16_HtmlText::onPaint), }; // Object implementation FXIMPLEMENT(FOX16_HtmlText, FXScrollArea, FOX16_HtmlTextMap, ARRAYNUMBER(FOX16_HtmlTextMap)) FOX16_HtmlText::FOX16_HtmlText(FXComposite* p, const FXString& text, FXuint opts, FXint x, FXint y, FXint w, FXint h) :FXScrollArea(p, opts, x, y, w, h) ,m_htmlCtx(NULL) ,m_minWidth(0) ,m_maxDefaultWidth(MAX_DEFAULT_WIDTH) ,m_haveDefaultDims(false) ,margintop(BORDER) ,marginbottom(BORDER) ,marginleft(BORDER) ,marginright(BORDER) ,barwidth(8) { setText(text); flags|=FLAG_ENABLED; } FOX16_HtmlText::FOX16_HtmlText() :FXScrollArea() ,m_htmlCtx(NULL) ,m_minWidth(0) { flags|=FLAG_ENABLED; } FOX16_HtmlText::~FOX16_HtmlText() { if (m_htmlCtx) delete m_htmlCtx; } void FOX16_HtmlText::setText(const FXString& text) { m_haveDefaultDims=false; m_text=text; updateHtml(); flags|=FLAG_DIRTY; layout(); recalc(); update(); } void FOX16_HtmlText::calcDefaultDims() { int w; int wNeeded; m_htmlCtx->layout(-1, -1); wNeeded=m_htmlCtx->getWidth(); w=wNeeded; if (w>m_maxDefaultWidth) w=m_maxDefaultWidth; if (wlayout(w-BORDER*2, -1); //} m_defaultWidth=m_htmlCtx->getWidth(); m_defaultHeight=m_htmlCtx->getHeight(); m_haveDefaultDims=true; } FXint FOX16_HtmlText::getContentWidth() { if (m_htmlCtx==NULL) updateHtml(); if (!m_haveDefaultDims) calcDefaultDims(); m_htmlCtx->layout(viewport_w-(marginleft+marginright+barwidth), -1); return m_htmlCtx->getWidth(); } FXint FOX16_HtmlText::getContentHeight() { if (m_htmlCtx==NULL) updateHtml(); if (!m_haveDefaultDims) calcDefaultDims(); return m_htmlCtx->getHeight(); } long FOX16_HtmlText::onPaint(FXObject*, FXSelector, void *ptr) { FXEvent* event=(FXEvent*)ptr; FXDCWindow dc(this,event); //dc.setFont(font); //dc.setForeground(FXRGB(255,0,0)); //dc.fillRectangle(event->rect.x,event->rect.y,event->rect.w,event->rect.h); dc.setForeground(backColor); dc.fillRectangle(event->rect.x, event->rect.y, event->rect.w, event->rect.h); // Paint top margin if (event->rect.y<=margintop) { dc.setForeground(backColor); dc.fillRectangle(0, 0, viewport_w, margintop); } // Paint bottom margin if (event->rect.y+event->rect.h>=viewport_h-marginbottom) { dc.setForeground(backColor); dc.fillRectangle(0, viewport_h-marginbottom, viewport_w, marginbottom); } // Paint left margin if(event->rect.xrect.x+event->rect.w>=viewport_w-marginright) { dc.setForeground(backColor); dc.fillRectangle(viewport_w-marginright, margintop, marginright, viewport_h-margintop-marginbottom); } // Paint text //dc.setClipRectangle(marginleft, margintop, viewport_w-marginright-marginleft, viewport_h-margintop-marginbottom); //drawContents(dc, event->rect.x, event->rect.y, event->rect.w, event->rect.h); if (m_htmlCtx) { #if 0 /* this doesn work */ m_htmlCtx->paintAt(&dc, -marginleft-pos_x, -margintop-pos_y, event->rect.x, event->rect.y, event->rect.w, event->rect.h); #else m_htmlCtx->paintAt(&dc, -marginleft-pos_x, -margintop-pos_y, 0, 0, viewport_w-(marginleft+marginright+barwidth), viewport_h-(margintop+marginbottom)); #endif } else { DBG_ERROR(GWEN_LOGDOMAIN, "No HtmlContext"); } return 1; } void FOX16_HtmlText::layout() { int w; m_haveDefaultDims=false; if (options & FLAGS_NO_WORDWRAP) w=-1; else w=viewport_w; if (m_htmlCtx==NULL) updateHtml(); m_htmlCtx->layout(w-(marginleft+marginright+barwidth), height-(margintop+marginbottom)); // Scrollbars adjusted FXScrollArea::layout(); update(); flags&=~FLAG_DIRTY; } void FOX16_HtmlText::updateHtml() { if (m_htmlCtx) delete m_htmlCtx; m_htmlCtx=new FOX16_HtmlCtx(0); m_htmlCtx->setBackgroundColor(backColor); m_htmlCtx->setForegroundColor(fxcolorfromname("black")); m_htmlCtx->setText(m_text.text()); flags|=FLAG_DIRTY; } void FOX16_HtmlText::makePositionVisible(FXint pos) { FXint xPos, yPos; xPos=pos_x; yPos=getContentHeight()-viewport_h; if (xPos>=0 && yPos>=0) setPosition(-xPos, -yPos); } gwenhywfar-5.12.1/gui/fox16/fox16_htmllabel.hpp0000664000175000017500000000435214156451716016151 00000000000000/*************************************************************************** begin : Tue Feb 23 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_HTMLLABEL_HPP #define FOX16_HTMLLABEL_HPP #include #include class FOX16_HtmlCtx; class FOX16GUI_API FOX16_HtmlLabel: public FXFrame { FXDECLARE(FOX16_HtmlLabel) public: enum { /** don't wrap the text. If this flag is given as parameter to the constructor * then you'll have to insert line-breaks into the text yourself. */ FLAGS_NO_WORDWRAP = 0x00080000, /** when wrapping words use the full widget width to layout the text. * Otherwise the wordwrapping occurrs at the width set by @ref setMaxDefaultWidth(). */ FLAGS_USE_FULL_WIDTH = 0x00040000 }; FOX16_HtmlLabel(FXComposite* p, const FXString& text, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); ~FOX16_HtmlLabel(); /// Set the text for this label void setText(const FXString& text); /// Get the text for this label FXString getText() const { return m_text; } FXIcon *getIcon() const { return m_icon;}; void setIcon(FXIcon *ic); void addMediaPath(const char *s); /// Return default width virtual FXint getDefaultWidth(); /// Return default height virtual FXint getDefaultHeight(); void create(); void setMinimumWidth(int i) { m_minWidth=i;}; void setMaxDefaultWidth(int i) { m_maxDefaultWidth=i;}; long onPaint(FXObject*, FXSelector, void*); void layout(); protected: FOX16_HtmlCtx *m_htmlCtx; FXString m_text; int m_minWidth; int m_maxDefaultWidth; bool m_haveDefaultDims; FXint m_defaultWidth; FXint m_defaultHeight; GWEN_STRINGLIST *m_mediaPaths; FXIcon *m_icon; FOX16_HtmlLabel(); void updateHtml(); void calcDefaultDims(); }; #endif gwenhywfar-5.12.1/gui/fox16/fox16_htmlctx.cpp0000664000175000017500000003505014156451716015662 00000000000000/*************************************************************************** begin : Mon Feb 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "fox16_htmlctx_p.hpp" #include "fox16_gui.hpp" #include #include #include #include #include #include #include #include #include #include #include GWEN_INHERIT(GWEN_XML_CONTEXT, FOX16_HtmlCtx) GWEN_INHERIT(HTML_FONT, FXFont) GWEN_INHERIT(HTML_IMAGE, FXImage) int FOX16_HtmlCtxLinker::GetTextWidth(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s) { FOX16_HtmlCtx *xctx; assert(ctx); xctx=GWEN_INHERIT_GETDATA(GWEN_XML_CONTEXT, FOX16_HtmlCtx, ctx); assert(xctx); return xctx->getTextWidth(fnt, s); } int FOX16_HtmlCtxLinker::GetTextHeight(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s) { FOX16_HtmlCtx *xctx; assert(ctx); xctx=GWEN_INHERIT_GETDATA(GWEN_XML_CONTEXT, FOX16_HtmlCtx, ctx); assert(xctx); return xctx->getTextHeight(fnt, s); } uint32_t FOX16_HtmlCtxLinker::GetColorFromName(const GWEN_XML_CONTEXT *ctx, const char *name) { FOX16_HtmlCtx *xctx; assert(ctx); xctx=GWEN_INHERIT_GETDATA(GWEN_XML_CONTEXT, FOX16_HtmlCtx, ctx); assert(xctx); return xctx->getColorFromName(name); } HTML_FONT *FOX16_HtmlCtxLinker::GetFont(GWEN_XML_CONTEXT *ctx, const char *fontName, int fontSize, uint32_t fontFlags) { FOX16_HtmlCtx *xctx; assert(ctx); xctx=GWEN_INHERIT_GETDATA(GWEN_XML_CONTEXT, FOX16_HtmlCtx, ctx); assert(xctx); return xctx->getFont(fontName, fontSize, fontFlags); } HTML_IMAGE *FOX16_HtmlCtxLinker::GetImage(GWEN_XML_CONTEXT *ctx, const char *imageName) { FOX16_HtmlCtx *xctx; assert(ctx); xctx=GWEN_INHERIT_GETDATA(GWEN_XML_CONTEXT, FOX16_HtmlCtx, ctx); assert(xctx); return xctx->getImage(imageName); } void FOX16_HtmlCtxLinker::freeData(void *bp, void *p) { FOX16_HtmlCtx *xctx; xctx=(FOX16_HtmlCtx*) p; if (xctx->_context) xctx->_context=NULL; delete xctx; } void FOX16_HtmlCtxLinker::freeFontData(void *bp, void *p) { FXFont *xfnt; xfnt=(FXFont*) p; delete xfnt; } void FOX16_HtmlCtxLinker::freeImageData(void *bp, void *p) { FXImage *ximg; ximg=(FXImage*) p; delete ximg; } FOX16_HtmlCtx::FOX16_HtmlCtx(uint32_t flags) :_context(NULL) ,_font(NULL) ,_fgColor(0) ,_bgColor(0) ,m_iconSource(NULL) { HTML_PROPS *pr; HTML_FONT *fnt; _context=HtmlCtx_new(flags); GWEN_INHERIT_SETDATA(GWEN_XML_CONTEXT, FOX16_HtmlCtx, _context, this, FOX16_HtmlCtxLinker::freeData); _font=FXApp::instance()->getNormalFont(); HtmlCtx_SetGetTextWidthFn(_context, FOX16_HtmlCtxLinker::GetTextWidth); HtmlCtx_SetGetTextHeightFn(_context, FOX16_HtmlCtxLinker::GetTextHeight); HtmlCtx_SetGetColorFromNameFn(_context, FOX16_HtmlCtxLinker::GetColorFromName); HtmlCtx_SetGetFontFn(_context, FOX16_HtmlCtxLinker::GetFont); HtmlCtx_SetGetImageFn(_context, FOX16_HtmlCtxLinker::GetImage); pr=HtmlProps_new(); fnt=HtmlCtx_GetFont(_context, _font->getName().text(), _font->getSize()/10, 0); HtmlProps_SetFont(pr, fnt); HtmlCtx_SetStandardProps(_context, pr); HtmlProps_free(pr); } FOX16_HtmlCtx::~FOX16_HtmlCtx() { if (_context) { GWEN_INHERIT_UNLINK(GWEN_XML_CONTEXT, FOX16_HtmlCtx, _context); GWEN_XmlCtx_free(_context); } } FXFont *FOX16_HtmlCtx::_getFoxFont(HTML_FONT *fnt) { FXFont *xfnt; if (GWEN_INHERIT_ISOFTYPE(HTML_FONT, FXFont, fnt)) { xfnt=GWEN_INHERIT_GETDATA(HTML_FONT, FXFont, fnt); return xfnt; } else { FXuint size; FXuint weight; FXuint slant; FXuint encoding; FXString face; uint32_t flags; if (HtmlFont_GetFontName(fnt)) face=HtmlFont_GetFontName(fnt); else face=_font->getName(); size=HtmlFont_GetFontSize(fnt); weight=FXFont::Normal; slant=_font->getSlant(); encoding=_font->getEncoding(); flags=HtmlFont_GetFontFlags(fnt); if (flags & HTML_FONT_FLAGS_STRONG) weight=FXFont::Bold; if (flags & HTML_FONT_FLAGS_ITALIC) slant=FXFont::Italic; DBG_DEBUG(GWEN_LOGDOMAIN, "Creating font [%s], size=%d, weight=%d, slant=%d, encoding=%d", face.text(), size, weight, slant, encoding); xfnt=new FXFont(FXApp::instance(), face, size, weight, slant, encoding); if (xfnt==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not create font [%s], size=%d, weight=%d, slant=%d, encoding=%d", face.text(), size, weight, slant, encoding); return NULL; } xfnt->create(); GWEN_INHERIT_SETDATA(HTML_FONT, FXFont, fnt, xfnt, FOX16_HtmlCtxLinker::freeFontData); return xfnt; } } int FOX16_HtmlCtx::getTextWidth(HTML_FONT *fnt, const char *s) { if (s==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "NULLPOINTER, returning size 0"); return 0; } else { FXFont *xfnt; FXString str; str=FXString(s); xfnt=_getFoxFont(fnt); if (xfnt==NULL) return _font->getTextWidth(str); else return xfnt->getTextWidth(str); } } int FOX16_HtmlCtx::getTextHeight(HTML_FONT *fnt, const char *s) { if (s==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "NULLPOINTER, returning size 0"); return 0; } else { FXFont *xfnt; FXString str; str=FXString(s); xfnt=_getFoxFont(fnt); if (xfnt==NULL) return _font->getTextHeight(str); else return xfnt->getTextHeight(str); } } uint32_t FOX16_HtmlCtx::getColorFromName(const char *name) { return fxcolorfromname(name); } int FOX16_HtmlCtx::layout(int width, int height) { return HtmlCtx_Layout(_context, width, height); } void FOX16_HtmlCtx::setText(const char *s) { int rv; rv=GWEN_XMLContext_ReadFromString(_context, s); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); } } void FOX16_HtmlCtx::addMediaPath(const char *s) { HtmlCtx_AddMediaPath(_context, s); } static void dumpObject(HTML_OBJECT *o, FILE *f, int indent) { HTML_OBJECT *c; int i; const char *s; HTML_PROPS *pr; HTML_FONT *fnt; s=HtmlObject_GetText(o); for (i=0; isetFont(xfnt); ascent=xfnt->getFontAscent(); } /* select foreground color */ col=HtmlProps_GetForegroundColor(pr); if (col==HTML_PROPS_NOCOLOR) dc->setForeground(_fgColor); else dc->setForeground(col); /* select background color */ col=HtmlProps_GetBackgroundColor(pr); if (col==HTML_PROPS_NOCOLOR) dc->setBackground(_bgColor); else dc->setBackground(col); dc->drawText(xOffset, yOffset+ascent, HtmlObject_GetText(o)); break; } case HtmlObjectType_Image: { HTML_IMAGE *img; img=HtmlObject_Image_GetImage(o); if (img) { FXImage *ximg; ximg=GWEN_INHERIT_GETDATA(HTML_IMAGE, FXImage, img); if (ximg) { HTML_PROPS *pr; uint32_t col; pr=HtmlObject_GetProperties(o); /* select background color */ col=HtmlProps_GetBackgroundColor(pr); if (col==HTML_PROPS_NOCOLOR) { dc->setBackground(_bgColor); dc->setForeground(_bgColor); } else { dc->setBackground(col); dc->setForeground(col); } dc->fillRectangle(xOffset, yOffset, ximg->getWidth(), ximg->getHeight()); dc->drawImage(ximg, xOffset, yOffset); } } break; } default: break; } c=HtmlObject_Tree_GetFirstChild(o); while(c) { _paint(dc, c, xOffset, yOffset); c=HtmlObject_Tree_GetNext(c); } } void FOX16_HtmlCtx::_paintAt(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset, int xText, int yText, int w, int h) { HTML_OBJECT *c; int x; int y; int printX; int printY; int objectW; int objectH; x=xText+HtmlObject_GetX(o); y=yText+HtmlObject_GetY(o); objectW=HtmlObject_GetWidth(o); objectH=HtmlObject_GetHeight(o); printX=x-xOffset; printY=y-yOffset; if (printX=0 && printY=0) { switch(HtmlObject_GetObjectType(o)) { #if 0 case HtmlObjectType_Grid: dc->setForeground(FXRGB(255,0,0)); dc->fillRectangle(printX, printY, HtmlObject_GetWidth(o), HtmlObject_GetHeight(o)); #endif case HtmlObjectType_Word: { HTML_PROPS *pr; HTML_FONT *fnt; FXFont *xfnt; int ascent=0; uint32_t col; pr=HtmlObject_GetProperties(o); /* select font */ fnt=HtmlProps_GetFont(pr); xfnt=_getFoxFont(fnt); if (xfnt) { dc->setFont(xfnt); ascent=xfnt->getFontAscent(); } /* select foreground color */ col=HtmlProps_GetForegroundColor(pr); if (col==HTML_PROPS_NOCOLOR) dc->setForeground(_fgColor); else dc->setForeground(col); /* select background color */ col=HtmlProps_GetBackgroundColor(pr); if (col==HTML_PROPS_NOCOLOR) dc->setBackground(_bgColor); else dc->setBackground(col); dc->drawText(printX, printY+ascent, HtmlObject_GetText(o)); break; } case HtmlObjectType_Image: { HTML_IMAGE *img; img=HtmlObject_Image_GetImage(o); if (img) { FXImage *ximg; ximg=GWEN_INHERIT_GETDATA(HTML_IMAGE, FXImage, img); if (ximg) { HTML_PROPS *pr; uint32_t col; pr=HtmlObject_GetProperties(o); /* select background color */ col=HtmlProps_GetBackgroundColor(pr); if (col==HTML_PROPS_NOCOLOR) { dc->setBackground(_bgColor); dc->setForeground(_bgColor); } else { dc->setBackground(col); dc->setForeground(col); } dc->fillRectangle(printX, printY, ximg->getWidth(), ximg->getHeight()); dc->drawImage(ximg, printX, printY); } } break; } default: break; } c=HtmlObject_Tree_GetFirstChild(o); while(c) { _paintAt(dc, c, xOffset, yOffset, x, y, w, h); c=HtmlObject_Tree_GetNext(c); } } } void FOX16_HtmlCtx::paint(FXDC *dc, int xOffset, int yOffset) { HTML_OBJECT *o; o=HtmlCtx_GetRootObject(_context); if (o) _paint(dc, o, xOffset, yOffset); } void FOX16_HtmlCtx::paintAt(FXDC *dc, int xOffset, int yOffset, int xText, int yText, int w, int h) { HTML_OBJECT *o; o=HtmlCtx_GetRootObject(_context); if (o) _paintAt(dc, o, xOffset, yOffset, xText, yText, w, h); } int FOX16_HtmlCtx::getWidth() { HTML_OBJECT *o; o=HtmlCtx_GetRootObject(_context); if (o) return HtmlObject_GetWidth(o); else return -1; } int FOX16_HtmlCtx::getHeight() { HTML_OBJECT *o; o=HtmlCtx_GetRootObject(_context); if (o) return HtmlObject_GetHeight(o); else return -1; } HTML_FONT *FOX16_HtmlCtx::getFont(const char *fontName, int fontSize, uint32_t fontFlags) { FOX16_Gui *gui; gui=FOX16_Gui::getFgGui(); assert(gui); return gui->getFont(fontName, fontSize, fontFlags); } HTML_IMAGE *FOX16_HtmlCtx::getImage(const char *fileName) { GWEN_STRINGLIST *sl; sl=HtmlCtx_GetMediaPaths(_context); if (sl) { GWEN_BUFFER *tbuf; int rv; FXImage *ximg; HTML_IMAGE *img; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(sl, fileName, tbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); GWEN_Buffer_free(tbuf); return NULL; } if (m_iconSource==NULL) m_iconSource=new FXIconSource(FXApp::instance()); ximg=m_iconSource->loadIconFile(GWEN_Buffer_GetStart(tbuf)); if (ximg==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Could not load icon [%s]", GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return NULL; } ximg->create(); img=HtmlImage_new(); HtmlImage_SetImageName(img, GWEN_Buffer_GetStart(tbuf)); HtmlImage_SetWidth(img, ximg->getWidth()); HtmlImage_SetHeight(img, ximg->getHeight()); GWEN_INHERIT_SETDATA(HTML_IMAGE, FXImage, img, ximg, FOX16_HtmlCtxLinker::freeImageData); GWEN_Buffer_free(tbuf); return img; } else { DBG_ERROR(GWEN_LOGDOMAIN, "No media paths in dialog"); return NULL; } } void FOX16_HtmlCtx::setBackgroundColor(FXColor c) { _bgColor=c; } void FOX16_HtmlCtx::setForegroundColor(FXColor c) { _fgColor=c; } gwenhywfar-5.12.1/gui/fox16/libtest.cpp0000664000175000017500000003615713265727202014627 00000000000000 #ifdef HAVE_CONFIG_H # include #endif #ifdef OS_WIN32 # include # define sleep(x) Sleep(x) #endif #undef BUILDING_FOX16_GUI #include #include "fox16_htmlctx.hpp" #include "fox16_htmllabel.hpp" #include "fox16_htmltext.hpp" #include "../testdialogs/dlg_test.h" #include "../testdialogs/dlg_test2.h" #include #include #include #include int test1(int argc, char **argv) { FXApp a("libtest","Martin Preuss"); FOX16_Gui *gui; //int rv; const char testString[]= #if 0 # if 0 "This is a test. " "And this, is the second line: followed by something else." "" " " " " " " " " " " " " " " " " "
header1header2
data1data2
" "And this is after the table.
" "and this one is red."; # else "This is before right" "RIGHT" "and this after right."; # endif #else "word"; #endif a.init(argc,argv); a.create(); gui=new FOX16_Gui(&a); GWEN_Gui_SetGui(gui->getCInterface()); FOX16_HtmlCtx ctx(0); ctx.setText(testString); //rv=ctx.layout(300, 1024); //fprintf(stderr, "Result of layout: %d\n", rv); ctx.dump(); GWEN_Gui_SetGui(NULL); delete gui; return 0; } int test2(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

This is an example text..

" "

As you can see colors can " "be used.

" "", 15, 0); for (i1=1; i1<=15; i1++) { GWEN_Gui_ProgressLog2(id1, GWEN_LoggerLevel_Notice, "Step %d: This is a another step in the test of progress widgets", (int) i1); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 5, id1); for (i2=1; i2<=3; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int test3(int argc, char **argv) { FXApp a("libtest","Martin Preuss"); FOX16_Gui *gui; FXDialogBox *dbox; FXVerticalFrame *vf; const char testString[]= #if 1 "

Title

" "

Subtitle

" "This is a test. " "And this, is the second line: followed by something else." "This should be right aligned" "" " " " " " " " " " " " " " " " " "
header1header2
data1this is longer data (data2)
" "And this is after the table.
" "and this one is red."; #else "This is before right" "Right" "and this after right."; #endif a.init(argc,argv); a.create(); gui=new FOX16_Gui(&a); GWEN_Gui_SetGui(gui->getCInterface()); dbox=new FXDialogBox(&a, "Test", DECOR_ALL); vf=new FXVerticalFrame(dbox, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 1, 1, 1, 1); new FOX16_HtmlLabel(vf, FXString(testString), LAYOUT_FILL_X|LAYOUT_FILL_Y); new FXSpring(vf, LAYOUT_FILL_X | LAYOUT_FILL_Y); new FXLabel(vf, "Normal Testlabel"); dbox->create(); dbox->resize(300, 200); dbox->show(); a.runModalFor(dbox); return 0; } int test4(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

Test f\xc3\xbcr Umlaute.

" "", 10, 0); for (i1=1; i1<=10; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 10, id1); for (i2=1; i2<=10; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int test5(int argc, char **argv) { FXApp a("libtest","Martin Preuss"); FOX16_Gui *gui; FXDialogBox *dbox; FXVerticalFrame *vf; const char testString[]= #if 1 "

Test5

" "

Subtitle

" "This is a test. " "And this, is the second line: followed by something else." "This should be right aligned" "" " " " " " " " " " " " " " " " " "
header1header2
data1this is longer data (data2)
" "And this is after the table.
" "and this one is red."; #else "This is before right" "Right" "and this after right."; #endif a.init(argc,argv); a.create(); gui=new FOX16_Gui(&a); GWEN_Gui_SetGui(gui->getCInterface()); dbox=new FXDialogBox(&a, "Test", DECOR_ALL); vf=new FXVerticalFrame(dbox, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 1, 1, 1, 1); new FOX16_HtmlText(vf, FXString(testString), LAYOUT_FILL_X|LAYOUT_FILL_Y | HSCROLLING_OFF | VSCROLLER_ALWAYS); new FXSpring(vf, LAYOUT_FILL_X | LAYOUT_FILL_Y); new FXLabel(vf, "Normal Testlabel"); dbox->create(); dbox->resize(300, 200); dbox->show(); a.runModalFor(dbox); return 0; } int test6(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

Test f\xc3\xbcr Umlaute.

" "", 10, 0); for (i1=1; i1<=20; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 5, id1); for (i2=1; i2<=5; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); GWEN_Gui_ProgressLog(id2, GWEN_LoggerLevel_Notice, "Advancing..."); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int test7(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; char buffer[65]; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); GWEN_Gui_InputBox(GWEN_GUI_INPUT_FLAGS_SHOW, "This is the Title", "This is the text.This is ASCII", buffer, 1, sizeof(buffer)-1, 0); return 0; } int test8(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; int rv; GWEN_DIALOG *dlg; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Debug); GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Verbous); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int test9(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; int rv; GWEN_DIALOG *dlg; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Debug); GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Verbous); dlg=Dlg_Test2_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int test10(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; int rv; GWEN_PASSWD_STORE *sto; GWEN_DB_NODE *dbPasswords; const char *token; const char *epw; char pw[256]; if (argc<4) { DBG_ERROR(0, "Expected token and secret"); return 1; } token=argv[2]; epw=argv[3]; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); sto=GWEN_PasswordStore_new("/tmp/pwstore.pw"); dbPasswords=GWEN_DB_Group_new("TempPasswords"); gui->setPasswordStore(sto); gui->setPasswordDb(dbPasswords, 0); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Debug); GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Verbous); rv=GWEN_Gui_GetPassword(0, token, "Get Password", "Please enter password 1", pw, 4, sizeof(pw)-1, GWEN_Gui_PasswordMethod_Text, NULL, 0); if (rv<0) { DBG_ERROR(0, "Error getting password: %d", rv); return 2; } if (strcmp(epw, pw)!=0) { DBG_ERROR(0, "Bad password for token [%s], expected [%s], got [%s].", token, epw, pw); return 2; } #if 0 dlg=Dlg_Test2_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); #endif return 0; } int test11(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; char buffer[65]; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); GWEN_Gui_InputBox(GWEN_GUI_INPUT_FLAGS_SHOW, "This is the Title", "This is quite a long HTML text. This is the second sentence, which is a bit longer " "than the first one.
In any case this sentence should begin on its own line" "This is quite a long HTML text. This is the second sentence, which is a bit longer " "than the first one.\nIn any case this sentence should begin on its own line.", buffer, 1, sizeof(buffer)-1, 0); return 0; } int test12(int argc, char **argv) { FXApp application("libtest","Martin Preuss"); FOX16_Gui *gui; char buffer[65]; application.init(argc,argv); application.create(); gui=new FOX16_Gui(&application); GWEN_Gui_SetGui(gui->getCInterface()); GWEN_Gui_InputBox(GWEN_GUI_INPUT_FLAGS_SHOW, "This is the Title", "This is quite a long HTML text. This is the second sentence, which is a bit longer " "than the first one.
In any case this sentence should begin on its own line.", buffer, 1, sizeof(buffer)-1, 0); return 0; } int main(int argc, char **argv) { GWEN_Init(); GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Debug); GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Info); if (argc>1) { if (strcasecmp(argv[1], "1")==0) return test1(argc, argv); else if (strcasecmp(argv[1], "2")==0) return test2(argc, argv); else if (strcasecmp(argv[1], "3")==0) return test3(argc, argv); else if (strcasecmp(argv[1], "4")==0) return test4(argc, argv); else if (strcasecmp(argv[1], "5")==0) return test5(argc, argv); else if (strcasecmp(argv[1], "6")==0) return test6(argc, argv); else if (strcasecmp(argv[1], "7")==0) return test7(argc, argv); else if (strcasecmp(argv[1], "8")==0) return test8(argc, argv); else if (strcasecmp(argv[1], "9")==0) return test9(argc, argv); else if (strcasecmp(argv[1], "10")==0) return test10(argc, argv); else if (strcasecmp(argv[1], "11")==0) return test11(argc, argv); else if (strcasecmp(argv[1], "12")==0) return test12(argc, argv); } else return test7(argc, argv); } gwenhywfar-5.12.1/gui/fox16/Makefile.am0000664000175000017500000000241214156451716014500 00000000000000AM_CPPFLAGS=-I$(gwenhywfar_symlinkdir) $(fox_includes) -Ihtml \ @visibility_cflags@ DEFS+=-DBUILDING_FOX16_GUI -DPACKAGE=\"$(PACKAGE)\" pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-fox16.pc lib_LTLIBRARIES=libgwengui-fox16.la noinst_HEADERS=\ fox16_gui_dialog_l.hpp \ fox16_gui_sortinglist_l.hpp \ fox16_gui_updater_l.hpp \ fox16_htmlctx_p.hpp \ fox16_htmlctx.hpp libgwengui_fox16_la_LIBADD=$(fox_libs) $(top_builddir)/src/$(gwenhywfar_internal_libname) $(top_builddir)/gui/cpp/libgwengui-cpp.la libgwengui_fox16_la_LDFLAGS=-no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_fox16_la_SOURCES=\ fox16_gui.cpp \ fox16_gui_dialog.cpp \ fox16_gui_sortinglist.cpp \ fox16_gui_updater.cpp \ fox16_htmlctx.cpp \ fox16_htmllabel.cpp \ fox16_htmltext.cpp \ theme.cpp iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-fox16 iheader_HEADERS=\ fox16_gui.hpp \ fox16_htmlctx.hpp \ fox16_htmllabel.hpp \ fox16_htmltext.hpp \ theme.h \ api.h noinst_PROGRAMS=libtest libtest_SOURCES=libtest.cpp libtest_LDADD=libgwengui-fox16.la $(fox_libs) $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la gwenhywfar-5.12.1/gui/fox16/gwengui-fox16.pc.in0000644000175000017500000000106613142134462015773 00000000000000# pkg-config configuration for gwengui_fox16 # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@includedir@/gwenhywfar datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Human-readable name Name: gwengui-fox16 # Human-readable description Description: FOX16 Implementation of the GWEN_DIALOG framework. Version: @VERSION@ Libs: -L@libdir@ -lgwengui-fox16 -lgwengui-cpp Cflags: -I@includedir@ gwenhywfar-5.12.1/gui/fox16/fox16_htmlctx_p.hpp0000644000175000017500000000266013142134462016173 00000000000000/*************************************************************************** begin : Mon Feb 22 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef FOX16_HTMLCTX_P_HPP #define FOX16_HTMLCTX_P_HPP #include "fox16_htmlctx.hpp" class FOX16_HtmlCtxLinker { friend class FOX16_HtmlCtx; static int GetTextWidth(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s); static int GetTextHeight(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s); static uint32_t GetColorFromName(const GWEN_XML_CONTEXT *ctx, const char *name); static HTML_FONT *GetFont(GWEN_XML_CONTEXT *ctx, const char *fontName, int fontSize, uint32_t fontFlags); static HTML_IMAGE *GetImage(GWEN_XML_CONTEXT *ctx, const char *imageName); static GWENHYWFAR_CB void freeData(void *bp, void *p); static GWENHYWFAR_CB void freeFontData(void *bp, void *p); static GWENHYWFAR_CB void freeImageData(void *bp, void *p); }; #endif gwenhywfar-5.12.1/gui/fox16/theme.cpp0000644000175000017500000006331713142134462014251 00000000000000/* These widgets have initially been created by Martin Oberzalek who gave them into * the public domain via an email to the mailing list foxgui-users on 17th of June, 2010 * ("here the source. Free to use for alll."). * I (Martin Preuss) adapted them to be usable with FOX 1.6 and also added some widgets of * my own (for now: ThemeHeaderItem). */ #ifdef HAVE_CONFIG_H # include #endif #include "theme.h" #define ICON_SPACING 4 // Draw rectangle static void drawRectangle(FXDC& dc,FXColor lower,FXColor upper,FXint x,FXint y,FXint w,FXint h) { register FXint rr,gg,bb,dr,dg,db,r1,g1,b1,r2,g2,b2,yl,yh,yy,dy,n,t; const FXint MAXSTEPS=128; if(0n) n=t; if((t=FXABS(db))>n) n=t; n++; if(n>h) n=h; if(n>MAXSTEPS) n=MAXSTEPS; rr=(r1<<16)+32767; gg=(g1<<16)+32767; bb=(b1<<16)+32767; yy=32767; dr=(dr<<16)/n; dg=(dg<<16)/n; db=(db<<16)/n; dy=(h<<16)/n; do { yl=yy>>16; yy+=dy; yh=yy>>16; dc.setForeground(FXRGB(rr>>16,gg>>16,bb>>16)); dc.fillRectangle(x,y+yl,w,yh-yl); rr+=dr; gg+=dg; bb+=db; } while(yhgetWidth(); ih=icon->getHeight(); } just_x(tx,ix,tw,iw); just_y(ty,iy,th,ih); // Shift a bit when pressed if (state && (options&(FRAME_RAISED|FRAME_SUNKEN))) { ++tx; ++ty; ++ix; ++iy; } // Draw enabled state if(isEnabled()) { if(icon) { dc.drawIcon(icon,ix,iy); } if(!label.empty()) { dc.setFont(font); dc.setForeground(textColor); drawLabel(dc,label,hotoff,tx,ty,tw,th); } if(hasFocus()) { dc.drawFocusRectangle(border+1,border+1,width-2*border-2,height-2*border-2); } } // Draw grayed-out state else { if (icon) { dc.drawIconSunken(icon,ix,iy); } if(!label.empty()) { dc.setFont(font); dc.setForeground(hiliteColor); drawLabel(dc,label,hotoff,tx+1,ty+1,tw,th); dc.setForeground(shadowColor); drawLabel(dc,label,hotoff,tx,ty,tw,th); } } return 1; } FXDEFMAP(ThemeTextField) ThemeTextFieldMap[]= { FXMAPFUNC( SEL_PAINT, 0, ThemeTextField::onPaint) }; FXIMPLEMENT( ThemeTextField, FXTextField, ThemeTextFieldMap, ARRAYNUMBER(ThemeTextFieldMap) ); ThemeTextField::ThemeTextField(FXComposite* p,FXint ncols,FXObject* tgt,FXSelector sel, FXuint opts,FXint x,FXint y,FXint w,FXint h, FXint pl,FXint pr,FXint pt,FXint pb) : FXTextField( p, ncols, tgt, sel, opts, x, y, w, h, pl, pr, pt, pb ) { } static void drawFrame(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h) { if(0setBaseColor( ColorThemes[0].base ); app->setBorderColor( ColorThemes[0].border ); app->setBackColor( ColorThemes[0].back ); app->setForeColor( ColorThemes[0].fore ); app->setSelforeColor( ColorThemes[0].selfore ); app->setSelbackColor( ColorThemes[0].selback ); app->setTipforeColor( ColorThemes[0].tipfore ); app->setTipbackColor( ColorThemes[0].tipback ); app->setSelMenuTextColor( ColorThemes[0].menufore ); app->setSelMenuBackColor( ColorThemes[0].menuback ); // app->setHiliteColor(FXRGB(123,158,189)); } FXDEFMAP(ThemeComboBox) ThemeComboBoxMap[]= { FXMAPFUNC( SEL_PAINT, 0, ThemeComboBox::onPaint) }; FXIMPLEMENT( ThemeComboBox, FXComboBox, ThemeComboBoxMap, ARRAYNUMBER(ThemeComboBoxMap) ); ThemeComboBox::ThemeComboBox(FXComposite *p,FXint cols,FXObject* tgt,FXSelector sel,FXuint opts, FXint x,FXint y,FXint w,FXint h, FXint pl,FXint pr,FXint pt,FXint pb) : FXComboBox(p,cols, tgt, sel, opts,x,y,w,h, pl,pr,pt,pb) { delete button; button=new ThemeMenuButton(this,FXString::null, NULL, pane, FRAME_RAISED|MENUBUTTON_DOWN|MENUBUTTON_ATTACH_RIGHT, 0,0,0,0, 0,0,0,0); button->setXOffset(border); button->setYOffset(border); } long ThemeComboBox::onPaint(FXObject*,FXSelector,void* ptr) { FXEvent *ev=(FXEvent*)ptr; FXDCWindow dc(this,ev); dc.setForeground(backColor); dc.fillRectangle(ev->rect.x,ev->rect.y,ev->rect.w,ev->rect.h); drawFrame(dc,0,0,width,height); return 1; } FXDEFMAP(ThemeLabel) ThemeLabelMap[]= { FXMAPFUNC( SEL_PAINT, 0, ThemeLabel::onPaint ) }; FXIMPLEMENT( ThemeLabel, FXLabel, ThemeLabelMap, ARRAYNUMBER( ThemeLabelMap )); ThemeLabel::ThemeLabel(FXComposite* p,const FXString& text,FXIcon* ic,FXuint opts, FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb) : FXLabel( p, text, ic, opts, x, y, w, h, pl, pr, pt, pb ) { } // Handle repaint long ThemeLabel::onPaint(FXObject*,FXSelector,void* ptr) { FXEvent *ev=(FXEvent*)ptr; FXDCWindow dc(this,ev); FXint tw=0,th=0,iw=0,ih=0,tx,ty,ix,iy; dc.setForeground(backColor); dc.fillRectangle(0,0,width,height); if (!label.empty()) { tw=labelWidth(label); th=labelHeight(label); } if (icon) { iw=icon->getWidth(); ih=icon->getHeight(); } just_x(tx,ix,tw,iw); just_y(ty,iy,th,ih); if(icon) { if(isEnabled()) dc.drawIcon(icon,ix,iy); else dc.drawIconSunken(icon,ix,iy); } if (!label.empty()) { dc.setFont(font); if(isEnabled()) { dc.setForeground(textColor); drawLabel(dc,label,hotoff,tx,ty,tw,th); } else { dc.setForeground(hiliteColor); drawLabel(dc,label,hotoff,tx+1,ty+1,tw,th); dc.setForeground(shadowColor); drawLabel(dc,label,hotoff,tx,ty,tw,th); } } if (options & (FRAME_THICK|FRAME_RAISED|FRAME_SUNKEN)) { if( options & (FRAME_SUNKEN) ) drawSunkenFrame(dc,0,0,width,height); else if( options & (FRAME_RAISED) ) drawHighlightFrame(dc,0,0,width,height); else drawFrame(dc,0,0,width,height); } return 1; } FXDEFMAP(ThemeTabItem) ThemeTabItemMap[]= { // FXMAPFUNC( SEL_PAINT, 0, ThemeTabItem::onPaint ) }; FXIMPLEMENT( ThemeTabItem, FXTabItem, ThemeTabItemMap, ARRAYNUMBER( ThemeTabItemMap )); ThemeTabItem::ThemeTabItem(FXTabBar* p,const FXString& text,FXIcon* ic,FXuint opts, FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb) : FXTabItem(p,text,ic,opts,x,y,w,h,pl,pr,pt,pb) { shadowColor = FXRGB(123,158,189); borderColor = FXRGB(123,158,189); hiliteColor = FXRGB(123,158,189); } ThemeVerticalFrame::ThemeVerticalFrame(FXComposite* p,FXuint opts,FXint x,FXint y,FXint w,FXint h, FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXVerticalFrame( p, opts, x, y, w, h, pl, pr, pt, pb, hs, vs ) { setHiliteColor( FXRGB(123,158,189) ); } ThemeHorizontalFrame::ThemeHorizontalFrame(FXComposite* p,FXuint opts,FXint x,FXint y,FXint w,FXint h, FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXHorizontalFrame( p, opts, x, y, w, h, pl, pr, pt, pb, hs, vs ) { setHiliteColor( FXRGB(123,158,189) ); } #define MENUBUTTONARROW_WIDTH 13 #define MENUBUTTONARROW_HEIGHT 5 FXDEFMAP(ThemeMenuButton) ThemeMenuButtonMap[]= { FXMAPFUNC( SEL_PAINT, 0, ThemeMenuButton::onPaint) }; FXIMPLEMENT( ThemeMenuButton, FXMenuButton, ThemeMenuButtonMap, ARRAYNUMBER(ThemeMenuButtonMap) ); ThemeMenuButton::ThemeMenuButton(FXComposite* p,const FXString& text, FXIcon* ic,FXPopup* pup,FXuint opts, FXint x,FXint y,FXint w,FXint h, FXint pl,FXint pr,FXint pt,FXint pb ) : FXMenuButton( p, text, ic, pup, opts, x, y, w, h, pl, pr, pt, pb) { } // Handle repaint long ThemeMenuButton::onPaint(FXObject*,FXSelector,void* ptr) { FXint tw=0,th=0,iw=0,ih=0,tx,ty,ix,iy; FXEvent *ev=(FXEvent*)ptr; FXPoint points[6]; FXDCWindow dc(this,ev); /* FXColor top = FXRGB(0xfe,0xfd,0xfd); FXColor bottom = FXRGB(0xdd,0xd7,0xce); FXColor shade = FXRGB(0xdc,0xd9,0xd4); */ FXColor top = FXRGB(0xde,0xe7,0xff); FXColor bottom = FXRGB(0xbd,0xcf,0xff); FXColor shade = FXRGB(0xbd,0xcb,0xf7); FXColor buttoncolor = FXRGB(0x4a,0x61,0x84); // FXColor bordercolor = FXRGB(123,158,189); FXColor bordercolor = shade; FXPoint basebackground[4]= { FXPoint(0,0),FXPoint(width-1,0),FXPoint(0,height-1),FXPoint(width-1,height-1) }; FXPoint bordershade[16]= { FXPoint(0,1),FXPoint(1,0),FXPoint(1,2),FXPoint(2,1), FXPoint(width-2,0),FXPoint(width-1,1),FXPoint(width-3,1),FXPoint(width-2,2), FXPoint(0,height-2),FXPoint(1,height-1),FXPoint(1,height-3),FXPoint(2,height-2), FXPoint(width-1,height-2),FXPoint(width-2,height-1),FXPoint(width-2,height-3),FXPoint(width-3,height-2) }; FXPoint bordercorners[4]= { FXPoint(1,1),FXPoint(1,height-2),FXPoint(width-2,1),FXPoint(width-2,height-2) }; // Got a border at all? if (options&(FRAME_RAISED|FRAME_SUNKEN)) { // Toolbar style if (options&MENUBUTTON_TOOLBAR) { // Enabled and cursor inside, and not popped up if (isEnabled() && underCursor() && !state) { dc.setForeground(backColor); dc.fillRectangle(border,border,width-border*2,height-border*2); if(options&FRAME_THICK) drawDoubleRaisedRectangle(dc,0,0,width,height); else drawRaisedRectangle(dc,0,0,width,height); } // Enabled and popped up else if (isEnabled() && state) { dc.setForeground(hiliteColor); dc.fillRectangle(border,border,width-border*2,height-border*2); if(options&FRAME_THICK) drawDoubleSunkenRectangle(dc,0,0,width,height); else drawSunkenRectangle(dc,0,0,width,height); } // Disabled or unchecked or not under cursor else { dc.setForeground(backColor); dc.fillRectangle(0,0,width,height); } } // Normal style else { // Draw in up state if disabled or up if (!isEnabled() || !state) { /* * dc.setForeground(backColor); dc.fillRectangle(border,border,width-border*2,height-border*2); if(options&FRAME_THICK) drawDoubleRaisedRectangle(dc,0,0,width,height); else drawRaisedRectangle(dc,0,0,width,height); */ /// Outside Background dc.setForeground(baseColor); dc.drawPoints(basebackground,4); /// Border dc.setForeground(bordercolor); dc.drawRectangle(2,0,width-5,0); dc.drawRectangle(2,height-1,width-5,height-1); dc.drawRectangle(0,2,0,height-5); dc.drawRectangle(width-1,2,0,height-5); dc.drawPoints(bordercorners,4); dc.setForeground(shade); dc.drawPoints(bordershade,16); /// Gradient drawRectangle(dc,top,bottom,2,1,width-4,height-2); dc.setForeground(top); dc.drawRectangle(1,3,0,height-7); dc.setForeground(bottom); dc.drawRectangle(width-2,3,0,height-7); } // Draw sunken if enabled and either checked or pressed else { dc.setForeground(baseColor); dc.drawPoints(basebackground,4); /// Border dc.setForeground(bordercolor); dc.drawRectangle(2,0,width-5,0); dc.drawRectangle(2,height-1,width-5,height-1); dc.drawRectangle(0,2,0,height-5); dc.drawRectangle(width-1,2,0,height-5); dc.drawPoints(bordercorners,4); dc.setForeground(shade); dc.drawPoints(bordershade,16); dc.setForeground(FXRGB(0xdc,0xd4,0xc9)); dc.fillRectangle(2,1,width-4,height-2); } } } // No borders else { if(isEnabled() && state) { dc.setForeground(hiliteColor); dc.fillRectangle(0,0,width,height); } else { dc.setForeground(backColor); dc.fillRectangle(0,0,width,height); } } // Position text & icon if (!label.empty()) { tw=labelWidth(label); th=labelHeight(label); } // Icon? if (icon) { iw=icon->getWidth(); ih=icon->getHeight(); } // Arrows? else if(!(options&MENUBUTTON_NOARROWS)) { if(options&MENUBUTTON_LEFT) { ih=MENUBUTTONARROW_WIDTH; iw=MENUBUTTONARROW_HEIGHT; } else { iw=MENUBUTTONARROW_WIDTH; ih=MENUBUTTONARROW_HEIGHT; } } // Keep some room for the arrow! just_x(tx,ix,tw,iw); just_y(ty,iy,th,ih); // Move a bit when pressed if (state) { ++tx; ++ty; ++ix; ++iy; } // Draw icon if (icon) { if (isEnabled()) dc.drawIcon(icon,ix,iy); else dc.drawIconSunken(icon,ix,iy); } // Draw arrows else if (!(options&MENUBUTTON_NOARROWS)) { // Right arrow if ((options&MENUBUTTON_RIGHT)==MENUBUTTON_RIGHT) { if (isEnabled()) dc.setForeground(buttoncolor); else dc.setForeground(shadowColor); points[0].x=ix; points[0].y=iy; points[1].x=ix; points[1].y=iy+MENUBUTTONARROW_WIDTH-1; points[2].x=ix+MENUBUTTONARROW_HEIGHT; points[2].y=(FXshort)(iy+(MENUBUTTONARROW_WIDTH>>1)); dc.fillPolygon(points,3); } // Left arrow else if (options&MENUBUTTON_LEFT) { if (isEnabled()) dc.setForeground(buttoncolor); else dc.setForeground(shadowColor); points[0].x=ix+MENUBUTTONARROW_HEIGHT; points[0].y=iy; points[1].x=ix+MENUBUTTONARROW_HEIGHT; points[1].y=iy+MENUBUTTONARROW_WIDTH-1; points[2].x=ix; points[2].y=(FXshort)(iy+(MENUBUTTONARROW_WIDTH>>1)); dc.fillPolygon(points,3); } // Up arrow else if (options&MENUBUTTON_UP) { if(isEnabled()) dc.setForeground(buttoncolor); else dc.setForeground(shadowColor); points[0].x=(FXshort)(ix+(MENUBUTTONARROW_WIDTH>>1)); points[0].y=iy-1; points[1].x=ix; points[1].y=iy+MENUBUTTONARROW_HEIGHT; points[2].x=ix+MENUBUTTONARROW_WIDTH; points[2].y=iy+MENUBUTTONARROW_HEIGHT; dc.fillPolygon(points,3); } // Down arrow else { if(isEnabled()) dc.setForeground(buttoncolor); else dc.setForeground(shadowColor); points[0].x=ix+1; points[0].y=iy; points[2].x=ix+MENUBUTTONARROW_WIDTH-1; points[2].y=iy; points[1].x=(FXshort)(ix+(MENUBUTTONARROW_WIDTH>>1)); points[1].y=iy+MENUBUTTONARROW_HEIGHT; points[3].x=ix+MENUBUTTONARROW_WIDTH-3; points[3].y=iy; points[4].x=(FXshort)(ix+(MENUBUTTONARROW_WIDTH>>1)); points[4].y=iy+MENUBUTTONARROW_HEIGHT-3; points[5].x=ix+3; points[5].y=iy; dc.fillConcavePolygon(points,6); } } // Draw text if (!label.empty()) { dc.setFont(font); if(isEnabled()) { dc.setForeground(textColor); drawLabel(dc,label,hotoff,tx,ty,tw,th); } else { dc.setForeground(hiliteColor); drawLabel(dc,label,hotoff,tx+1,ty+1,tw,th); dc.setForeground(shadowColor); drawLabel(dc,label,hotoff,tx,ty,tw,th); } } // Draw focus if (hasFocus()) { if (isEnabled()) { dc.drawFocusRectangle(border+1,border+1,width-2*border-2,height-2*border-2); } } return 1; } // Get default width FXint ThemeMenuButton::getDefaultWidth() { FXint tw=0,iw=0,s=0,w,pw; if (!label.empty()) { tw=labelWidth(label); s=4; } if (!(options&MENUBUTTON_NOARROWS)) { if (options&MENUBUTTON_LEFT) iw=MENUBUTTONARROW_HEIGHT; else iw=MENUBUTTONARROW_WIDTH; } if(icon) iw=icon->getWidth(); if (!(options&(ICON_AFTER_TEXT|ICON_BEFORE_TEXT))) w=FXMAX(tw,iw); else w=tw+iw+s; w=padleft+padright+(border<<1)+w; if (!(options&MENUBUTTON_LEFT) && (options&MENUBUTTON_ATTACH_RIGHT) && (options&MENUBUTTON_ATTACH_CENTER)) { if (pane) { pw=pane->getDefaultWidth(); if(pw>w) w=pw; } } return w; } #if 0 FXDEFMAP(ThemeHeaderItem) ThemeHeaderItemMap[]= { FXMAPFUNC(SEL_PAINT, 0, ThemeHeaderItem::onPaint) }; FXIMPLEMENT(ThemeHeaderItem, FXHeaderItem, ThemeHeaderItemMap, ARRAYNUMBER(ThemeHeaderItemMap)); #endif ThemeHeaderItem::ThemeHeaderItem(const FXString& text, FXIcon* ic, FXint s, void* ptr) :FXHeaderItem(text, ic, s, ptr) { } void ThemeHeaderItem::draw(const FXHeader* header,FXDC& dc,FXint x,FXint y,FXint w,FXint h) { register FXint tx,ty,tw,th,ix,iy,iw,ih,s,ml,mr,mt,mb,beg,end,t,xx,yy,bb,aa,ax,ay; register FXFont *font=header->getFont(); FXColor top = FXRGB(0xfe,0xfd,0xfd); FXColor bottom = FXRGB(0xdd,0xd7,0xce); FXColor shade = FXRGB(0xdc,0xd9,0xd4); // Get border width and padding bb=header->getBorderWidth(); ml=header->getPadLeft()+bb; mr=header->getPadRight()+bb; mt=header->getPadTop()+bb; mb=header->getPadBottom()+bb; dc.setForeground(shade); /// Gradient drawRectangle(dc,top, bottom, x+2, y+1, w-4, h-2); // Shrink by margins x+=ml; w-=ml+mr; y+=mt; h-=mt+mb; // Initial clip rectangle dc.setClipRectangle(x,y,w,h); dc.setForeground(header->getTextColor()); // Text width and height tw=th=iw=ih=beg=s=0; do { end=beg; while(endgetTextWidth(&label[beg],end-beg))>tw) tw=t; th+=font->getFontHeight(); beg=end+1; } while(endgetWidth(); ih=icon->getHeight(); } // Icon-text spacing if(iw && tw) s=ICON_SPACING; // Draw arrows if (state&(ARROW_UP|ARROW_DOWN)) { aa=(font->getFontHeight()-5)|1; ay=y+(h-aa)/2; ax=x+w-aa-2; if(state&ARROW_UP) { dc.setForeground(header->getHiliteColor()); dc.drawLine(ax+aa/2,ay,ax+aa-1,ay+aa); dc.drawLine(ax,ay+aa,ax+aa,ay+aa); dc.setForeground(header->getShadowColor()); dc.drawLine(ax+aa/2,ay,ax,ay+aa); } else { dc.setForeground(header->getHiliteColor()); dc.drawLine(ax+aa/2,ay+aa,ax+aa-1,ay); dc.setForeground(header->getShadowColor()); dc.drawLine(ax+aa/2,ay+aa,ax,ay); dc.drawLine(ax,ay,ax+aa,ay); } w-=aa+4; dc.setClipRectangle(x,y,w,h); } // Fix x coordinate if (state&LEFT) { if(state&BEFORE) { ix=x; tx=ix+iw+s; } else if (state&AFTER) { tx=x; ix=tx+tw+s; } else { ix=x; tx=x; } } else if(state&RIGHT) { if(state&BEFORE) { tx=x+w-tw; ix=tx-iw-s; } else if (state&AFTER) { ix=x+w-iw; tx=ix-tw-s; } else { ix=x+w-iw; tx=x+w-tw; } } else { if (state&BEFORE) { ix=x+(w-tw-iw-s)/2; tx=ix+iw+s; } else if (state&AFTER) { tx=x+(w-tw-iw-s)/2; ix=tx+tw+s; } else { ix=x+(w-iw)/2; tx=x+(w-tw)/2; } } // Fix y coordinate if(state&TOP) { if (state&ABOVE) { iy=y; ty=iy+ih; } else if (state&BELOW) { ty=y; iy=ty+th; } else { iy=y; ty=y; } } else if(state&BOTTOM) { if (state&ABOVE) { ty=y+h-th; iy=ty-ih; } else if (state&BELOW) { iy=y+h-ih; ty=iy-th; } else { iy=y+h-ih; ty=y+h-th; } } else { if (state&ABOVE) { iy=y+(h-th-ih)/2; ty=iy+ih; } else if (state&BELOW) { ty=y+(h-th-ih)/2; iy=ty+th; } else { iy=y+(h-ih)/2; ty=y+(h-th)/2; } } // Offset a bit when pressed if (state&PRESSED) { tx++; ty++; ix++; iy++; } // Paint icon if (icon) { dc.drawIcon(icon,ix,iy); } // Text color dc.setForeground(header->getTextColor()); // Draw text yy=ty+font->getFontAscent(); beg=0; do { end=beg; while(endgetTextWidth(&label[beg],end-beg); else xx=tx+(tw-font->getTextWidth(&label[beg],end-beg))/2; dc.drawText(xx,yy,&label[beg],end-beg); yy+=font->getFontHeight(); beg=end+1; } while(end /** This header is only needed for the definition of "FOX16GUI_API" which is * used in the declaration of all exported classes and methods. * If you want to use these themed widgets in your own projects you should remove * this include here and all occurrences of "FOX16GUI_API". */ #include #define THEMEBUTTON ThemeButton #define THEMETEXTFIELD ThemeTextField #define THEMECOMBOBOX ThemeComboBox #define THEMELABEL ThemeLabel #define THEMEVERTICALFRAME ThemeVerticalFrame #define THEMEHORIZONTALFRAME ThemeHorizontalFrame #define THEMEMENUBUTTON ThemeMenuButton #define THEMEHEADERITEM ThemeHeaderItem #define THEMETABITEM ThemeTabItem class FOX16GUI_API ThemeButton : public FXButton { FXDECLARE(ThemeButton); protected: ThemeButton() {} public: ThemeButton(FXComposite *p, const FXString &text, FXIcon *ic=NULL, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); long onPaint(FXObject *, FXSelector, void *ptr); }; class FOX16GUI_API ThemeTextField : public FXTextField { FXDECLARE(ThemeTextField); protected: ThemeTextField() {} public: ThemeTextField(FXComposite *p, FXint ncols, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=TEXTFIELD_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); long onPaint(FXObject *, FXSelector, void *ptr); protected: void drawFrame(FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h); }; FOX16GUI_API void init_theme(FXApp *app); class FOX16GUI_API ThemeComboBox : public FXComboBox { FXDECLARE(ThemeComboBox); protected: ThemeComboBox() {} public: ThemeComboBox(FXComposite *p, FXint cols, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=COMBOBOX_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); long onPaint(FXObject *, FXSelector, void *ptr); }; class FOX16GUI_API ThemeLabel : public FXLabel { FXDECLARE(ThemeLabel); protected: ThemeLabel() {} public: ThemeLabel(FXComposite *p, const FXString &text, FXIcon *ic=0, FXuint opts=LABEL_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); long onPaint(FXObject *, FXSelector, void *ptr); }; class FOX16GUI_API ThemeTabItem : public FXTabItem { FXDECLARE(ThemeTabItem); protected: ThemeTabItem() {} public: ThemeTabItem(FXTabBar *p, const FXString &text, FXIcon *ic=0, FXuint opts=TAB_TOP_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); }; class FOX16GUI_API ThemeVerticalFrame : public FXVerticalFrame { protected: ThemeVerticalFrame() {} public: ThemeVerticalFrame(FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING, FXint pb=DEFAULT_SPACING, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING); }; class FOX16GUI_API ThemeHorizontalFrame : public FXHorizontalFrame { protected: ThemeHorizontalFrame() {} public: ThemeHorizontalFrame(FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING, FXint pb=DEFAULT_SPACING, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING); }; class FOX16GUI_API ThemeMenuButton : public FXMenuButton { FXDECLARE(ThemeMenuButton); protected: ThemeMenuButton() {} public: ThemeMenuButton(FXComposite *p, const FXString &text, FXIcon *ic=NULL, FXPopup *pup=NULL, FXuint opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD); long onPaint(FXObject *, FXSelector, void *ptr); FXint getDefaultWidth(); }; class FOX16GUI_API ThemeHeaderItem : public FXHeaderItem { protected: ThemeHeaderItem() {} public: ThemeHeaderItem(const FXString &text, FXIcon *ic=NULL, FXint s=0, void *ptr=NULL); void draw(const FXHeader *header, FXDC &dc, FXint x, FXint y, FXint w, FXint h); }; #endif gwenhywfar-5.12.1/gui/fox16/Makefile.in0000644000175000017500000010104615032533614014502 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = libtest$(EXEEXT) subdir = gui/fox16 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gwengui-fox16.pc CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgwengui_fox16_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la am_libgwengui_fox16_la_OBJECTS = fox16_gui.lo fox16_gui_dialog.lo \ fox16_gui_sortinglist.lo fox16_gui_updater.lo fox16_htmlctx.lo \ fox16_htmllabel.lo fox16_htmltext.lo theme.lo libgwengui_fox16_la_OBJECTS = $(am_libgwengui_fox16_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgwengui_fox16_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libgwengui_fox16_la_LDFLAGS) \ $(LDFLAGS) -o $@ am_libtest_OBJECTS = libtest.$(OBJEXT) libtest_OBJECTS = $(am_libtest_OBJECTS) libtest_DEPENDENCIES = libgwengui-fox16.la $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/fox16_gui.Plo \ ./$(DEPDIR)/fox16_gui_dialog.Plo \ ./$(DEPDIR)/fox16_gui_sortinglist.Plo \ ./$(DEPDIR)/fox16_gui_updater.Plo \ ./$(DEPDIR)/fox16_htmlctx.Plo ./$(DEPDIR)/fox16_htmllabel.Plo \ ./$(DEPDIR)/fox16_htmltext.Plo ./$(DEPDIR)/libtest.Po \ ./$(DEPDIR)/theme.Plo am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgwengui_fox16_la_SOURCES) $(libtest_SOURCES) DIST_SOURCES = $(libgwengui_fox16_la_SOURCES) $(libtest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gwengui-fox16.pc.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DBUILDING_FOX16_GUI -DPACKAGE=\"$(PACKAGE)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) $(fox_includes) -Ihtml \ @visibility_cflags@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-fox16.pc lib_LTLIBRARIES = libgwengui-fox16.la noinst_HEADERS = \ fox16_gui_dialog_l.hpp \ fox16_gui_sortinglist_l.hpp \ fox16_gui_updater_l.hpp \ fox16_htmlctx_p.hpp \ fox16_htmlctx.hpp libgwengui_fox16_la_LIBADD = $(fox_libs) $(top_builddir)/src/$(gwenhywfar_internal_libname) $(top_builddir)/gui/cpp/libgwengui-cpp.la libgwengui_fox16_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_fox16_la_SOURCES = \ fox16_gui.cpp \ fox16_gui_dialog.cpp \ fox16_gui_sortinglist.cpp \ fox16_gui_updater.cpp \ fox16_htmlctx.cpp \ fox16_htmllabel.cpp \ fox16_htmltext.cpp \ theme.cpp iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-fox16 iheader_HEADERS = \ fox16_gui.hpp \ fox16_htmlctx.hpp \ fox16_htmllabel.hpp \ fox16_htmltext.hpp \ theme.h \ api.h libtest_SOURCES = libtest.cpp libtest_LDADD = libgwengui-fox16.la $(fox_libs) $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/fox16/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/fox16/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gwengui-fox16.pc: $(top_builddir)/config.status $(srcdir)/gwengui-fox16.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-fox16.la: $(libgwengui_fox16_la_OBJECTS) $(libgwengui_fox16_la_DEPENDENCIES) $(EXTRA_libgwengui_fox16_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgwengui_fox16_la_LINK) -rpath $(libdir) $(libgwengui_fox16_la_OBJECTS) $(libgwengui_fox16_la_LIBADD) $(LIBS) libtest$(EXEEXT): $(libtest_OBJECTS) $(libtest_DEPENDENCIES) $(EXTRA_libtest_DEPENDENCIES) @rm -f libtest$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libtest_OBJECTS) $(libtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_gui_dialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_gui_sortinglist.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_gui_updater.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_htmlctx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_htmllabel.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fox16_htmltext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theme.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/fox16_gui.Plo -rm -f ./$(DEPDIR)/fox16_gui_dialog.Plo -rm -f ./$(DEPDIR)/fox16_gui_sortinglist.Plo -rm -f ./$(DEPDIR)/fox16_gui_updater.Plo -rm -f ./$(DEPDIR)/fox16_htmlctx.Plo -rm -f ./$(DEPDIR)/fox16_htmllabel.Plo -rm -f ./$(DEPDIR)/fox16_htmltext.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f ./$(DEPDIR)/theme.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iheaderHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/fox16_gui.Plo -rm -f ./$(DEPDIR)/fox16_gui_dialog.Plo -rm -f ./$(DEPDIR)/fox16_gui_sortinglist.Plo -rm -f ./$(DEPDIR)/fox16_gui_updater.Plo -rm -f ./$(DEPDIR)/fox16_htmlctx.Plo -rm -f ./$(DEPDIR)/fox16_htmllabel.Plo -rm -f ./$(DEPDIR)/fox16_htmltext.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f ./$(DEPDIR)/theme.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-iheaderHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/Makefile.am0000644000175000017500000000025213237641474013534 00000000000000SUBDIRS=testdialogs cpp @gwenhywfar_guis@ DIST_SUBDIRS=testdialogs cpp qt4 qt5 fox16 gtk2 gtk3 cocoa sources: for d in $(SUBDIRS); do \ make -C $$d sources; \ done gwenhywfar-5.12.1/gui/qt5/0000755000175000017500000000000015032533716012264 500000000000000gwenhywfar-5.12.1/gui/qt5/w_combobox.cpp0000644000175000017500000001043213412721357015046 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_ComboBox: public Qt5_W_Widget { public: Qt5_W_ComboBox(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_ComboBox() { } virtual int setup() { QComboBox *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QComboBox(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); qw->setEditable((flags & GWEN_WIDGET_FLAGS_READONLY)?false:true); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(activated(int)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QComboBox *qw; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setCurrentIndex(value); return 0; case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QComboBox *qw; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->currentIndex(); case GWEN_DialogProperty_ValueCount: return qw->count(); default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QComboBox *qw; QString text; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Value: // undefined break; case GWEN_DialogProperty_AddValue: qw->addItem(text); return 0; case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QComboBox *qw; QString str; qw=(QComboBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: str=qw->itemText(index); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/gwengui-qt5-config-version.cmake.in0000644000175000017500000000050013142134462020703 00000000000000set(PACKAGE_VERSION "@GWENHYWFAR_VERSION_STRING@") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") set(PACKAGE_VERSION_EXACT TRUE) endif() endif() gwenhywfar-5.12.1/gui/qt5/qt5_gui.cpp0000644000175000017500000001050113412721103014247 00000000000000/*************************************************************************** begin : Mon Mar 01 2004 copyright : (C) 2004-2010 by Martin Preuss (C) 2016 by Christian David email : martin@libchipcard.de christian-david@web.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "qt5_gui.hpp" #include "qt5_gui_dialog.hpp" #include #include #include #include #include QT5_Gui::QT5_Gui() :CppGui() ,_parentWidget(NULL) { GWEN_Gui_AddFlags(_gui, GWEN_GUI_FLAGS_DIALOGSUPPORTED); GWEN_Gui_UseDialogs(_gui); GWEN_Gui_SetName(_gui, "qt5-gui"); } QT5_Gui::~QT5_Gui() { } void QT5_Gui::pushParentWidget(QWidget *w) { if (_parentWidget) _pushedParents.push_back(_parentWidget); _parentWidget=w; } void QT5_Gui::popParentWidget() { if (!_pushedParents.empty()) { _parentWidget=_pushedParents.back(); _pushedParents.pop_back(); } else _parentWidget=NULL; } QString QT5_Gui::extractHtml(const char *text) { QString str = QString::fromUtf8(text); const int start = str.indexOf(QStringLiteral(""), 0, Qt::CaseInsensitive); if (start != -1) { const int end = str.indexOf(QStringLiteral(""), start, Qt::CaseInsensitive); if (end != -1) { return str.mid(start, end+7); } } return str; } int QT5_Gui::execDialog(GWEN_DIALOG *dlg, GWEN_UNUSED uint32_t guiid) { QT5_GuiDialog qt5Dlg(this, dlg); QWidget *owner = qApp->activeWindow(); /* setup widget tree for the dialog */ if (!(qt5Dlg.setup(owner))) { return GWEN_ERROR_GENERIC; } return qt5Dlg.execute(); } int QT5_Gui::openDialog(GWEN_DIALOG *dlg, GWEN_UNUSED uint32_t guiid) { QT5_GuiDialog *qtDlg = new QT5_GuiDialog(this, dlg); QWidget *owner = qApp->activeWindow(); /* setup widget tree for the dialog */ if (!(qtDlg->setup(owner))) { delete qtDlg; return GWEN_ERROR_GENERIC; } return qtDlg->openDialog(); } int QT5_Gui::closeDialog(GWEN_DIALOG *dlg) { QT5_GuiDialog *qtDlg = QT5_GuiDialog::getDialog(dlg); assert(qtDlg); int rv = qtDlg->closeDialog(); delete qtDlg; return rv; } int QT5_Gui::runDialog(GWEN_DIALOG *dlg, int untilEnd) { QT5_GuiDialog *qtDlg = QT5_GuiDialog::getDialog(dlg); assert(qtDlg); return qtDlg->runDialog((untilEnd==0)?false:true); } int QT5_Gui::getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, GWEN_UNUSED uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, GWEN_UNUSED uint32_t guiid) { QString sCaption; QString sPatterns; QString sPath; QString str; QWidget *owner = qApp->activeWindow(); if (caption) sCaption=QString::fromUtf8(caption); if (patterns) { const char *s1; const char *s2; s1=patterns; qDebug("Patterns example: '%s'", patterns); //! @todo Create pattern correctly while(s1 && *s1) { s2=strchr(s1, '\t'); if (s2) { str=QString::fromUtf8(s1, s2-s1); /* skip tab */ s2++; } else { str=QString::fromUtf8(s1); s2=NULL; } str.replace(',', ' '); str.replace(';', ' '); if (!str.isEmpty()) sPatterns+=";;"; sPatterns+=str; s1=s2; } } if (GWEN_Buffer_GetUsedBytes(pathBuffer)) sPath=QString::fromUtf8(GWEN_Buffer_GetStart(pathBuffer)); switch(fnt) { case GWEN_Gui_FileNameType_OpenFileName: str=QFileDialog::getOpenFileName(owner, sCaption, sPath, sPatterns); break; case GWEN_Gui_FileNameType_SaveFileName: str=QFileDialog::getSaveFileName(owner, sCaption, sPath, sPatterns); break; case GWEN_Gui_FileNameType_OpenDirectory: str=QFileDialog::getExistingDirectory(owner, sCaption, sPath); break; } if (str.isEmpty()) { DBG_ERROR(GWEN_LOGDOMAIN, "Empty filename returned."); return GWEN_ERROR_ABORTED; } else { GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, str.toUtf8()); return 0; } } gwenhywfar-5.12.1/gui/qt5/w_tabbook.cpp0000644000175000017500000000367713142134462014667 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_TabBook: public Qt5_W_Widget { public: Qt5_W_TabBook(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_TabBook() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QTabWidget(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_CONTENT, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QTabWidget *qw; QWidget *qChild; const char *s; QString text; qw=(QTabWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (GWEN_Widget_GetType(wChild)!=GWEN_Widget_TypeTabPage) { DBG_ERROR(GWEN_LOGDOMAIN, "You can only add TabPages to a TabBook"); return GWEN_ERROR_INVALID; } qChild=getQWidget(wChild); assert(qChild); s=GWEN_Widget_GetText(wChild, 0); if (s) text=QString::fromUtf8(s); qw->addTab(qChild, text); return 0; } }; gwenhywfar-5.12.1/gui/qt5/qt5dialogbox.hpp0000664000175000017500000000177714460564441015340 00000000000000/*************************************************************************** begin : Tue Feb 16 2010 copyright : (C) 2010 by Martin Preuss (C) 2016 by Christian David email : martin@libchipcard.de christian-david@web.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef QT5_DIALOGBOX_H #define QT5_DIALOGBOX_H #include class QT5_GuiDialog; class QT5_DialogBox: public QDialog { Q_OBJECT public: QT5_DialogBox(QT5_GuiDialog *dialog, QWidget *parent=0, bool modal=false, Qt::WindowFlags f={}); virtual ~QT5_DialogBox(); void accept(); void reject(); int cont(); void closeEvent(QCloseEvent *e); void unlinkFromDialog(); public Q_SLOTS: void slotActivated(); void slotValueChanged(); protected: QT5_GuiDialog *_dialog; }; #endif gwenhywfar-5.12.1/gui/qt5/w_listbox.cpp0000644000175000017500000002006313544121515014717 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_ListBox: public Qt5_W_Widget { public: Qt5_W_ListBox(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_ListBox() { } virtual int setup() { QTreeWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QTreeWidget(); qw->setAllColumnsShowFocus(true); qw->setSortingEnabled(true); qw->setRootIsDecorated(false); qw->setItemsExpandable(false); qw->setSelectionBehavior(QAbstractItemView::SelectRows); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QTreeWidget *qw; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; case GWEN_DialogProperty_Value: { QTreeWidgetItem *item; item=qw->topLevelItem(index); if (item==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Value %d out of range", value); return GWEN_ERROR_INVALID; } qw->setCurrentItem(item); return 0; } case GWEN_DialogProperty_ColumnWidth: qw->setColumnWidth(index, value); return 0; case GWEN_DialogProperty_SelectionMode: switch(value) { case GWEN_Dialog_SelectionMode_None: qw->setSelectionMode(QAbstractItemView::NoSelection); return 0; case GWEN_Dialog_SelectionMode_Single: qw->setSelectionMode(QAbstractItemView::SingleSelection); return 0; case GWEN_Dialog_SelectionMode_Multi: qw->setSelectionMode(QAbstractItemView::ExtendedSelection); return 0; ; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", value); return GWEN_ERROR_INVALID; case GWEN_DialogProperty_SortDirection: switch(value) { case GWEN_DialogSortDirection_None: qw->sortByColumn(-1, Qt::AscendingOrder); break; case GWEN_DialogSortDirection_Up: qw->sortByColumn(index, Qt::AscendingOrder); break; case GWEN_DialogSortDirection_Down: qw->sortByColumn(index, Qt::DescendingOrder); break; } return 0; case GWEN_DialogProperty_Sort: { int c; c=qw->sortColumn(); if (c!=-1) { QHeaderView *h; h=qw->header(); qw->sortItems(c, h->sortIndicatorOrder()); } return 0; } default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QTreeWidget *qw; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: { QTreeWidgetItem *item; int i=-1; item=qw->currentItem(); while(item) { item=qw->itemAbove(item); i++; } return i; } case GWEN_DialogProperty_ColumnWidth: return qw->columnWidth(index); case GWEN_DialogProperty_SelectionMode: switch(qw->selectionMode()) { case QAbstractItemView::NoSelection: return GWEN_Dialog_SelectionMode_None; case QAbstractItemView::SingleSelection: return GWEN_Dialog_SelectionMode_Single; case QAbstractItemView::ExtendedSelection: return GWEN_Dialog_SelectionMode_Multi; default: break; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", qw->selectionMode()); return GWEN_ERROR_INVALID; case GWEN_DialogProperty_SortDirection: if (qw->sortColumn()!=index) return GWEN_DialogSortDirection_None; else { switch(qw->header()->sortIndicatorOrder()) { case Qt::AscendingOrder: return GWEN_DialogSortDirection_Up; case Qt::DescendingOrder: return GWEN_DialogSortDirection_Down; default: return GWEN_DialogSortDirection_None; } } break; default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { QTreeWidget *qw; QString text; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QT5_Gui::extractHtml(value); switch(prop) { case GWEN_DialogProperty_Title: { QString str; QString t; QStringList sl; int n=0; /* remove all columns */ qw->header()->reset(); str=text; while(!(t=str.section('\t', n, n)).isEmpty()) { sl+=t; n++; } qw->setHeaderLabels(sl); return 0; } case GWEN_DialogProperty_ClearValues: qw->clear(); return 0; case GWEN_DialogProperty_AddValue: { QString str; QString t; int n=0; QStringList sl; /*QTreeWidgetItem *item;*/ str=text; while(!(t=str.section('\t', n, n)).isEmpty()) { sl+=t; n++; } /*item=*/new QTreeWidgetItem(qw, sl); return 0; } default: return Qt5_W_Widget::setCharProperty(prop, index, value, doSignal); } }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { QTreeWidget *qw; QString str; qw=(QTreeWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: { QTreeWidgetItem *item; item=qw->headerItem(); if (item) { int i; for (i=0; icolumnCount(); i++) { if (i) str+='\t'; str+=item->text(i); } if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } } return defaultValue; } case GWEN_DialogProperty_Value: { QTreeWidgetItem *item; int i; item=qw->topLevelItem(index); if (item==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "Value %d out of range", index); return defaultValue; } for (i=0; icolumnCount(); i++) { if (i) str+='\t'; str+=item->text(i); } if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_VALUE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_VALUE); } } default: return Qt5_W_Widget::getCharProperty(prop, index, defaultValue); } }; }; gwenhywfar-5.12.1/gui/qt5/w_checkbox.cpp0000644000175000017500000001006513412721373015024 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_CheckBox: public Qt5_W_Widget { public: Qt5_W_CheckBox(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_CheckBox() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QCheckBox(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(toggled(bool)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QCheckBox *qw; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setChecked((value==0)?false:true); return 0; default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QCheckBox *qw; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return (qw->isChecked())?1:0; default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QCheckBox *qw; QString text; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QCheckBox *qw; QString str; qw=(QCheckBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/w_spinbox.cpp0000644000175000017500000000526513142134462014723 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_SpinBox: public Qt5_W_Widget { public: Qt5_W_SpinBox(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_SpinBox() { } virtual int setup() { QSpinBox *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QSpinBox(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(valueChanged(int)), qtDialog->getMainWindow(), SLOT(slotValueChanged())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QSpinBox *qw; qw=(QSpinBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setValue(value); return 0; case GWEN_DialogProperty_MinValue: qw->setMinimum(value); return 0; case GWEN_DialogProperty_MaxValue: qw->setMaximum(value); return 0; default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QSpinBox *qw; qw=(QSpinBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->value(); case GWEN_DialogProperty_MinValue: return qw->minimum(); case GWEN_DialogProperty_MaxValue: return qw->maximum(); default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; }; gwenhywfar-5.12.1/gui/qt5/qt5dialogbox.cpp0000644000175000017500000001231513142134462015307 00000000000000/*************************************************************************** begin : Tue Feb 16 2010 copyright : (C) 2010 by Martin Preuss (C) 2016 by Christian David email : martin@libchipcard.de christian-david@web.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "qt5dialogbox.hpp" #include "qt5_gui_dialog.hpp" #include #include QT5_DialogBox::QT5_DialogBox(QT5_GuiDialog *dialog, QWidget *parent, bool modal, Qt::WindowFlags f) :QDialog(parent, f) ,_dialog(dialog) { setModal(modal); } QT5_DialogBox::~QT5_DialogBox() { } void QT5_DialogBox::accept() { QDialog::accept(); } void QT5_DialogBox::reject() { QDialog::reject(); } int QT5_DialogBox::cont() { return exec(); } void QT5_DialogBox::closeEvent(QCloseEvent *e) { if (_dialog) { int rv; rv=GWEN_Dialog_EmitSignal(_dialog->getCInterface(), GWEN_DialogEvent_TypeClose, ""); if (rv!=GWEN_DialogEvent_ResultReject) { e->accept(); } } else { e->accept(); } } void QT5_DialogBox::unlinkFromDialog() { _dialog=NULL; } void QT5_DialogBox::slotActivated() { const QObject *snd; snd=sender(); if (snd) { GWEN_WIDGET *w; const char *wname; int rv=GWEN_DialogEvent_ResultNotHandled; w=GWEN_Dialog_FindWidgetByImplData(_dialog->getCInterface(), QT5_DIALOG_WIDGET_REAL, snd); if (w==NULL) { DBG_INFO(0, "Widget not found"); return; } wname=GWEN_Widget_GetName(w); DBG_INFO(GWEN_LOGDOMAIN, "Command for [%s] (type: %s)", wname?wname:"(unnamed)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: break; case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeLabel: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeSpinBox: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: /* nothing to do for these types */ ; } if (rv==GWEN_DialogEvent_ResultAccept) { accept(); } else if (rv==GWEN_DialogEvent_ResultReject) { reject(); } } } void QT5_DialogBox::slotValueChanged() { const QObject *snd; snd=sender(); if (snd) { GWEN_WIDGET *w; const char *wname; int rv=GWEN_DialogEvent_ResultNotHandled; w=GWEN_Dialog_FindWidgetByImplData(_dialog->getCInterface(), QT5_DIALOG_WIDGET_REAL, snd); if (w==NULL) { DBG_INFO(0, "Widget not found"); return; } wname=GWEN_Widget_GetName(w); DBG_INFO(GWEN_LOGDOMAIN, "ValueChanged for [%s] (type: %s)", wname?wname:"(unnamed)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeUnknown: case GWEN_Widget_TypeNone: break; case GWEN_Widget_TypePushButton: case GWEN_Widget_TypeLineEdit: case GWEN_Widget_TypeComboBox: case GWEN_Widget_TypeListBox: case GWEN_Widget_TypeCheckBox: case GWEN_Widget_TypeLabel: case GWEN_Widget_TypeTextEdit: case GWEN_Widget_TypeSpinBox: rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); break; case GWEN_Widget_TypeRadioButton: case GWEN_Widget_TypeProgressBar: case GWEN_Widget_TypeGroupBox: case GWEN_Widget_TypeHSpacer: case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHLayout: case GWEN_Widget_TypeVLayout: case GWEN_Widget_TypeGridLayout: case GWEN_Widget_TypeDialog: case GWEN_Widget_TypeTabBook: case GWEN_Widget_TypeTabPage: case GWEN_Widget_TypeScrollArea: case GWEN_Widget_TypeWidgetStack: case GWEN_Widget_TypeHLine: case GWEN_Widget_TypeVLine: case GWEN_Widget_TypeTextBrowser: /* nothing to do for these types */ ; } if (rv==GWEN_DialogEvent_ResultAccept) { accept(); } else if (rv==GWEN_DialogEvent_ResultReject) { reject(); } } } #include "qt5dialogbox.moc" gwenhywfar-5.12.1/gui/qt5/qt5_gui.hpp0000664000175000017500000000373314460564441014305 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss (C) 2016 by Christian David email : martin@libchipcard.de christian-david@web.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef QT5_GUI_H #define QT5_GUI_H #if (defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || defined _MSC_VER # ifdef BUILDING_QT5_GUI # define QT5GUI_API __attribute__ ((visibility("default"))) # else # define QT5GUI_API # endif #else # define QT5GUI_API #endif class QT5_Gui; class QWidget; #include #include /** * This is an implementation of GWEN_GUI for QT5. * * It implements the GWEN_DIALOG framework. * * @todo: @ref GWEN_Gui_Print() needs to be implemented */ class QT5GUI_API QT5_Gui: public CppGui { private: QWidget *_parentWidget; std::list _pushedParents; public: QT5_Gui(); virtual ~QT5_Gui(); QWidget *getParentWidget() const { return _parentWidget;}; void pushParentWidget(QWidget *w); void popParentWidget(); static QString extractHtml(const char *text); protected: /** @name User Interaction * */ /*@{*/ virtual int execDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int openDialog(GWEN_DIALOG *dlg, uint32_t guiid); virtual int closeDialog(GWEN_DIALOG *dlg); virtual int runDialog(GWEN_DIALOG *dlg, int untilEnd); virtual int getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); }; #endif gwenhywfar-5.12.1/gui/qt5/w_widget.cpp0000644000175000017500000001012013412721470014507 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_Widget: public CppWidget { public: Qt5_W_Widget(GWEN_WIDGET *w):CppWidget(w) { } ~Qt5_W_Widget() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_CONTENT, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } static QWidget *getQWidget(GWEN_WIDGET *w) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(w, QT5_DIALOG_WIDGET_REAL); assert(qw); return qw; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Width: qw->resize(value, qw->height()); return 0; case GWEN_DialogProperty_Height: qw->resize(qw->width(), value); return 0; case GWEN_DialogProperty_Enabled: qw->setEnabled((value==0)?false:true); return 0; case GWEN_DialogProperty_Focus: qw->setFocus(); return 0; case GWEN_DialogProperty_Visibility: if (value==0) qw->hide(); else qw->show(); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Width: return qw->width(); case GWEN_DialogProperty_Height: return qw->height(); case GWEN_DialogProperty_Enabled: return (qw->isEnabled())?1:0; case GWEN_DialogProperty_Focus: return (qw->hasFocus())?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; int setCharProperty(GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/w_radiobutton.cpp0000644000175000017500000001013613412721430015561 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_RadioButton: public Qt5_W_Widget { public: Qt5_W_RadioButton(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_RadioButton() { } virtual int setup() { QRadioButton *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QRadioButton(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(toggled(bool)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QRadioButton *qw; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setChecked((value==0)?false:true); return 0; default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QRadioButton *qw; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return (qw->isChecked())?1:0; default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QRadioButton *qw; QString text; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QRadioButton *qw; QString str; qw=(QRadioButton*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/w_gridlayout.cpp0000644000175000017500000000453213142134462015420 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_GridLayout: public Qt5_W_Widget { public: Qt5_W_GridLayout(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_GridLayout() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); qLayout=new QGridLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QGridLayout *qLayout; QWidget *qChild; GWEN_WIDGET *wt; int idx=0; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QGridLayout*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); /* get position of the child widget below myself */ wt=GWEN_Widget_Tree_GetFirstChild(_widget); while(wt && wt!=wChild) { idx++; wt=GWEN_Widget_Tree_GetNext(wt); } if (wt) { int x=0, y=0; int c; if ((c=GWEN_Widget_GetColumns(_widget))) { x=idx % c; y=idx / c; } else if ((c=GWEN_Widget_GetRows(_widget))) { x=idx / c; y=idx % c ; } qLayout->addWidget(qChild, y, x); } return 0; } }; gwenhywfar-5.12.1/gui/qt5/w_dialog.cpp0000644000175000017500000000660513412721475014505 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ class Qt5_W_Dialog: public Qt5_W_Widget { public: Qt5_W_Dialog(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_Dialog() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QT5_DialogBox(dynamic_cast(getDialog()), QApplication::activeModalWidget()); qLayout=new QVBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QT5_DialogBox*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QWidget *qw; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: qw->setWindowTitle(QString::fromUtf8(value)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QWidget *qw; QString str; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->windowTitle(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/w_widgetstack.cpp0000644000175000017500000000475513142134462015555 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_WidgetStack: public Qt5_W_Widget { public: Qt5_W_WidgetStack(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_WidgetStack() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QStackedWidget(); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QStackedWidget *qw; qw=(QStackedWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setCurrentIndex(value); return 0; default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QStackedWidget *qw; qw=(QStackedWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->currentIndex(); default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; int addChildGuiWidget(GWEN_WIDGET *wChild) { QStackedWidget *qw; QWidget *qChild; qw=(QStackedWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qChild=getQWidget(wChild); assert(qChild); qw->addWidget(qChild); return 0; }; }; gwenhywfar-5.12.1/gui/qt5/qt5_gui_dialog.hpp0000666000175000017500000000433513555674705015636 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss (C) 2016 by Christian David email : martin@libchipcard.de christian-david@web.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef QT5_DIALOG_HPP #define QT5_DIALOG_HPP #include #include #include #include #include "qt5_gui.hpp" #include #include class QT5_DialogBox; #define QT5_DIALOG_WIDGET_REAL 0 #define QT5_DIALOG_WIDGET_CONTENT 1 #define QT5_DIALOG_WIDGET_LAYOUT 2 class QT5GUI_API QT5_GuiDialog: public CppDialog { public: QT5_GuiDialog(QT5_Gui *gui, GWEN_DIALOG *dlg); virtual ~QT5_GuiDialog(); static QT5_GuiDialog *getDialog(GWEN_DIALOG *dlg); bool setup(QWidget *parentWindow); int execute(); int openDialog(); int closeDialog(); int runDialog(bool untilEnd); QT5_DialogBox *getMainWindow() { return _mainWidget;}; protected: QT5_Gui *_gui; int _widgetCount; QT5_DialogBox *_mainWidget; int setupTree(GWEN_WIDGET *w); virtual int setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); virtual int getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); virtual int setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); virtual const char *getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); }; #endif gwenhywfar-5.12.1/gui/qt5/w_hlayout.cpp0000644000175000017500000000355113142134462014722 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_HLayout: public Qt5_W_Widget { public: Qt5_W_HLayout(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_HLayout() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); qLayout=new QHBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; } }; gwenhywfar-5.12.1/gui/qt5/w_vline.cpp0000644000175000017500000000274113142134462014352 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_VLine: public Qt5_W_Widget { public: Qt5_W_VLine(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_VLine() { } virtual int setup() { QFrame *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QFrame(); qw->setFrameShape(QFrame::VLine); qw->setFrameShadow(QFrame::Sunken); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } }; gwenhywfar-5.12.1/gui/qt5/qt5_gui_dialog.cpp0000644000175000017500000002072213412721436015605 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include "qt5_gui_dialog.hpp" #include "qt5dialogbox.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define QT5_DIALOG_STRING_TITLE 0 #define QT5_DIALOG_STRING_VALUE 1 #include "w_widget.cpp" #include "w_dialog.cpp" #include "w_vlayout.cpp" #include "w_hlayout.cpp" #include "w_gridlayout.cpp" #include "w_label.cpp" #include "w_lineedit.cpp" #include "w_pushbutton.cpp" #include "w_hline.cpp" #include "w_vline.cpp" #include "w_textedit.cpp" #include "w_combobox.cpp" #include "w_tabbook.cpp" #include "w_checkbox.cpp" #include "w_groupbox.cpp" #include "w_widgetstack.cpp" #include "w_textbrowser.cpp" #include "w_scrollarea.cpp" #include "w_progressbar.cpp" #include "w_listbox.cpp" #include "w_radiobutton.cpp" #include "w_spinbox.cpp" QT5_GuiDialog::QT5_GuiDialog(QT5_Gui *gui, GWEN_DIALOG *dlg) :CppDialog(dlg) ,_gui(gui) ,_mainWidget(NULL) { } QT5_GuiDialog::~QT5_GuiDialog() { if (_mainWidget) _mainWidget->unlinkFromDialog(); } QT5_GuiDialog *QT5_GuiDialog::getDialog(GWEN_DIALOG *dlg) { CppDialog *cppDlg; cppDlg=CppDialog::getDialog(dlg); if (cppDlg) return dynamic_cast(cppDlg); return NULL; } int QT5_GuiDialog::execute() { QT5_DialogBox *dialogBox; int rv; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } /* execute dialog */ rv=dialogBox->exec(); GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); if (rv==QT5_DialogBox::Accepted) { /* accepted */ return 1; } else return 0; } int QT5_GuiDialog::openDialog() { QT5_DialogBox *dialogBox; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } /* show dialog */ dialogBox->show(); /* gui update */ qApp->processEvents(); return 0; } int QT5_GuiDialog::closeDialog() { QT5_DialogBox *dialogBox; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } /* let dialog write its settings */ GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeFini, ""); /* hide dialog */ dialogBox->hide(); /* gui update */ qApp->processEvents(); delete _mainWidget; _mainWidget=NULL; return 0; } int QT5_GuiDialog::runDialog(bool untilEnd) { QT5_DialogBox *dialogBox; dialogBox=dynamic_cast(getMainWindow()); if (dialogBox==NULL) { DBG_INFO(0, "Dialog's main widget is not derived from class FXDialogBox"); return GWEN_ERROR_GENERIC; } if (untilEnd) { dialogBox->cont(); } else { { /* gui update */ qApp->processEvents(); } } return 0; } int QT5_GuiDialog::setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { return GWEN_Widget_SetIntProperty(w, prop, index, value, doSignal); } int QT5_GuiDialog::getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { return GWEN_Widget_GetIntProperty(w, prop, index, defaultValue); } int QT5_GuiDialog::setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { return GWEN_Widget_SetCharProperty(w, prop, index, value, doSignal); } const char *QT5_GuiDialog::getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { return GWEN_Widget_GetCharProperty(w, prop, index, defaultValue); } int QT5_GuiDialog::setupTree(GWEN_WIDGET *w) { int rv; Qt5_W_Widget *xw=NULL; switch(GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: xw=new Qt5_W_Dialog(w); break; case GWEN_Widget_TypeVLayout: xw=new Qt5_W_VLayout(w); break; case GWEN_Widget_TypeHLayout: xw=new Qt5_W_HLayout(w); break; case GWEN_Widget_TypeGridLayout: xw=new Qt5_W_GridLayout(w); break; case GWEN_Widget_TypeLabel: xw=new Qt5_W_Label(w); break; case GWEN_Widget_TypeLineEdit: xw=new Qt5_W_LineEdit(w); break; case GWEN_Widget_TypeVSpacer: case GWEN_Widget_TypeHSpacer: /* abuse widget */ xw=new Qt5_W_Widget(w); break; case GWEN_Widget_TypePushButton: xw=new Qt5_W_PushButton(w); break; case GWEN_Widget_TypeHLine: xw=new Qt5_W_HLine(w); break; case GWEN_Widget_TypeVLine: xw=new Qt5_W_VLine(w); break; case GWEN_Widget_TypeTextEdit: xw=new Qt5_W_TextEdit(w); break; case GWEN_Widget_TypeComboBox: xw=new Qt5_W_ComboBox(w); break; case GWEN_Widget_TypeTabBook: xw=new Qt5_W_TabBook(w); break; case GWEN_Widget_TypeTabPage: xw=new Qt5_W_VLayout(w); break; case GWEN_Widget_TypeCheckBox: xw=new Qt5_W_CheckBox(w); break; case GWEN_Widget_TypeGroupBox: xw=new Qt5_W_GroupBox(w); break; case GWEN_Widget_TypeWidgetStack: xw=new Qt5_W_WidgetStack(w); break; case GWEN_Widget_TypeTextBrowser: xw=new Qt5_W_TextBrowser(w); break; case GWEN_Widget_TypeScrollArea: xw=new Qt5_W_ScrollArea(w); break; case GWEN_Widget_TypeProgressBar: xw=new Qt5_W_ProgressBar(w); break; case GWEN_Widget_TypeListBox: xw=new Qt5_W_ListBox(w); break; case GWEN_Widget_TypeRadioButton: xw=new Qt5_W_RadioButton(w); break; case GWEN_Widget_TypeSpinBox: xw=new Qt5_W_SpinBox(w); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unhandled widget type %d (%s)", GWEN_Widget_GetType(w), GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); break; } if (xw==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget created."); return GWEN_ERROR_INTERNAL; } rv=xw->setup(); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_WIDGET *wChild; if (GWEN_Widget_GetType(w)==GWEN_Widget_TypeDialog) _mainWidget=(QT5_DialogBox*) GWEN_Widget_GetImplData(xw->getCInterface(), QT5_DIALOG_WIDGET_REAL); /* handle children */ wChild=GWEN_Widget_Tree_GetFirstChild(w); while(wChild) { /* recursion */ rv=setupTree(wChild); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } wChild=GWEN_Widget_Tree_GetNext(wChild); } } return 0; } bool QT5_GuiDialog::setup(GWEN_UNUSED QWidget *parentWindow) { GWEN_WIDGET_TREE *wtree; GWEN_WIDGET *w; int rv; wtree=GWEN_Dialog_GetWidgets(_dialog); if (wtree==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget tree in dialog"); return false; } w=GWEN_Widget_Tree_GetFirst(wtree); if (w==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widgets in dialog"); return false; } rv=setupTree(w); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "here (%d)", rv); return false; } _mainWidget=(QT5_DialogBox*) GWEN_Widget_GetImplData(w, QT5_DIALOG_WIDGET_REAL); rv=GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeInit, ""); if (rv<0) { DBG_INFO(0, "Error initializing dialog: %d", rv); return false; } return true; } gwenhywfar-5.12.1/gui/qt5/gwengui-qt6-config-version.cmake.in0000644000175000017500000000050013142134462020704 00000000000000set(PACKAGE_VERSION "@GWENHYWFAR_VERSION_STRING@") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") set(PACKAGE_VERSION_EXACT TRUE) endif() endif() gwenhywfar-5.12.1/gui/qt5/w_vlayout.cpp0000644000175000017500000000355213142134462014741 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_VLayout: public Qt5_W_Widget { public: Qt5_W_VLayout(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_VLayout() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QWidget(); qLayout=new QVBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; }; }; gwenhywfar-5.12.1/gui/qt5/gwengui-qt5.pc.in0000644000175000017500000000116215032533366015312 00000000000000# pkg-config configuration for gwengui_qt@QT_MAJOR_VERSION@ # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@includedir@/gwenhywfar datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Human-readable name Name: gwengui-qt@QT_MAJOR_VERSION@ # Human-readable description Description: Qt@QT_MAJOR_VERSION@ Implementation of the GWEN_DIALOG framework. Version: @VERSION@ Libs: -L@libdir@ -lgwengui-qt@QT_MAJOR_VERSION@ -lgwengui-cpp Cflags: -I@includedir@ gwenhywfar-5.12.1/gui/qt5/w_textedit.cpp0000644000175000017500000000666313544121462015100 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_TextEdit: public Qt5_W_Widget { public: Qt5_W_TextEdit(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_TextEdit() { } virtual int setup() { QTextEdit *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; /*QT5_GuiDialog *qtDialog;*/ flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QTextEdit(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); #if 0 /** * @todo This does not work because QTextEdit has no signal "returnPressed" (by default). * It never had it in Qt4 so deactivting this does not change the behaviour. Maybe it should be * enabled in future? */ qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(returnPressed()), qtDialog->getMainWindow(), SLOT(slotActivated())); #endif if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QTextEdit *qw; QString text; qw=(QTextEdit*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Value: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QTextEdit *qw; QString str; qw=(QTextEdit*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: str=qw->toPlainText(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/gwengui-qt5-config.cmake.in0000644000175000017500000000375415032533366017244 00000000000000 # Macros cmake's CONFIGURE_PACKAGE_CONFIG_FILE() would create macro(set_and_check _var _file) set(${_var} "${_file}") if(NOT EXISTS "${_file}") message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") endif() endmacro() macro(check_required_components _NAME) foreach(comp ${${_NAME}_FIND_COMPONENTS}) if(NOT ${_NAME}_${comp}_FOUND) if(${_NAME}_FIND_REQUIRED_${comp}) set(${_NAME}_FOUND FALSE) endif() endif() endforeach() endmacro() include(CMakeFindDependencyMacro) find_dependency(gwengui-cpp "@GWENHYWFAR_VERSION_STRING@") find_dependency(Qt@QT_MAJOR_VERSION@Core) find_dependency(Qt@QT_MAJOR_VERSION@Widgets) set_and_check(prefix "@prefix@") set_and_check(exec_prefix "@exec_prefix@") set_and_check(includedir "@includedir@") set_and_check(${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS "@gwenhywfar_headerdir@") if(WIN32) set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt@QT_MAJOR_VERSION@.dll.a") elseif(APPLE) set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt@QT_MAJOR_VERSION@.dylib") else() set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt@QT_MAJOR_VERSION@.so") endif() set(${CMAKE_FIND_PACKAGE_NAME}_FOUND true) if(NOT TARGET gwenhywfar::gui-qt@QT_MAJOR_VERSION@) add_library(gwenhywfar::gui-qt@QT_MAJOR_VERSION@ UNKNOWN IMPORTED) set_target_properties(gwenhywfar::gui-qt@QT_MAJOR_VERSION@ PROPERTIES IMPORTED_LOCATION "${${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "gwenhywfar::core;gwenhywfar::gui-cpp;Qt@QT_MAJOR_VERSION@::Core;Qt@QT_MAJOR_VERSION@::Widgets" ) endif() set(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "${${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES};gwenhywfar::core;gwenhywfar::gui-cpp") mark_as_advanced( ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS) gwenhywfar-5.12.1/gui/qt5/Makefile.in0000644000175000017500000010653215032533614014255 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = libtest$(EXEEXT) subdir = gui/qt5 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gwengui-qt5.pc gwengui-qt5-config.cmake \ gwengui-qt5-config-version.cmake gwengui-qt6.pc \ gwengui-qt6-config.cmake gwengui-qt6-config-version.cmake CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakeconfigdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgwengui_qt@QT_MAJOR_VERSION@_la_DEPENDENCIES = \ $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../cpp/libgwengui-cpp.la am_libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS = qt5dialogbox.lo \ qt5_gui.lo qt5_gui_dialog.lo nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS = libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS = \ $(am_libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS) \ $(nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgwengui_qt@QT_MAJOR_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(libgwengui_qt@QT_MAJOR_VERSION@_la_LDFLAGS) $(LDFLAGS) -o $@ am_libtest_OBJECTS = libtest.$(OBJEXT) libtest_OBJECTS = $(am_libtest_OBJECTS) libtest_DEPENDENCIES = libgwengui-qt@QT_MAJOR_VERSION@.la \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(am__DEPENDENCIES_1) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libtest.Po ./$(DEPDIR)/qt5_gui.Plo \ ./$(DEPDIR)/qt5_gui_dialog.Plo ./$(DEPDIR)/qt5dialogbox.Plo am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) \ $(nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) \ $(libtest_SOURCES) DIST_SOURCES = $(libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) \ $(libtest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(cmakeconfig_DATA) $(pkgconfig_DATA) HEADERS = $(iheader_HEADERS) $(nodist_noinst_HEADERS) \ $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/gwengui-qt5-config-version.cmake.in \ $(srcdir)/gwengui-qt5-config.cmake.in \ $(srcdir)/gwengui-qt5.pc.in \ $(srcdir)/gwengui-qt6-config-version.cmake.in \ $(srcdir)/gwengui-qt6-config.cmake.in \ $(srcdir)/gwengui-qt6.pc.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DBUILDING_QT5_GUI DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = @visibility_cflags@ @QT_CXXFLAGS@ -I$(gwenhywfar_symlinkdir) $(QT_CXXFLAGS) qt5_moc = @QT_MOC@ qt5_uic = @QT_UIC@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-qt@QT_MAJOR_VERSION@.pc cmakeconfigdir = $(libdir)/cmake/gwengui-qt@QT_MAJOR_VERSION@-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwengui-qt@QT_MAJOR_VERSION@-config.cmake gwengui-qt@QT_MAJOR_VERSION@-config-version.cmake lib_LTLIBRARIES = libgwengui-qt@QT_MAJOR_VERSION@.la noinst_HEADERS = libgwengui_qt@QT_MAJOR_VERSION@_la_LIBADD = $(QT_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) $(builddir)/../cpp/libgwengui-cpp.la libgwengui_qt@QT_MAJOR_VERSION@_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES = \ qt5dialogbox.cpp \ qt5_gui.cpp \ qt5_gui_dialog.cpp nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES = nodist_noinst_HEADERS = iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-qt5 iheader_HEADERS = \ qt5_gui.hpp \ qt5_gui_dialog.hpp \ qt5dialogbox.hpp MOC_FILES = \ qt5dialogbox.moc UI_FILES = EXTRA_DIST = $(UI_FILES) \ w_widget.cpp \ w_dialog.cpp \ w_vlayout.cpp \ w_hlayout.cpp \ w_gridlayout.cpp \ w_label.cpp \ w_lineedit.cpp \ w_pushbutton.cpp \ w_hline.cpp \ w_vline.cpp \ w_textedit.cpp \ w_combobox.cpp \ w_tabbook.cpp \ w_checkbox.cpp \ w_groupbox.cpp \ w_widgetstack.cpp \ w_textbrowser.cpp \ w_scrollarea.cpp \ w_progressbar.cpp \ w_listbox.cpp \ w_radiobutton.cpp \ w_spinbox.cpp libtest_SOURCES = libtest.cpp libtest_LDADD = libgwengui-qt@QT_MAJOR_VERSION@.la $(top_builddir)/src/$(gwenhywfar_internal_libname) $(QT_LIBS) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la SUFFIXES = .ui .ui.hpp .ui.cpp .moc BUILT_SOURCES = $(MOC_FILES) $(nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) CLEANFILES = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .ui .ui.hpp .ui.cpp .moc .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/qt5/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/qt5/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gwengui-qt5.pc: $(top_builddir)/config.status $(srcdir)/gwengui-qt5.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt5-config.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-qt5-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt5-config-version.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-qt5-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt6.pc: $(top_builddir)/config.status $(srcdir)/gwengui-qt6.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt6-config.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-qt6-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gwengui-qt6-config-version.cmake: $(top_builddir)/config.status $(srcdir)/gwengui-qt6-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-qt@QT_MAJOR_VERSION@.la: $(libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS) $(libgwengui_qt@QT_MAJOR_VERSION@_la_DEPENDENCIES) $(EXTRA_libgwengui_qt@QT_MAJOR_VERSION@_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgwengui_qt@QT_MAJOR_VERSION@_la_LINK) -rpath $(libdir) $(libgwengui_qt@QT_MAJOR_VERSION@_la_OBJECTS) $(libgwengui_qt@QT_MAJOR_VERSION@_la_LIBADD) $(LIBS) libtest$(EXEEXT): $(libtest_OBJECTS) $(libtest_DEPENDENCIES) $(EXTRA_libtest_DEPENDENCIES) @rm -f libtest$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libtest_OBJECTS) $(libtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt5_gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt5_gui_dialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt5dialogbox.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-cmakeconfigDATA: $(cmakeconfig_DATA) @$(NORMAL_INSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cmakeconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cmakeconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakeconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakeconfigdir)" || exit $$?; \ done uninstall-cmakeconfigDATA: @$(NORMAL_UNINSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(cmakeconfigdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakeconfigdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libtest.Po -rm -f ./$(DEPDIR)/qt5_gui.Plo -rm -f ./$(DEPDIR)/qt5_gui_dialog.Plo -rm -f ./$(DEPDIR)/qt5dialogbox.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-cmakeconfigDATA install-iheaderHEADERS \ install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libtest.Po -rm -f ./$(DEPDIR)/qt5_gui.Plo -rm -f ./$(DEPDIR)/qt5_gui_dialog.Plo -rm -f ./$(DEPDIR)/qt5dialogbox.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-cmakeconfigDATA uninstall-iheaderHEADERS \ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-cmakeconfigDATA install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-iheaderHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-cmakeconfigDATA \ uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .PRECIOUS: Makefile %.moc: %.hpp $(qt5_moc) -o $@ $< %.ui.hpp: %.ui $(qt5_uic) $< -o $@ sources: for f in $(libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) $(foreach uifile,$(UI_FILES),$(uifile).cpp); do \ echo $(subdir)/$$f >>$(top_srcdir)/qtsources; \ done for d in $(SUBDIRS); do \ $(MAKE) -C $$d sources; \ done built_sources: $(BUILT_SOURCES) for d in $(SUBDIRS); do \ $(MAKE) -C $$d built_sources; \ done ; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/qt5/w_scrollarea.cpp0000644000175000017500000000406613142134462015366 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_ScrollArea: public Qt5_W_Widget { public: Qt5_W_ScrollArea(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_ScrollArea() { } virtual int setup() { QScrollArea *qw; QWidget *qChild; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; QLayout *qLayout; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QScrollArea(); qChild=new QWidget(); qChild->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); qw->setWidget(qChild); qLayout=new QVBoxLayout(qChild); qw->setWidgetResizable(true); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; }; }; gwenhywfar-5.12.1/gui/qt5/w_hline.cpp0000644000175000017500000000274113142134462014334 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_HLine: public Qt5_W_Widget { public: Qt5_W_HLine(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_HLine() { } virtual int setup() { QFrame *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QFrame(); qw->setFrameShape(QFrame::HLine); qw->setFrameShadow(QFrame::Sunken); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } }; gwenhywfar-5.12.1/gui/qt5/w_pushbutton.cpp0000644000175000017500000000627313412721324015453 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_PushButton: public Qt5_W_Widget { public: Qt5_W_PushButton(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_PushButton() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QPushButton(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(clicked(bool)), qtDialog->getMainWindow(), SLOT(slotActivated())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QPushButton *qw; QString text; qw=(QPushButton*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QPushButton *qw; QString str; qw=(QPushButton*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/Makefile.am0000644000175000017500000000462215032533366014245 00000000000000AM_CPPFLAGS= @visibility_cflags@ @QT_CXXFLAGS@ -I$(gwenhywfar_symlinkdir) $(QT_CXXFLAGS) DEFS=-DBUILDING_QT5_GUI qt5_moc = @QT_MOC@ qt5_uic = @QT_UIC@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-qt@QT_MAJOR_VERSION@.pc cmakeconfigdir = $(libdir)/cmake/gwengui-qt@QT_MAJOR_VERSION@-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwengui-qt@QT_MAJOR_VERSION@-config.cmake gwengui-qt@QT_MAJOR_VERSION@-config-version.cmake lib_LTLIBRARIES=libgwengui-qt@QT_MAJOR_VERSION@.la noinst_PROGRAMS=libtest noinst_HEADERS= libgwengui_qt@QT_MAJOR_VERSION@_la_LIBADD=$(QT_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) $(builddir)/../cpp/libgwengui-cpp.la libgwengui_qt@QT_MAJOR_VERSION@_la_LDFLAGS=-no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES=\ qt5dialogbox.cpp \ qt5_gui.cpp \ qt5_gui_dialog.cpp nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES= nodist_noinst_HEADERS= iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-qt5 iheader_HEADERS=\ qt5_gui.hpp \ qt5_gui_dialog.hpp \ qt5dialogbox.hpp MOC_FILES=\ qt5dialogbox.moc UI_FILES= EXTRA_DIST=$(UI_FILES) \ w_widget.cpp \ w_dialog.cpp \ w_vlayout.cpp \ w_hlayout.cpp \ w_gridlayout.cpp \ w_label.cpp \ w_lineedit.cpp \ w_pushbutton.cpp \ w_hline.cpp \ w_vline.cpp \ w_textedit.cpp \ w_combobox.cpp \ w_tabbook.cpp \ w_checkbox.cpp \ w_groupbox.cpp \ w_widgetstack.cpp \ w_textbrowser.cpp \ w_scrollarea.cpp \ w_progressbar.cpp \ w_listbox.cpp \ w_radiobutton.cpp \ w_spinbox.cpp libtest_SOURCES=libtest.cpp libtest_LDADD=libgwengui-qt@QT_MAJOR_VERSION@.la $(top_builddir)/src/$(gwenhywfar_internal_libname) $(QT_LIBS) \ $(top_builddir)/gui/cpp/libgwengui-cpp.la \ $(builddir)/../testdialogs/libgwengui-test.la SUFFIXES = .ui .ui.hpp .ui.cpp .moc %.moc: %.hpp $(qt5_moc) -o $@ $< %.ui.hpp: %.ui $(qt5_uic) $< -o $@ sources: for f in $(libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) $(foreach uifile,$(UI_FILES),$(uifile).cpp); do \ echo $(subdir)/$$f >>$(top_srcdir)/qtsources; \ done for d in $(SUBDIRS); do \ $(MAKE) -C $$d sources; \ done built_sources: $(BUILT_SOURCES) for d in $(SUBDIRS); do \ $(MAKE) -C $$d built_sources; \ done ; BUILT_SOURCES = $(MOC_FILES) $(nodist_libgwengui_qt@QT_MAJOR_VERSION@_la_SOURCES) CLEANFILES = $(BUILT_SOURCES) gwenhywfar-5.12.1/gui/qt5/w_label.cpp0000644000175000017500000000571013412721267014320 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_Label: public Qt5_W_Widget { public: Qt5_W_Label(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_Label() { } virtual int setup() { QLabel *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QT5_Gui::extractHtml(s); qw=new QLabel(text); qw->setWordWrap(true); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QLabel *qw; QString text; qw=(QLabel*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QT5_Gui::extractHtml(value); switch(prop) { case GWEN_DialogProperty_Title: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QLabel *qw; QString str; qw=(QLabel*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Title: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/w_progressbar.cpp0000644000175000017500000000500313142134462015560 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_ProgressBar: public Qt5_W_Widget { public: Qt5_W_ProgressBar(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_ProgressBar() { } virtual int setup() { QProgressBar *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); qw=new QProgressBar(); qw->setTextVisible(true); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { QProgressBar *qw; qw=(QProgressBar*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: qw->setValue(value); return 0; case GWEN_DialogProperty_MinValue: qw->setMinimum(value); return 0; case GWEN_DialogProperty_MaxValue: qw->setMaximum(value); return 0; default: return Qt5_W_Widget::setIntProperty(prop, index, value, doSignal); } }; int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { QProgressBar *qw; qw=(QProgressBar*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: return qw->value(); case GWEN_DialogProperty_MinValue: return qw->minimum(); case GWEN_DialogProperty_MaxValue: return qw->maximum(); default: return Qt5_W_Widget::getIntProperty(prop, index, defaultValue); } }; }; gwenhywfar-5.12.1/gui/qt5/w_lineedit.cpp0000644000175000017500000000671413412721305015034 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_LineEdit: public Qt5_W_Widget { public: Qt5_W_LineEdit(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_LineEdit() { } virtual int setup() { QLineEdit *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; QT5_GuiDialog *qtDialog; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QLineEdit(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); if (flags & GWEN_WIDGET_FLAGS_PASSWORD) qw->setEchoMode(QLineEdit::Password); else qw->setEchoMode(QLineEdit::Normal); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); qtDialog=dynamic_cast(getDialog()); assert(qtDialog); qw->connect(qw, SIGNAL(returnPressed()), qtDialog->getMainWindow(), SLOT(slotActivated())); qw->connect(qw, SIGNAL(textChanged(const QString&)), qtDialog->getMainWindow(), SLOT(slotValueChanged())); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QLineEdit *qw; QString text; qw=(QLineEdit*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QString::fromUtf8(value); switch(prop) { case GWEN_DialogProperty_Value: qw->setText(text); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; const char *getCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { QLineEdit *qw; QString str; qw=(QLineEdit*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); switch(prop) { case GWEN_DialogProperty_Value: str=qw->text(); if (str.isEmpty()) return defaultValue; else { GWEN_Widget_SetText(_widget, QT5_DIALOG_STRING_TITLE, str.toUtf8()); return GWEN_Widget_GetText(_widget, QT5_DIALOG_STRING_TITLE); } break; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return defaultValue; }; }; gwenhywfar-5.12.1/gui/qt5/gwengui-qt6-config.cmake.in0000644000175000017500000000375415032533366017245 00000000000000 # Macros cmake's CONFIGURE_PACKAGE_CONFIG_FILE() would create macro(set_and_check _var _file) set(${_var} "${_file}") if(NOT EXISTS "${_file}") message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") endif() endmacro() macro(check_required_components _NAME) foreach(comp ${${_NAME}_FIND_COMPONENTS}) if(NOT ${_NAME}_${comp}_FOUND) if(${_NAME}_FIND_REQUIRED_${comp}) set(${_NAME}_FOUND FALSE) endif() endif() endforeach() endmacro() include(CMakeFindDependencyMacro) find_dependency(gwengui-cpp "@GWENHYWFAR_VERSION_STRING@") find_dependency(Qt@QT_MAJOR_VERSION@Core) find_dependency(Qt@QT_MAJOR_VERSION@Widgets) set_and_check(prefix "@prefix@") set_and_check(exec_prefix "@exec_prefix@") set_and_check(includedir "@includedir@") set_and_check(${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS "@gwenhywfar_headerdir@") if(WIN32) set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt@QT_MAJOR_VERSION@.dll.a") elseif(APPLE) set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt@QT_MAJOR_VERSION@.dylib") else() set_and_check(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "@libdir@/libgwengui-qt@QT_MAJOR_VERSION@.so") endif() set(${CMAKE_FIND_PACKAGE_NAME}_FOUND true) if(NOT TARGET gwenhywfar::gui-qt@QT_MAJOR_VERSION@) add_library(gwenhywfar::gui-qt@QT_MAJOR_VERSION@ UNKNOWN IMPORTED) set_target_properties(gwenhywfar::gui-qt@QT_MAJOR_VERSION@ PROPERTIES IMPORTED_LOCATION "${${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "gwenhywfar::core;gwenhywfar::gui-cpp;Qt@QT_MAJOR_VERSION@::Core;Qt@QT_MAJOR_VERSION@::Widgets" ) endif() set(${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES "${${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES};gwenhywfar::core;gwenhywfar::gui-cpp") mark_as_advanced( ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS) gwenhywfar-5.12.1/gui/qt5/gwengui-qt6.pc.in0000644000175000017500000000116215032533366015313 00000000000000# pkg-config configuration for gwengui_qt@QT_MAJOR_VERSION@ # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@includedir@/gwenhywfar datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Human-readable name Name: gwengui-qt@QT_MAJOR_VERSION@ # Human-readable description Description: Qt@QT_MAJOR_VERSION@ Implementation of the GWEN_DIALOG framework. Version: @VERSION@ Libs: -L@libdir@ -lgwengui-qt@QT_MAJOR_VERSION@ -lgwengui-cpp Cflags: -I@includedir@ gwenhywfar-5.12.1/gui/qt5/libtest.cpp0000644000175000017500000001016013142134462014347 00000000000000 #undef BUILDING_QT5_GUI #include "qt5_gui.hpp" #include "../testdialogs/dlg_test.h" #include #include #include #include #include #include int test1(int argc, char **argv) { QApplication a(argc, argv); QT5_Gui *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); /* create GUI */ gui=new QT5_Gui(); GWEN_Gui_SetGui(gui->getCInterface()); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int test2(int argc, char **argv) { QApplication a(argc, argv); QT5_Gui *gui; QString lf; int rv; uint32_t pid; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); /* create GUI */ gui=new QT5_Gui(); GWEN_Gui_SetGui(gui->getCInterface()); #if 0 pid=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_PROGRESS | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "This is an example progress with 2 steps" "This is an example progress with 2 steps", 2, 0); #else pid=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_PROGRESS | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "This is an example progress with 2 steps", 2, 0); #endif GWEN_Gui_ProgressAdvance(pid, 1); rv=GWEN_Gui_MessageBox(GWEN_GUI_MSG_FLAGS_TYPE_INFO, "MessageBox-Title", "This message box should appear in the context of the open progress dialog", "Button1", "Button2", "Button3", pid); GWEN_Gui_ProgressAdvance(pid, 2); GWEN_Gui_ProgressEnd(pid); return 0; } int test3(int argc, char **argv) { int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; QApplication a(argc, argv); QT5_Gui *gui; gui=new QT5_Gui(); GWEN_Gui_SetGui(gui->getCInterface()); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

This is an example text..

" "

As you can see colors can " "be used.

" "", 10, 0); for (i1=1; i1<=10; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d\n", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 10, id1); for (i2=1; i2<=10; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (2)\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (1)\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int main(int argc, char **argv) { return test1(argc, argv); //return test2(argc, argv); //return test3(argc, argv); } gwenhywfar-5.12.1/gui/qt5/w_groupbox.cpp0000644000175000017500000000375213142134462015105 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_GroupBox: public Qt5_W_Widget { public: Qt5_W_GroupBox(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_GroupBox() { } virtual int setup() { QWidget *qw; uint32_t flags; GWEN_WIDGET *wParent; QLayout *qLayout; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QGroupBox(text); qLayout=new QVBoxLayout(qw); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT, (void*) qLayout); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int addChildGuiWidget(GWEN_WIDGET *wChild) { QWidget *qw; QBoxLayout *qLayout; QWidget *qChild; qw=(QWidget*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); qLayout=(QBoxLayout*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_LAYOUT); assert(qLayout); qChild=getQWidget(wChild); assert(qChild); qChild->setParent(qw); qLayout->addWidget(qChild); return 0; } }; gwenhywfar-5.12.1/gui/qt5/w_textbrowser.cpp0000644000175000017500000000452413412721403015623 00000000000000/*************************************************************************** begin : Mon Feb 15 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include class Qt5_W_TextBrowser: public Qt5_W_Widget { public: Qt5_W_TextBrowser(GWEN_WIDGET *w):Qt5_W_Widget(w) { } ~Qt5_W_TextBrowser() { } virtual int setup() { QTextBrowser *qw; uint32_t flags; GWEN_WIDGET *wParent; QSizePolicy::Policy hpolicy=QSizePolicy::Minimum; QSizePolicy::Policy vpolicy=QSizePolicy::Minimum; const char *s; QString text; flags=GWEN_Widget_GetFlags(_widget); wParent=GWEN_Widget_Tree_GetParent(_widget); s=GWEN_Widget_GetText(_widget, 0); if (s) text=QString::fromUtf8(s); qw=new QTextBrowser(); qw->setText(text); /* handle flags */ if (flags & GWEN_WIDGET_FLAGS_FILLX) hpolicy=QSizePolicy::Expanding; if (flags & GWEN_WIDGET_FLAGS_FILLY) vpolicy=QSizePolicy::Expanding; qw->setSizePolicy(hpolicy, vpolicy); GWEN_Widget_SetImplData(_widget, QT5_DIALOG_WIDGET_REAL, (void*) qw); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, _widget); return 0; } int setCharProperty(GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { QTextBrowser *qw; QString text; qw=(QTextBrowser*) GWEN_Widget_GetImplData(_widget, QT5_DIALOG_WIDGET_REAL); assert(qw); if (value) text=QT5_Gui::extractHtml(value); switch(prop) { case GWEN_DialogProperty_Value: qw->setText(""); qw->append(text); return 0; case GWEN_DialogProperty_AddValue: qw->append(text); return 0; case GWEN_DialogProperty_ClearValues: qw->setText(""); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(_widget))); return GWEN_ERROR_INVALID; }; }; gwenhywfar-5.12.1/gui/gtk3/0000755000175000017500000000000015032533716012423 500000000000000gwenhywfar-5.12.1/gui/gtk3/w_stack.c0000666000175000017500000001157113606370513014152 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ /* * Note: This is a special use case for gtk_notebook. * To use it as a WidgetStack we have to disable drawing od tabs * and borders by calling: * - gtk_notebook_set_show_tabs(GTK_NOTEBOOK(g), FALSE); * - gtk_notebook_set_show_border(GTK_NOTEBOOK(g), FALSE); * */ static GWENHYWFAR_CB int Gtk3Gui_WStack_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: gtk_notebook_set_current_page(GTK_NOTEBOOK(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WStack_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Value: return gtk_notebook_get_current_page(GTK_NOTEBOOK(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WStack_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WStack_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WStack_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); gtk_notebook_append_page(GTK_NOTEBOOK(g), gChild, NULL); return 0; } int Gtk3Gui_WStack_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_notebook_new(); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(g), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(g), FALSE); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WStack_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WStack_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WStack_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WStack_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WStack_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_hlayout.c0000666000175000017500000001116613606370036014532 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WHLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WHLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WHLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WHLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WHLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; uint32_t cflags; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); cflags=GWEN_Widget_GetFlags(wChild); gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLX)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLX)?TRUE:FALSE, 0); return 0; } int Gtk3Gui_WHLayout_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_box_new(GTK_ORIENTATION_HORIZONTAL, GTK3_GUI_DIALOG_DEFAULT_BOX_SPACING); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WHLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WHLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WHLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WHLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WHLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_radiobutton.c0000666000175000017500000001415113606371103015370 00000000000000/*************************************************************************** begin : Mon Jul 12 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WRadioButton_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g), (value==0)?FALSE:TRUE); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WRadioButton_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g))==TRUE)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WRadioButton_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_button_set_label(g, value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WRadioButton_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_button_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk3Gui_WRadioButton_Toggled_handler(GWEN_UNUSED GtkButton *button, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WRadioButton_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; GWEN_WIDGET *wParent; GWEN_WIDGET *wT; /*gulong toggled_handler_id;*/ int groupId; wParent=GWEN_Widget_Tree_GetParent(w); groupId=GWEN_Widget_GetGroupId(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ if (s && *s) g=gtk_radio_button_new_with_mnemonic(NULL, s); else g=gtk_radio_button_new(NULL); /* get root widget */ wT=wParent; while (GWEN_Widget_Tree_GetParent(wT)) wT=GWEN_Widget_Tree_GetParent(wT); /* get first radio button of the same group */ while (wT) { if ((GWEN_Widget_GetType(wT)==GWEN_Widget_TypeRadioButton) && GWEN_Widget_GetGroupId(wT)==groupId) break; wT=GWEN_Widget_Tree_GetBelow(wT); } if (wT && wT!=w) { GSList *grp; grp=gtk_radio_button_get_group(GTK_RADIO_BUTTON(GWEN_Widget_GetImplData(wT, GTK3_DIALOG_WIDGET_REAL))); gtk_radio_button_set_group(GTK_RADIO_BUTTON(g), grp); } /* set pointers */ GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WRadioButton_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WRadioButton_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WRadioButton_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WRadioButton_GetCharProperty); g_signal_connect(g, "toggled", G_CALLBACK(Gtk3Gui_WRadioButton_Toggled_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/Makefile.in0000644000175000017500000007572315032533614014423 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = libtest$(EXEEXT) subdir = gui/gtk3 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(iheader_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gwengui-gtk3.pc CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(iheaderdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgwengui_gtk3_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) am_libgwengui_gtk3_la_OBJECTS = gtk3_gui_dialog.lo gtk3_gui.lo libgwengui_gtk3_la_OBJECTS = $(am_libgwengui_gtk3_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgwengui_gtk3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libgwengui_gtk3_la_LDFLAGS) \ $(LDFLAGS) -o $@ am_libtest_OBJECTS = libtest.$(OBJEXT) libtest_OBJECTS = $(am_libtest_OBJECTS) libtest_DEPENDENCIES = libgwengui-gtk3.la $(am__DEPENDENCIES_1) \ $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../testdialogs/libgwengui-test.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/gtk3_gui.Plo \ ./$(DEPDIR)/gtk3_gui_dialog.Plo ./$(DEPDIR)/libtest.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgwengui_gtk3_la_SOURCES) $(libtest_SOURCES) DIST_SOURCES = $(libgwengui_gtk3_la_SOURCES) $(libtest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(iheader_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gwengui-gtk3.pc.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DBUILDING_GTK3_GUI -DPACKAGE=\"$(PACKAGE)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = -I$(gwenhywfar_symlinkdir) $(GTK3_CFLAGS) \ @visibility_cflags@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-gtk3.pc lib_LTLIBRARIES = libgwengui-gtk3.la libgwengui_gtk3_la_LIBADD = $(GTK3_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) libgwengui_gtk3_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) noinst_HEADERS = \ gtk3_gui_p.h \ gtk3_gui_dialog_l.h \ gtk3_gui_dialog_p.h libgwengui_gtk3_la_SOURCES = \ gtk3_gui_dialog.c \ gtk3_gui.c EXTRA_DIST = \ w_combobox.c \ w_label.c \ w_dialog.c \ w_gridlayout.c \ w_groupbox.c \ w_hlayout.c \ w_hline.c \ w_hspacer.c \ w_lineedit.c \ w_vlayout.c \ w_vline.c \ w_vspacer.c \ w_pushbutton.c \ w_textbrowser.c \ w_textedit.c \ w_stack.c \ w_tabbook.c \ w_progressbar.c \ w_listbox.c \ w_checkbox.c \ w_scrollarea.c \ w_radiobutton.c \ w_spinbox.c iheaderdir = ${gwenhywfar_headerdir_am}/gwen-gui-gtk3 iheader_HEADERS = \ gtk3_gui.h libtest_SOURCES = libtest.c libtest_LDADD = libgwengui-gtk3.la $(GTK3_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../testdialogs/libgwengui-test.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/gtk3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/gtk3/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gwengui-gtk3.pc: $(top_builddir)/config.status $(srcdir)/gwengui-gtk3.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgwengui-gtk3.la: $(libgwengui_gtk3_la_OBJECTS) $(libgwengui_gtk3_la_DEPENDENCIES) $(EXTRA_libgwengui_gtk3_la_DEPENDENCIES) $(AM_V_CCLD)$(libgwengui_gtk3_la_LINK) -rpath $(libdir) $(libgwengui_gtk3_la_OBJECTS) $(libgwengui_gtk3_la_LIBADD) $(LIBS) libtest$(EXEEXT): $(libtest_OBJECTS) $(libtest_DEPENDENCIES) $(EXTRA_libtest_DEPENDENCIES) @rm -f libtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(libtest_OBJECTS) $(libtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk3_gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk3_gui_dialog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-iheaderHEADERS: $(iheader_HEADERS) @$(NORMAL_INSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iheaderdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iheaderdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(iheaderdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(iheaderdir)" || exit $$?; \ done uninstall-iheaderHEADERS: @$(NORMAL_UNINSTALL) @list='$(iheader_HEADERS)'; test -n "$(iheaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iheaderdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(iheaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/gtk3_gui.Plo -rm -f ./$(DEPDIR)/gtk3_gui_dialog.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iheaderHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/gtk3_gui.Plo -rm -f ./$(DEPDIR)/gtk3_gui_dialog.Plo -rm -f ./$(DEPDIR)/libtest.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-iheaderHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-iheaderHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/gui/gtk3/gtk3_gui.c0000644000175000017500000001765613606371322014240 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gtk3_gui_p.h" #include "gtk3_gui_dialog_l.h" #include #include #include #include #include #include #include #include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) GWEN_INHERIT(GWEN_GUI, GTK3_GUI) GWEN_GUI *Gtk3_Gui_new() { GWEN_GUI *gui; GTK3_GUI *xgui; gui=GWEN_Gui_new(); GWEN_NEW_OBJECT(GTK3_GUI, xgui); GWEN_INHERIT_SETDATA(GWEN_GUI, GTK3_GUI, gui, xgui, Gtk3_Gui_FreeData); GWEN_Gui_AddFlags(gui, GWEN_GUI_FLAGS_DIALOGSUPPORTED); GWEN_Gui_UseDialogs(gui); xgui->execDialogFn=GWEN_Gui_SetExecDialogFn(gui, GTK3_Gui_ExecDialog); xgui->openDialogFn=GWEN_Gui_SetOpenDialogFn(gui, GTK3_Gui_OpenDialog); xgui->closeDialogFn=GWEN_Gui_SetCloseDialogFn(gui, GTK3_Gui_CloseDialog); xgui->runDialogFn=GWEN_Gui_SetRunDialogFn(gui, GTK3_Gui_RunDialog); xgui->getFileNameDialogFn=GWEN_Gui_SetGetFileNameFn(gui, GTK3_Gui_GetFileName); return gui; } GWENHYWFAR_CB void Gtk3_Gui_FreeData(GWEN_UNUSED void *bp, void *p) { GTK3_GUI *xgui; xgui=(GTK3_GUI *) p; GWEN_FREE_OBJECT(xgui); } GWENHYWFAR_CB int GTK3_Gui_ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid) { int rv; assert(dlg); rv=GTK3_Gui_OpenDialog(gui, dlg, guiid); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } rv=GTK3_Gui_RunDialog(gui, dlg, 1); GTK3_Gui_CloseDialog(gui, dlg); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } GWENHYWFAR_CB int GTK3_Gui_OpenDialog(GWEN_UNUSED GWEN_GUI *gui, GWEN_DIALOG *dlg, GWEN_UNUSED uint32_t guiid) { int rv; GtkWidget *g; assert(dlg); Gtk3Gui_Dialog_Extend(dlg); rv=Gtk3Gui_Dialog_Setup(dlg, NULL); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); Gtk3Gui_Dialog_Unextend(dlg); return rv; } g=Gtk3Gui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); Gtk3Gui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } rv=GWEN_Dialog_EmitSignalToAll(dlg, GWEN_DialogEvent_TypeInit, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error initializing dialog: %d", rv); Gtk3Gui_Dialog_Unextend(dlg); return rv; } /* show dialog */ gtk_widget_show_all(g); return 0; } GWENHYWFAR_CB int GTK3_Gui_CloseDialog(GWEN_UNUSED GWEN_GUI *gui, GWEN_DIALOG *dlg) { GtkWidget *g; int rv; assert(dlg); g=Gtk3Gui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); Gtk3Gui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } /* hide dialog */ gtk_widget_hide(g); /* send fini signal to dialog */ rv=GWEN_Dialog_EmitSignalToAll(dlg, GWEN_DialogEvent_TypeFini, ""); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "Error deinitializing dialog: %d", rv); Gtk3Gui_Dialog_Unextend(dlg); return rv; } Gtk3Gui_Dialog_Unextend(dlg); return 0; } GWENHYWFAR_CB int GTK3_Gui_RunDialog(GWEN_UNUSED GWEN_GUI *gui, GWEN_DIALOG *dlg, int untilEnd) { int rv; assert(dlg); rv=GTK3_Gui_Dialog_Run(dlg, untilEnd); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } return rv; } GWENHYWFAR_CB int GTK3_Gui_GetFileName(GWEN_UNUSED GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, GWEN_UNUSED uint32_t flags, GWEN_UNUSED const char *patterns, GWEN_BUFFER *pathBuffer, GWEN_UNUSED uint32_t guiid) { char *folder=NULL; char *fileName=NULL; if (GWEN_Buffer_GetUsedBytes(pathBuffer)) { folder=strdup(GWEN_Buffer_GetStart(pathBuffer)); fileName=strchr(folder, GWEN_DIR_SEPARATOR); if (fileName) { *fileName=0; fileName++; if (*fileName==0) fileName=NULL; } } switch (fnt) { case GWEN_Gui_FileNameType_OpenFileName: { GtkWidget *dialog; if (!(caption && *caption)) caption=I18N("Open File"); dialog=gtk_file_chooser_dialog_new(caption, NULL, GTK_FILE_CHOOSER_ACTION_OPEN, "_Cancel", GTK_RESPONSE_CANCEL, "_Open", GTK_RESPONSE_ACCEPT, NULL); if (folder && *folder) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), folder); if (fileName && *fileName) gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), fileName); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); g_free(filename); gtk_widget_destroy(dialog); free(folder); return 0; } gtk_widget_destroy(dialog); free(folder); return GWEN_ERROR_USER_ABORTED; } case GWEN_Gui_FileNameType_SaveFileName: { GtkWidget *dialog; if (!(caption && *caption)) caption=I18N("Save File"); dialog=gtk_file_chooser_dialog_new(caption, NULL, GTK_FILE_CHOOSER_ACTION_SAVE, "_Cancel", GTK_RESPONSE_CANCEL, "_Open", GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE); if (folder && *folder) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), folder); if (fileName && *fileName) gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), fileName); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); g_free(filename); gtk_widget_destroy(dialog); free(folder); return 0; } gtk_widget_destroy(dialog); free(folder); return GWEN_ERROR_USER_ABORTED; } case GWEN_Gui_FileNameType_OpenDirectory: { GtkWidget *dialog; if (!(caption && *caption)) caption=I18N("Select Folder"); dialog=gtk_file_chooser_dialog_new(caption, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, "_Cancel", GTK_RESPONSE_CANCEL, "_Open", GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); GWEN_Buffer_Reset(pathBuffer); GWEN_Buffer_AppendString(pathBuffer, filename); g_free(filename); gtk_widget_destroy(dialog); free(folder); return 0; } gtk_widget_destroy(dialog); free(folder); return GWEN_ERROR_USER_ABORTED; } default: break; } free(folder); return GWEN_ERROR_USER_ABORTED; } gwenhywfar-5.12.1/gui/gtk3/w_hspacer.c0000666000175000017500000000516213606370071014470 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WHSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WHSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk3Gui_WHSpacer_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLX); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WHSpacer_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WHSpacer_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_tabbook.c0000666000175000017500000001117413606370563014472 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WTabBook_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: gtk_notebook_set_current_page(GTK_NOTEBOOK(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WTabBook_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Value: return gtk_notebook_get_current_page(GTK_NOTEBOOK(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WTabBook_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WTabBook_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WTabBook_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; const char *s; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); s=GWEN_Widget_GetText(wChild, 0); gtk_notebook_append_page(GTK_NOTEBOOK(g), gChild, (s && *s)?gtk_label_new(s):NULL); return 0; } int Gtk3Gui_WTabBook_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_notebook_new(); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WTabBook_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WTabBook_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WTabBook_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WTabBook_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WTabBook_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_hline.c0000666000175000017500000000505013606370054014137 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WHLine_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WHLine_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk3Gui_WHLine_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WHLine_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WHLine_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_pushbutton.c0000666000175000017500000001363613606370230015260 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WPushButton_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WPushButton_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WPushButton_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_button_set_label(g, value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WPushButton_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_button_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk3Gui_WPushButton_Clicked_handler(GWEN_UNUSED GtkButton *button, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WPushButton_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ if (s && *s) g=gtk_button_new_with_mnemonic(s); else g=gtk_button_new(); s=GWEN_Widget_GetIconFileName(w); if (s && *s) { GWEN_STRINGLIST *sl; sl=GWEN_Dialog_GetMediaPaths(GWEN_Widget_GetDialog(w)); if (sl) { int rv; GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 256, 0, 1); rv=GWEN_Directory_FindFileInPaths(sl, s, tbuf); if (rv<0) { DBG_ERROR(GWEN_LOGDOMAIN, "Image file [%s] not found (%d)", s, rv); /* ignore result here, instead create GtkImage with "broken mage" later */ } else { GtkWidget *gImage; gImage=gtk_image_new_from_file(GWEN_Buffer_GetStart(tbuf)); gtk_button_set_image(GTK_BUTTON(g), gImage); gtk_button_set_image_position(GTK_BUTTON(g), GTK_POS_LEFT); } GWEN_Buffer_free(tbuf); } } GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WPushButton_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WPushButton_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WPushButton_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WPushButton_GetCharProperty); g_signal_connect(g, "clicked", G_CALLBACK(Gtk3Gui_WPushButton_Clicked_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/Makefile.am0000666000175000017500000000242113642701350014376 00000000000000AM_CPPFLAGS=-I$(gwenhywfar_symlinkdir) $(GTK3_CFLAGS) \ @visibility_cflags@ DEFS+=-DBUILDING_GTK3_GUI -DPACKAGE=\"$(PACKAGE)\" pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwengui-gtk3.pc lib_LTLIBRARIES=libgwengui-gtk3.la libgwengui_gtk3_la_LIBADD=$(GTK3_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) libgwengui_gtk3_la_LDFLAGS = -no-undefined -version-info \ $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE) noinst_HEADERS=\ gtk3_gui_p.h \ gtk3_gui_dialog_l.h \ gtk3_gui_dialog_p.h libgwengui_gtk3_la_SOURCES=\ gtk3_gui_dialog.c \ gtk3_gui.c EXTRA_DIST=\ w_combobox.c \ w_label.c \ w_dialog.c \ w_gridlayout.c \ w_groupbox.c \ w_hlayout.c \ w_hline.c \ w_hspacer.c \ w_lineedit.c \ w_vlayout.c \ w_vline.c \ w_vspacer.c \ w_pushbutton.c \ w_textbrowser.c \ w_textedit.c \ w_stack.c \ w_tabbook.c \ w_progressbar.c \ w_listbox.c \ w_checkbox.c \ w_scrollarea.c \ w_radiobutton.c \ w_spinbox.c iheaderdir=${gwenhywfar_headerdir_am}/gwen-gui-gtk3 iheader_HEADERS= \ gtk3_gui.h noinst_PROGRAMS = libtest libtest_SOURCES = libtest.c libtest_LDADD = libgwengui-gtk3.la $(GTK3_LIBS) $(top_builddir)/src/$(gwenhywfar_internal_libname) \ $(builddir)/../testdialogs/libgwengui-test.la gwenhywfar-5.12.1/gui/gtk3/w_groupbox.c0000666000175000017500000001274713606370615014723 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WGroupBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Visibility: gtk_widget_set_visible(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WGroupBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Visibility: return (gtk_widget_get_visible(GTK_WIDGET(g))==TRUE)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WGroupBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_frame_set_label(GTK_FRAME(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WGroupBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_frame_get_label(GTK_FRAME(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WGroupBox_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; uint32_t cflags; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); cflags=GWEN_Widget_GetFlags(wChild); gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, 0); return 0; } int Gtk3Gui_WGroupBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; GtkWidget *gContent; const char *s; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); g=gtk_frame_new(s); gContent=gtk_box_new(GTK_ORIENTATION_VERTICAL, GTK3_GUI_DIALOG_DEFAULT_BOX_SPACING); gtk_container_add(GTK_CONTAINER(g), gContent); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) gContent); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WGroupBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WGroupBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WGroupBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WGroupBox_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WGroupBox_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_spinbox.c0000666000175000017500000001372013606371164014530 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct W_SPINBOX W_SPINBOX; struct W_SPINBOX { GtkAdjustment *adjustment; }; GWEN_INHERIT(GWEN_WIDGET, W_SPINBOX) static GWENHYWFAR_CB int Gtk3Gui_WSpinBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; W_SPINBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_SPINBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: gtk_adjustment_set_value(GTK_ADJUSTMENT(xw->adjustment), value); return 0; case GWEN_DialogProperty_MinValue: gtk_adjustment_set_lower(GTK_ADJUSTMENT(xw->adjustment), value); return 0; case GWEN_DialogProperty_MaxValue: gtk_adjustment_set_upper(GTK_ADJUSTMENT(xw->adjustment), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WSpinBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; W_SPINBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_SPINBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return gtk_adjustment_get_value(GTK_ADJUSTMENT(xw->adjustment)); case GWEN_DialogProperty_MinValue: return gtk_adjustment_get_lower(GTK_ADJUSTMENT(xw->adjustment)); case GWEN_DialogProperty_MaxValue: return gtk_adjustment_get_upper(GTK_ADJUSTMENT(xw->adjustment)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WSpinBox_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WSpinBox_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void GWENHYWFAR_CB Gtk3Gui_WSpinBox_FreeData(GWEN_UNUSED void *bp, void *p) { W_SPINBOX *xw; xw=(W_SPINBOX *) p; GWEN_FREE_OBJECT(xw); } static void Gtk3Gui_WSpinBox_Changed_handler(GWEN_UNUSED GtkAdjustment *adjustment, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WSpinBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; W_SPINBOX *xw; GWEN_NEW_OBJECT(W_SPINBOX, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_SPINBOX, w, xw, Gtk3Gui_WSpinBox_FreeData); wParent=GWEN_Widget_Tree_GetParent(w); xw->adjustment=GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 5.0, 5.0)); g=gtk_spin_button_new(xw->adjustment, 1.0, 0); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WSpinBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WSpinBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WSpinBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WSpinBox_GetCharProperty); g_signal_connect(g, "value-changed", G_CALLBACK(Gtk3Gui_WSpinBox_Changed_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_textbrowser.c0000666000175000017500000001471213606370445015441 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WTextBrowser_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(gs), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(gs)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WTextBrowser_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(gs))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(gs))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WTextBrowser_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ GWEN_BUFFER *tbuf; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); tbuf=GWEN_Buffer_new(0, 128, 0, 1); if (value && *value) Gtk3Gui_GetRawText(value, tbuf); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkAdjustment *va; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); gtk_text_buffer_set_text(tb, GWEN_Buffer_GetStart(tbuf), -1); /* scroll to end */ va=gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(gs)); if (va) gtk_adjustment_set_value(va, gtk_adjustment_get_upper(va)); GWEN_Buffer_free(tbuf); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); GWEN_Buffer_free(tbuf); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WTextBrowser_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkTextIter startIter; GtkTextIter endIter; gchar *s; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); gtk_text_buffer_get_start_iter(tb, &startIter); gtk_text_buffer_get_end_iter(tb, &endIter); s=gtk_text_buffer_get_text(tb, &startIter, &endIter, FALSE); if (s) { GWEN_Widget_SetText(w, GTK3_DIALOG_STRING_VALUE, s); g_free(s); return GWEN_Widget_GetText(w, GTK3_DIALOG_STRING_VALUE); } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk3Gui_WTextBrowser_Setup(GWEN_WIDGET *w) { GtkWidget *gs; GtkWidget *g; const char *s; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ gs=gtk_scrolled_window_new(NULL, NULL); g=gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(gs), GTK_WIDGET(g)); if (s && *s) { GWEN_BUFFER *tbuf; tbuf=GWEN_Buffer_new(0, 128, 0, 1); Gtk3Gui_GetRawText(s, tbuf); gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)), GWEN_Buffer_GetStart(tbuf), -1); GWEN_Buffer_free(tbuf); } GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) gs); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WTextBrowser_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WTextBrowser_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WTextBrowser_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WTextBrowser_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_checkbox.c0000666000175000017500000001254713606370772014646 00000000000000/*************************************************************************** begin : Mon Jul 12 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WCheckBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g), (value==0)?FALSE:TRUE); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WCheckBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g))==TRUE)?1:0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WCheckBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_button_set_label(g, value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WCheckBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkButton *g; g=GTK_BUTTON(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_button_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk3Gui_WCheckBox_Toggled_handler(GWEN_UNUSED GtkButton *button, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WCheckBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ if (s && *s) g=gtk_check_button_new_with_mnemonic(s); else g=gtk_check_button_new(); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WCheckBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WCheckBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WCheckBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WCheckBox_GetCharProperty); g_signal_connect(g, "toggled", G_CALLBACK(Gtk3Gui_WCheckBox_Toggled_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_combobox.c0000666000175000017500000001711713606367600014662 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct W_COMBOBOX W_COMBOBOX; struct W_COMBOBOX { GWEN_STRINGLIST *entries; }; GWEN_INHERIT(GWEN_WIDGET, W_COMBOBOX) static GWENHYWFAR_CB int Gtk3Gui_WComboBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; W_COMBOBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_COMBOBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: gtk_combo_box_set_active(GTK_COMBO_BOX(g), value); return 0; case GWEN_DialogProperty_ClearValues: { GtkListStore *store; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); gtk_list_store_clear(store); GWEN_StringList_Clear(xw->entries); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WComboBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Value: { gint i; i=gtk_combo_box_get_active(GTK_COMBO_BOX(g)); if (i==-1) return defaultValue; else return i; } case GWEN_DialogProperty_ValueCount: { GtkListStore *store; gint i; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); i=gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL); return i; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WComboBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; W_COMBOBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_COMBOBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: /* undefined */ break; case GWEN_DialogProperty_AddValue: { GtkListStore *store; GtkTreeIter iter; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, value, -1); GWEN_StringList_AppendString(xw->entries, value, 0, 0); return 0; } case GWEN_DialogProperty_ClearValues: { GtkListStore *store; store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g))); assert(store); gtk_list_store_clear(store); GWEN_StringList_Clear(xw->entries); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WComboBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { GtkWidget *g; W_COMBOBOX *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_COMBOBOX, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: { const char *s; s=GWEN_StringList_StringAt(xw->entries, index); if (s && *s) return s; else return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void changed_handler(GWEN_UNUSED GtkWidget *comboBox, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } static void GWENHYWFAR_CB Gtk3Gui_WComboBox_FreeData(GWEN_UNUSED void *bp, void *p) { W_COMBOBOX *xw; xw=(W_COMBOBOX *) p; GWEN_StringList_free(xw->entries); GWEN_FREE_OBJECT(xw); } int Gtk3Gui_WComboBox_Setup(GWEN_WIDGET *w) { W_COMBOBOX *xw; GtkWidget *g; GtkCellRenderer *cr; GtkListStore *store; uint32_t flags; GWEN_WIDGET *wParent; flags=GWEN_Widget_GetFlags(w); wParent=GWEN_Widget_Tree_GetParent(w); /* create widget */ store=gtk_list_store_new(1, G_TYPE_STRING); if (flags & GWEN_WIDGET_FLAGS_READONLY) g=gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); else { /* TODO: why the heck does *this* combo box have two columns in the list?? */ g=gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(store)); gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(g), 0); } g_object_unref(store); cr=gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(g), cr, TRUE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(g), cr, "text", 0, NULL); GWEN_NEW_OBJECT(W_COMBOBOX, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_COMBOBOX, w, xw, Gtk3Gui_WComboBox_FreeData); xw->entries=GWEN_StringList_new(); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WComboBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WComboBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WComboBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WComboBox_GetCharProperty); g_signal_connect(g, "changed", G_CALLBACK(changed_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_scrollarea.c0000666000175000017500000001331313606371042015166 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WScrollArea_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(gs), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(gs)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WScrollArea_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; /* text view */ GtkWidget *gs; /* scrollable window */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(gs))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(gs))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WScrollArea_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; /* scrollable window */ GtkWidget *gContent; /* vbox */ gContent=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(gContent); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WScrollArea_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *gs; /* scrollable window */ GtkWidget *g; /* vbox */ g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gs=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(gs); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WScrollArea_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; uint32_t cflags; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); cflags=GWEN_Widget_GetFlags(wChild); gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, 0); return 0; } int Gtk3Gui_WScrollArea_Setup(GWEN_WIDGET *w) { GtkWidget *g; GtkWidget *gContent; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); /* create widget */ g=gtk_scrolled_window_new(NULL, NULL); gContent=gtk_box_new(GTK_ORIENTATION_VERTICAL, GTK3_GUI_DIALOG_DEFAULT_BOX_SPACING); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) gContent); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WScrollArea_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WScrollArea_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WScrollArea_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WScrollArea_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WScrollArea_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/gtk3_gui_dialog.c0000666000175000017500000003253213606371246015556 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "gtk3_gui_dialog_p.h" #include #include #include #include #include #include #include #include #include #include #define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg) #define GTK3_DIALOG_WIDGET_REAL 0 #define GTK3_DIALOG_WIDGET_CONTENT 1 #define GTK3_DIALOG_WIDGET_DATA 2 #define GTK3_DIALOG_STRING_TITLE 0 #define GTK3_DIALOG_STRING_VALUE 1 #include "w_combobox.c" #include "w_label.c" #include "w_dialog.c" #include "w_gridlayout.c" #include "w_hlayout.c" #include "w_hline.c" #include "w_hspacer.c" #include "w_vlayout.c" #include "w_vline.c" #include "w_vspacer.c" #include "w_pushbutton.c" #include "w_lineedit.c" #include "w_textedit.c" #include "w_textbrowser.c" #include "w_stack.c" #include "w_tabbook.c" #include "w_groupbox.c" #include "w_progressbar.c" #include "w_listbox.c" #include "w_checkbox.c" #include "w_scrollarea.c" #include "w_radiobutton.c" #include "w_spinbox.c" GWEN_INHERIT(GWEN_DIALOG, GTK3_GUI_DIALOG) void Gtk3Gui_Dialog_Extend(GWEN_DIALOG *dlg) { GTK3_GUI_DIALOG *xdlg; GWEN_NEW_OBJECT(GTK3_GUI_DIALOG, xdlg); GWEN_INHERIT_SETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg, xdlg, Gtk3Gui_Dialog_FreeData); /* set virtual functions */ xdlg->setIntPropertyFn=GWEN_Dialog_SetSetIntPropertyFn(dlg, Gtk3Gui_Dialog_SetIntProperty); xdlg->getIntPropertyFn=GWEN_Dialog_SetGetIntPropertyFn(dlg, Gtk3Gui_Dialog_GetIntProperty); xdlg->setCharPropertyFn=GWEN_Dialog_SetSetCharPropertyFn(dlg, Gtk3Gui_Dialog_SetCharProperty); xdlg->getCharPropertyFn=GWEN_Dialog_SetGetCharPropertyFn(dlg, Gtk3Gui_Dialog_GetCharProperty); } void Gtk3Gui_Dialog_Unextend(GWEN_DIALOG *dlg) { GTK3_GUI_DIALOG *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); /* reset virtual functions */ GWEN_Dialog_SetSetIntPropertyFn(dlg, xdlg->setIntPropertyFn); GWEN_Dialog_SetGetIntPropertyFn(dlg, xdlg->getIntPropertyFn); GWEN_Dialog_SetSetCharPropertyFn(dlg, xdlg->setCharPropertyFn); GWEN_Dialog_SetGetCharPropertyFn(dlg, xdlg->getCharPropertyFn); GWEN_INHERIT_UNLINK(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); } void GWENHYWFAR_CB Gtk3Gui_Dialog_FreeData(GWEN_UNUSED void *bp, void *p) { GTK3_GUI_DIALOG *xdlg; xdlg=(GTK3_GUI_DIALOG *) p; if (xdlg->mainWidget) gtk_widget_destroy(xdlg->mainWidget); GWEN_FREE_OBJECT(xdlg); } GtkWidget *Gtk3Gui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg) { GTK3_GUI_DIALOG *xdlg; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); return xdlg->mainWidget; } GWENHYWFAR_CB int Gtk3Gui_Dialog_SetIntProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) { return GWEN_Widget_SetIntProperty(w, prop, index, value, doSignal); } GWENHYWFAR_CB int Gtk3Gui_Dialog_GetIntProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) { return GWEN_Widget_GetIntProperty(w, prop, index, defaultValue); } GWENHYWFAR_CB int Gtk3Gui_Dialog_SetCharProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) { return GWEN_Widget_SetCharProperty(w, prop, index, value, doSignal); } GWENHYWFAR_CB const char *Gtk3Gui_Dialog_GetCharProperty(GWEN_UNUSED GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { return GWEN_Widget_GetCharProperty(w, prop, index, defaultValue); } int Gtk3Gui_Dialog_Setup(GWEN_DIALOG *dlg, GWEN_UNUSED GtkWidget *parentWindow) { GTK3_GUI_DIALOG *xdlg; GWEN_WIDGET_TREE *wtree; GWEN_WIDGET *w; GtkWindow *gw; int rv; GList *tll; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); wtree=GWEN_Dialog_GetWidgets(dlg); if (wtree==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widget tree in dialog"); return GWEN_ERROR_NOT_FOUND; } w=GWEN_Widget_Tree_GetFirst(wtree); if (w==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No widgets in dialog"); return GWEN_ERROR_NOT_FOUND; } rv=Gtk3Gui_Dialog_SetupTree(w); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } gw=GTK_WINDOW(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); gtk_window_set_type_hint(GTK_WINDOW(gw), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(GTK_WINDOW(gw), GTK_WIN_POS_CENTER_ON_PARENT); /*gtk_window_set_keep_above(GTK_WINDOW(gw), TRUE);*/ xdlg->mainWidget=GTK_WIDGET(gw); tll=gtk_window_list_toplevels(); if (tll) { GList *element; GtkWindow *topLevel=NULL; for (element = tll; element; element = g_list_next(element)) { GtkWindow *win = GTK_WINDOW(element->data); if (gtk_window_is_active(win)) { topLevel=win; break; } } g_list_free(tll); if (topLevel) { DBG_NOTICE(GWEN_LOGDOMAIN, "Found active window [%s]", gtk_window_get_title(topLevel)); gtk_window_set_transient_for(gw, topLevel); } else { DBG_ERROR(GWEN_LOGDOMAIN, "No active window found..."); } } return 0; } void Gtk3Gui_Dialog_Leave(GWEN_DIALOG *dlg, int result) { GTK3_GUI_DIALOG *xdlg; GWEN_DIALOG *parent; /* get toplevel dialog, the one which actually is the GUI dialog */ while ((parent=GWEN_Dialog_GetParentDialog(dlg))) dlg=parent; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); xdlg->response=result; if (g_main_loop_is_running(xdlg->loop)) g_main_loop_quit(xdlg->loop); } static void run_unmap_handler(GWEN_UNUSED GtkWindow *window, gpointer data) { GWEN_DIALOG *dlg; GTK3_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); Gtk3Gui_Dialog_Leave(dlg, 0); } static gint run_delete_handler(GWEN_UNUSED GtkWindow *window, GWEN_UNUSED GdkEventAny *event, gpointer data) { GWEN_DIALOG *dlg; GTK3_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); Gtk3Gui_Dialog_Leave(dlg, 0); return TRUE; /* Do not destroy */ } static void run_destroy_handler(GWEN_UNUSED GtkWindow *window, gpointer data) { GWEN_DIALOG *dlg; GTK3_GUI_DIALOG *xdlg; dlg=data; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); xdlg->destroyed=1; } int GTK3_Gui_Dialog_Run(GWEN_DIALOG *dlg, int untilEnd) { GTK3_GUI_DIALOG *xdlg; GtkWidget *g; assert(dlg); xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GTK3_GUI_DIALOG, dlg); assert(xdlg); g=Gtk3Gui_Dialog_GetMainWidget(dlg); if (g==NULL) { DBG_ERROR(GWEN_LOGDOMAIN, "No main widget"); Gtk3Gui_Dialog_Unextend(dlg); return GWEN_ERROR_INVALID; } xdlg->unmap_handler = g_signal_connect(g, "unmap", G_CALLBACK(run_unmap_handler), dlg); xdlg->delete_handler = g_signal_connect(g, "delete-event", G_CALLBACK(run_delete_handler), dlg); xdlg->destroy_handler = g_signal_connect(g, "destroy", G_CALLBACK(run_destroy_handler), dlg); xdlg->loop=g_main_loop_new(NULL, FALSE); if (untilEnd) g_main_loop_run(xdlg->loop); else { GMainContext *ctx; ctx=g_main_loop_get_context(xdlg->loop); while (g_main_context_pending(ctx)) g_main_context_iteration(ctx, FALSE); } g_main_loop_unref(xdlg->loop); if (!xdlg->destroyed) { g_signal_handler_disconnect(g, xdlg->unmap_handler); g_signal_handler_disconnect(g, xdlg->delete_handler); g_signal_handler_disconnect(g, xdlg->destroy_handler); } return xdlg->response; } int Gtk3Gui_Dialog_SetupTree(GWEN_WIDGET *w) { int rv; switch (GWEN_Widget_GetType(w)) { case GWEN_Widget_TypeDialog: rv=Gtk3Gui_WDialog_Setup(w); break; case GWEN_Widget_TypeLabel: rv=Gtk3Gui_WLabel_Setup(w); break; case GWEN_Widget_TypeGridLayout: rv=Gtk3Gui_WGridLayout_Setup(w); break; case GWEN_Widget_TypeVLayout: rv=Gtk3Gui_WVLayout_Setup(w); break; case GWEN_Widget_TypeHLayout: rv=Gtk3Gui_WHLayout_Setup(w); break; case GWEN_Widget_TypePushButton: rv=Gtk3Gui_WPushButton_Setup(w); break; case GWEN_Widget_TypeLineEdit: rv=Gtk3Gui_WLineEdit_Setup(w); break; case GWEN_Widget_TypeHLine: rv=Gtk3Gui_WHLine_Setup(w); break; case GWEN_Widget_TypeVLine: rv=Gtk3Gui_WVLine_Setup(w); break; case GWEN_Widget_TypeVSpacer: rv=Gtk3Gui_WVSpacer_Setup(w); break; case GWEN_Widget_TypeHSpacer: rv=Gtk3Gui_WHSpacer_Setup(w); break; case GWEN_Widget_TypeComboBox: rv=Gtk3Gui_WComboBox_Setup(w); break; case GWEN_Widget_TypeTextEdit: rv=Gtk3Gui_WTextEdit_Setup(w); break; case GWEN_Widget_TypeWidgetStack: rv=Gtk3Gui_WStack_Setup(w); break; case GWEN_Widget_TypeTabBook: rv=Gtk3Gui_WTabBook_Setup(w); break; case GWEN_Widget_TypeTabPage: /* just re-use vbox */ GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLX | GWEN_WIDGET_FLAGS_FILLY); rv=Gtk3Gui_WVLayout_Setup(w); break; case GWEN_Widget_TypeGroupBox: rv=Gtk3Gui_WGroupBox_Setup(w); break; case GWEN_Widget_TypeTextBrowser: rv=Gtk3Gui_WTextBrowser_Setup(w); break; case GWEN_Widget_TypeProgressBar: rv=Gtk3Gui_WProgressBar_Setup(w); break; case GWEN_Widget_TypeSpinBox: rv=Gtk3Gui_WSpinBox_Setup(w); break; case GWEN_Widget_TypeListBox: rv=Gtk3Gui_WListBox_Setup(w); break; case GWEN_Widget_TypeCheckBox: rv=Gtk3Gui_WCheckBox_Setup(w); break; case GWEN_Widget_TypeScrollArea: rv=Gtk3Gui_WScrollArea_Setup(w); break; case GWEN_Widget_TypeRadioButton: rv=Gtk3Gui_WRadioButton_Setup(w); break; default: DBG_ERROR(GWEN_LOGDOMAIN, "Unhandled widget type %d", GWEN_Widget_GetType(w)); rv=GWEN_ERROR_INVALID; break; } if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } else { GWEN_WIDGET *wChild; /* handle children */ wChild=GWEN_Widget_Tree_GetFirstChild(w); while (wChild) { /* recursion */ rv=Gtk3Gui_Dialog_SetupTree(wChild); if (rv<0) { DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); return rv; } wChild=GWEN_Widget_Tree_GetNext(wChild); } } return 0; } int Gtk3Gui_GetRawText(const char *text, GWEN_BUFFER *tbuf) { const char *p=0; const char *p2=0; if (text==NULL) return 0; /* find begin of HTML area */ p=text; while ((p=strchr(p, '<'))) { const char *t; t=p; t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } p++; } /* while */ /* find end of HTML area */ if (p) { p2=p; p2+=6; /* skip "" */ while ((p2=strchr(p2, '<'))) { const char *t; t=p2; t++; if (toupper(*t)=='/') { t++; if (toupper(*t)=='H') { t++; if (toupper(*t)=='T') { t++; if (toupper(*t)=='M') { t++; if (toupper(*t)=='L') { t++; if (toupper(*t)=='>') { break; } } } } } } p2++; } /* while */ } if (p && p2) { int startPos; p2+=7; /* skip "" */ startPos=(p-text); /* append stuff before startPos */ if (startPos) GWEN_Buffer_AppendBytes(tbuf, text, startPos); if (*p2) GWEN_Buffer_AppendString(tbuf, p2); return 0; } else { GWEN_Buffer_AppendString(tbuf, text); return 0; } } gwenhywfar-5.12.1/gui/gtk3/gtk3_gui_p.h0000644000175000017500000000321313237641474014554 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GTK3_GUI_P_H #define GTK3_GUI_P_H #include "gtk3_gui.h" #include typedef struct GTK3_GUI GTK3_GUI; struct GTK3_GUI { GWEN_GUI_EXEC_DIALOG_FN execDialogFn; GWEN_GUI_OPEN_DIALOG_FN openDialogFn; GWEN_GUI_CLOSE_DIALOG_FN closeDialogFn; GWEN_GUI_RUN_DIALOG_FN runDialogFn; GWEN_GUI_GET_FILENAME_FN getFileNameDialogFn; }; static GWENHYWFAR_CB void Gtk3_Gui_FreeData(void *bp, void *p); static GWENHYWFAR_CB int GTK3_Gui_ExecDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static GWENHYWFAR_CB int GTK3_Gui_OpenDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid); static GWENHYWFAR_CB int GTK3_Gui_CloseDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg); static GWENHYWFAR_CB int GTK3_Gui_RunDialog(GWEN_GUI *gui, GWEN_DIALOG *dlg, int timeout); static GWENHYWFAR_CB int GTK3_Gui_GetFileName(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid); #endif gwenhywfar-5.12.1/gui/gtk3/gtk3_gui_dialog_l.h0000644000175000017500000000223013237641474016065 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GTK3_GUI_DIALOG_L_H #define GTK3_GUI_DIALOG_L_H #include #include #include #define GTK3_GUI_DIALOG_DEFAULT_BOX_SPACING 3 typedef struct { GWEN_DIALOG *dialog; GtkWindow *window; int response; GMainLoop *loop; int destroyed; } RunInfo; void Gtk3Gui_Dialog_Extend(GWEN_DIALOG *dlg); void Gtk3Gui_Dialog_Unextend(GWEN_DIALOG *dlg); int Gtk3Gui_Dialog_Setup(GWEN_DIALOG *dlg, GtkWidget *parentWindow); GtkWidget *Gtk3Gui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg); int GTK3_Gui_Dialog_Run(GWEN_DIALOG *dlg, int timeout); void Gtk3Gui_Dialog_Leave(GWEN_DIALOG *dlg, int result); int Gtk3Gui_GetRawText(const char *text, GWEN_BUFFER *tbuf); #endif gwenhywfar-5.12.1/gui/gtk3/w_dialog.c0000666000175000017500000001234613606367675014324 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WDialog_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWindow *g; g=GTK_WINDOW(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: { gint width, height; gtk_window_get_size(GTK_WINDOW(g), &width, &height); gtk_window_resize(GTK_WINDOW(g), value, height); return 0; } case GWEN_DialogProperty_Height: { gint width, height; gtk_window_get_size(GTK_WINDOW(g), &width, &height); gtk_window_resize(GTK_WINDOW(g), width, value); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WDialog_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWindow *g; g=GTK_WINDOW(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: { gint width, height; gtk_window_get_size(GTK_WINDOW(g), &width, &height); return width; } case GWEN_DialogProperty_Height: { gint width, height; gtk_window_get_size(GTK_WINDOW(g), &width, &height); return height; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WDialog_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWindow *g; g=GTK_WINDOW(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: gtk_window_set_title(GTK_WINDOW(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WDialog_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWindow *g; g=GTK_WINDOW(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_window_get_title(GTK_WINDOW(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WDialog_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); gtk_container_add(GTK_CONTAINER(g), gChild); return 0; } int Gtk3Gui_WDialog_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; s=GWEN_Widget_GetText(w, 0); g=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_modal(GTK_WINDOW(g), TRUE); if (s && *s) gtk_window_set_title(GTK_WINDOW(g), s); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WDialog_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WDialog_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WDialog_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WDialog_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WDialog_AddChildGuiWidget); return 0; } gwenhywfar-5.12.1/gui/gtk3/gtk3_gui.h0000664000175000017500000000153614460564441014242 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GTK3_GUI_H #define GTK3_GUI_H #include #if (defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || defined _MSC_VER # ifdef BUILDING_GTK3_GUI # define GTK3GUI_API __attribute__ ((visibility("default"))) # else # define GTK3GUI_API # endif #else # define GTK3GUI_API #endif #include GTK3GUI_API GWEN_GUI *Gtk3_Gui_new(); #endif gwenhywfar-5.12.1/gui/gtk3/libtest.c0000644000175000017500000000754513237641506014172 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #include "config.h" /* for OS_WIN32 */ #include "gtk3_gui.h" #include "../testdialogs/dlg_test.h" #include "../testdialogs/dlg_test2.h" #include #include #include #include #include #include int test1(int argc, char **argv) { GWEN_GUI *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); setlocale(LC_ALL, ""); gtk_init(&argc, &argv); /* create GUI */ gui=Gtk3_Gui_new(); GWEN_Gui_SetGui(gui); dlg=Dlg_Test1_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int test2(int argc, char **argv) { int rv; uint32_t id1; uint32_t id2; uint64_t i1; uint64_t i2; GWEN_GUI *gui; setlocale(LC_ALL, ""); gtk_init(&argc, &argv); gui=Gtk3_Gui_new(); GWEN_Gui_SetGui(gui); id1=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_SHOW_ABORT | GWEN_GUI_PROGRESS_KEEP_OPEN, "Progress-Title", "" "

This is an example text..

" "

As you can see colors can " "be used.

" "", 10, 0); for (i1=1; i1<=10; i1++) { char numbuf[128]; snprintf(numbuf, sizeof(numbuf)-1, "Step %d\n", (int)i1); GWEN_Gui_ProgressLog(id1, GWEN_LoggerLevel_Notice, numbuf); id2=GWEN_Gui_ProgressStart(GWEN_GUI_PROGRESS_SHOW_LOG | GWEN_GUI_PROGRESS_DELAY | GWEN_GUI_PROGRESS_SHOW_ABORT, "2nd progress", "Starting 2nd progress...", 10, id1); for (i2=1; i2<=10; i2++) { sleep(1); fprintf(stderr, "Advancing %d/%d\n", (int)i1, (int)i2); rv=GWEN_Gui_ProgressAdvance(id2, i2); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (2)\n"); break; } } GWEN_Gui_ProgressEnd(id2); rv=GWEN_Gui_ProgressAdvance(id1, i1); if (rv==GWEN_ERROR_USER_ABORTED) { fprintf(stderr, "Aborted by user (1)\n"); break; } } GWEN_Gui_ProgressEnd(id1); return 0; } int test3(int argc, char **argv) { GWEN_GUI *gui; int rv; GWEN_DIALOG *dlg; rv=GWEN_Init(); if (rv) { DBG_ERROR_ERR(0, rv); return 2; } GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info); setlocale(LC_ALL, ""); gtk_init(&argc, &argv); /* create GUI */ gui=Gtk3_Gui_new(); GWEN_Gui_SetGui(gui); dlg=Dlg_Test2_new(); if (dlg==NULL) { fprintf(stderr, "Could not create dialog.\n"); return 2; } rv=GWEN_Gui_ExecDialog(dlg, 0); fprintf(stderr, "Result: %d\n", rv); return 0; } int main(int argc, char **argv) { if (argc>1) { if (strcasecmp(argv[1], "1")==0) return test1(argc, argv); else if (strcasecmp(argv[1], "2")==0) return test2(argc, argv); else if (strcasecmp(argv[1], "3")==0) return test3(argc, argv); } return test1(argc, argv); } gwenhywfar-5.12.1/gui/gtk3/w_progressbar.c0000666000175000017500000001466013606370704015402 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct W_PROGRESSBAR W_PROGRESSBAR; struct W_PROGRESSBAR { int minValue; int maxValue; int currentValue; }; GWEN_INHERIT(GWEN_WIDGET, W_PROGRESSBAR) static GWENHYWFAR_CB int Gtk3Gui_WProgressBar_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkProgressBar *g; W_PROGRESSBAR *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_PROGRESSBAR, w); assert(xw); g=GTK_PROGRESS_BAR(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: { xw->currentValue=value; if (xw->maxValue) { gdouble d; char numbuf[32]; d=(gdouble)(xw->currentValue-xw->minValue)/(gdouble)(xw->maxValue); gtk_progress_bar_set_fraction(g, d); snprintf(numbuf, sizeof(numbuf)-1, "%d %%", (int)(d*100.0)); numbuf[sizeof(numbuf)-1]=0; gtk_progress_bar_set_text(g, numbuf); } else { gtk_progress_bar_set_fraction(g, 0.0); gtk_progress_bar_set_text(g, ""); } return 0; } case GWEN_DialogProperty_MinValue: { xw->minValue=value; if (xw->maxValue) { gdouble d; char numbuf[32]; d=(gdouble)(xw->currentValue-xw->minValue)/(gdouble)(xw->maxValue); gtk_progress_bar_set_fraction(g, d); snprintf(numbuf, sizeof(numbuf)-1, "%d %%", (int)(d*100.0)); numbuf[sizeof(numbuf)-1]=0; gtk_progress_bar_set_text(g, numbuf); } else { gtk_progress_bar_set_fraction(g, 0.0); gtk_progress_bar_set_text(g, ""); } return 0; } case GWEN_DialogProperty_MaxValue: { xw->maxValue=value; if (xw->maxValue) { gdouble d; char numbuf[32]; d=(gdouble)(xw->currentValue-xw->minValue)/(gdouble)(xw->maxValue); gtk_progress_bar_set_fraction(g, d); snprintf(numbuf, sizeof(numbuf)-1, "%d %%", (int)(d*100.0)); numbuf[sizeof(numbuf)-1]=0; gtk_progress_bar_set_text(g, numbuf); return 0; } else { gtk_progress_bar_set_fraction(g, 0.0); gtk_progress_bar_set_text(g, ""); } } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WProgressBar_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkProgressBar *g; W_PROGRESSBAR *xw; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, W_PROGRESSBAR, w); assert(xw); g=GTK_PROGRESS_BAR(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; case GWEN_DialogProperty_Value: return xw->currentValue; case GWEN_DialogProperty_MinValue: return xw->minValue; case GWEN_DialogProperty_MaxValue: return xw->maxValue; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WProgressBar_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WProgressBar_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void GWENHYWFAR_CB Gtk3Gui_WProgressBar_FreeData(GWEN_UNUSED void *bp, void *p) { W_PROGRESSBAR *xw; xw=(W_PROGRESSBAR *) p; GWEN_FREE_OBJECT(xw); } int Gtk3Gui_WProgressBar_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; W_PROGRESSBAR *xw; GWEN_NEW_OBJECT(W_PROGRESSBAR, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, W_PROGRESSBAR, w, xw, Gtk3Gui_WProgressBar_FreeData); wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_progress_bar_new(); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WProgressBar_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WProgressBar_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WProgressBar_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WProgressBar_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/gtk3_gui_dialog_p.h0000644000175000017500000000530213237641506016070 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifndef GTK3_GUI_DIALOG_P_H #define GTK3_GUI_DIALOG_P_H #include "gtk3_gui_dialog_l.h" typedef struct GTK3_GUI_DIALOG GTK3_GUI_DIALOG; struct GTK3_GUI_DIALOG { GWEN_DIALOG_SETINTPROPERTY_FN setIntPropertyFn; GWEN_DIALOG_GETINTPROPERTY_FN getIntPropertyFn; GWEN_DIALOG_SETCHARPROPERTY_FN setCharPropertyFn; GWEN_DIALOG_GETCHARPROPERTY_FN getCharPropertyFn; GtkWidget *mainWidget; int response; GMainLoop *loop; int destroyed; gulong unmap_handler; gulong destroy_handler; gulong delete_handler; }; static void GWENHYWFAR_CB Gtk3Gui_Dialog_FreeData(void *bp, void *p); static int GWENHYWFAR_CB Gtk3Gui_Dialog_SetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal); static int GWENHYWFAR_CB Gtk3Gui_Dialog_GetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue); static int GWENHYWFAR_CB Gtk3Gui_Dialog_SetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal); static const char *GWENHYWFAR_CB Gtk3Gui_Dialog_GetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue); static int Gtk3Gui_Dialog_SetupTree(GWEN_WIDGET *w); #endif gwenhywfar-5.12.1/gui/gtk3/w_label.c0000666000175000017500000001124013606367637014132 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WLabel_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkLabel *g; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WLabel_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkLabel *g; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WLabel_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkLabel *g; GWEN_BUFFER *tbuf; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); tbuf=GWEN_Buffer_new(0, 128, 0, 1); if (value && *value) Gtk3Gui_GetRawText(value, tbuf); switch (prop) { case GWEN_DialogProperty_Title: gtk_label_set_text(g, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); GWEN_Buffer_free(tbuf); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WLabel_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkLabel *g; g=GTK_LABEL(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Title: return gtk_label_get_label(g); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk3Gui_WLabel_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; GWEN_WIDGET *wParent; GWEN_BUFFER *tbuf; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); tbuf=GWEN_Buffer_new(0, 128, 0, 1); if (s && *s) Gtk3Gui_GetRawText(s, tbuf); g=gtk_label_new(GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WLabel_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WLabel_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WLabel_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WLabel_GetCharProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_vlayout.c0000666000175000017500000001116113606370142014541 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WVLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WVLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WVLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WVLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WVLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GtkWidget *g; GtkWidget *gChild; uint32_t cflags; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); cflags=GWEN_Widget_GetFlags(wChild); gtk_box_pack_start(GTK_BOX(g), gChild, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, (cflags & GWEN_WIDGET_FLAGS_FILLY)?TRUE:FALSE, 0); return 0; } int Gtk3Gui_WVLayout_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_box_new(GTK_ORIENTATION_VERTICAL, GTK3_GUI_DIALOG_DEFAULT_BOX_SPACING); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WVLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WVLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WVLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WVLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WVLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_lineedit.c0000666000175000017500000001513713606370335014646 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WLineEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WLineEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WLineEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: if (value && *value) gtk_entry_set_text(GTK_ENTRY(g), value); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WLineEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: return gtk_entry_get_text(GTK_ENTRY(g)); default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk3Gui_WLineEdit_Deleted_text_handler(GWEN_UNUSED GtkEntryBuffer *entrybuffer, GWEN_UNUSED guint arg1, GWEN_UNUSED guint arg2, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } static void Gtk3Gui_WLineEdit_Inserted_text_handler(GWEN_UNUSED GtkEntryBuffer *entrybuffer, GWEN_UNUSED guint arg1, GWEN_UNUSED gchar *arg2, GWEN_UNUSED guint arg3, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WLineEdit_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; uint32_t flags; GWEN_WIDGET *wParent; gboolean text_is_visible; flags=GWEN_Widget_GetFlags(w); text_is_visible = (flags & GWEN_WIDGET_FLAGS_PASSWORD) == 0; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ g=gtk_entry_new(); if (s && *s) gtk_entry_set_text(GTK_ENTRY(g), s); gtk_entry_set_visibility(GTK_ENTRY(g), text_is_visible); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WLineEdit_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WLineEdit_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WLineEdit_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WLineEdit_GetCharProperty); g_signal_connect(gtk_entry_get_buffer(GTK_ENTRY(g)), "deleted-text", G_CALLBACK(Gtk3Gui_WLineEdit_Deleted_text_handler), w); g_signal_connect(gtk_entry_get_buffer(GTK_ENTRY(g)), "inserted-text", G_CALLBACK(Gtk3Gui_WLineEdit_Inserted_text_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_textedit.c0000666000175000017500000001400513606370414014672 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WTextEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WTextEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; case GWEN_DialogProperty_Width: case GWEN_DialogProperty_Height: /* just ignore these for now */ return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WTextEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkTextIter endIter; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); if (value && *value) gtk_text_buffer_set_text(tb, value, -1); else gtk_text_buffer_set_text(tb, "", -1); gtk_text_buffer_get_end_iter(tb, &endIter); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(g), &endIter, 0.5, FALSE, 0.0, 0.0); return 0; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WTextEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Value: { GtkTextBuffer *tb; GtkTextIter startIter; GtkTextIter endIter; gchar *s; tb=gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)); assert(tb); gtk_text_buffer_get_start_iter(tb, &startIter); gtk_text_buffer_get_end_iter(tb, &endIter); s=gtk_text_buffer_get_text(tb, &startIter, &endIter, FALSE); if (s) { GWEN_Widget_SetText(w, GTK3_DIALOG_STRING_VALUE, s); g_free(s); return GWEN_Widget_GetText(w, GTK3_DIALOG_STRING_VALUE); } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk3Gui_WTextEdit_Changed_handler(GWEN_UNUSED GtkTextBuffer *buffer, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeValueChanged, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WTextEdit_Setup(GWEN_WIDGET *w) { GtkWidget *g; const char *s; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); s=GWEN_Widget_GetText(w, 0); /* create widget */ g=gtk_text_view_new(); if (s && *s) gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)), s, -1); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WTextEdit_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WTextEdit_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WTextEdit_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WTextEdit_GetCharProperty); g_signal_connect(gtk_text_view_get_buffer(GTK_TEXT_VIEW(g)), "changed", G_CALLBACK(Gtk3Gui_WTextEdit_Changed_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_listbox.c0000666000175000017500000003401713606370727014540 00000000000000/*************************************************************************** begin : Fri Jul 09 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #define W_LISTBOX_MAX_TYPES 256 static GWENHYWFAR_CB int Gtk3Gui_WListBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_CONTENT)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; case GWEN_DialogProperty_Value: { GtkTreePath *path; path=gtk_tree_path_new_from_indices(value, -1); gtk_tree_view_set_cursor(GTK_TREE_VIEW(g), path, NULL, FALSE); gtk_tree_path_free(path); return 0; } case GWEN_DialogProperty_SelectionMode: { GtkTreeSelection *sel; sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(g)); if (sel) { switch (value) { case GWEN_Dialog_SelectionMode_None: gtk_tree_selection_set_mode(sel, GTK_SELECTION_NONE); return 0; case GWEN_Dialog_SelectionMode_Single: gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); return 0; case GWEN_Dialog_SelectionMode_Multi: gtk_tree_selection_set_mode(sel, GTK_SELECTION_MULTIPLE); return 0; } DBG_ERROR(GWEN_LOGDOMAIN, "Unknown SelectionMode %d", value); return GWEN_ERROR_INVALID; } break; } case GWEN_DialogProperty_ColumnWidth: { GtkTreeViewColumn *col; col=gtk_tree_view_get_column(GTK_TREE_VIEW(g), index); if (col) { gtk_tree_view_column_set_fixed_width(col, value); return 0; } /* no width */ return GWEN_ERROR_INVALID; } case GWEN_DialogProperty_SortDirection: { GtkTreeViewColumn *col; int i; int cols; /* remove sort indicator from all columns */ cols=GWEN_Widget_GetColumns(w); for (i=0; iW_LISTBOX_MAX_TYPES) cols=W_LISTBOX_MAX_TYPES; for (i=0; idata)); if (s && *s) GWEN_Buffer_AppendString(tbuf, s); cnt++; le=g_list_next(le); } /* while */ GWEN_Widget_SetText(w, GTK3_DIALOG_STRING_TITLE, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); g_list_free(cols); return GWEN_Widget_GetText(w, GTK3_DIALOG_STRING_TITLE); } return defaultValue; } case GWEN_DialogProperty_Value: { GtkTreePath *path; path=gtk_tree_path_new_from_indices(index, -1); if (path!=NULL) { GtkListStore *sto; GtkTreeIter iter; sto=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(g))); if (gtk_tree_model_get_iter(GTK_TREE_MODEL(sto), &iter, path)) { GList *cols; cols=gtk_tree_view_get_columns(GTK_TREE_VIEW(g)); if (cols) { GList *le; GWEN_BUFFER *tbuf; int cnt=0; const char *result; tbuf=GWEN_Buffer_new(0, 256, 0, 1); le=g_list_first(cols); while (le) { gchar *s; if (cnt) GWEN_Buffer_AppendByte(tbuf, '\t'); gtk_tree_model_get(GTK_TREE_MODEL(sto), &iter, cnt, &s, -1, NULL); if (s) { GWEN_Buffer_AppendString(tbuf, s); g_free(s); } cnt++; le=g_list_next(le); } /* while */ GWEN_Widget_SetText(w, GTK3_DIALOG_STRING_VALUE, GWEN_Buffer_GetStart(tbuf)); GWEN_Buffer_free(tbuf); g_list_free(cols); result=GWEN_Widget_GetText(w, GTK3_DIALOG_STRING_VALUE); gtk_tree_path_free(path); return result; } } gtk_tree_path_free(path); } return defaultValue; } default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static void Gtk3Gui_WListBox_CursorChanged_handler(GWEN_UNUSED GtkTreeView *g, gpointer data) { GWEN_WIDGET *w; int rv; w=data; assert(w); rv=GWEN_Dialog_EmitSignal(GWEN_Widget_GetDialog(w), GWEN_DialogEvent_TypeActivated, GWEN_Widget_GetName(w)); if (rv==GWEN_DialogEvent_ResultAccept) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 1); else if (rv==GWEN_DialogEvent_ResultReject) Gtk3Gui_Dialog_Leave(GWEN_Widget_GetTopDialog(w), 0); } int Gtk3Gui_WListBox_Setup(GWEN_WIDGET *w) { GtkWidget *g; GtkWidget *gScroll; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); gScroll=gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gScroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); g=gtk_tree_view_new(); gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(g), TRUE); /* gtk_tree_view_set_rules_hint is deprecated in gtk-3.14 on the * grounds that it's really up to the theme and the user whether the * treeview should be drawn with alternating background colors. */ G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(g), TRUE); G_GNUC_END_IGNORE_DEPRECATIONS gtk_container_add(GTK_CONTAINER(gScroll), GTK_WIDGET(g)); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) gScroll); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WListBox_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WListBox_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WListBox_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WListBox_GetCharProperty); g_signal_connect(g, "cursor-changed", G_CALLBACK(Gtk3Gui_WListBox_CursorChanged_handler), w); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_vline.c0000666000175000017500000000504613606370156014165 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WVLine_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WVLine_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk3Gui_WVLine_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_separator_new(GTK_ORIENTATION_VERTICAL); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WVLine_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WVLine_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_vspacer.c0000666000175000017500000000515613606370172014513 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ static GWENHYWFAR_CB int Gtk3Gui_WVSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WVSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } int Gtk3Gui_WVSpacer_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; wParent=GWEN_Widget_Tree_GetParent(w); g=gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); GWEN_Widget_AddFlags(w, GWEN_WIDGET_FLAGS_FILLY); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WVSpacer_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WVSpacer_GetIntProperty); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/w_gridlayout.c0000666000175000017500000001375513606367763015253 00000000000000/*************************************************************************** begin : Sun May 16 2010 copyright : (C) 2010 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ typedef struct { int sortByRow; int allocatedColumns; int allocatedRows; int currentColumn; int currentRow; } GTK3_GRIDLAYOUT_WIDGET; GWEN_INHERIT(GWEN_WIDGET, GTK3_GRIDLAYOUT_WIDGET) static GWENHYWFAR_CB int Gtk3Gui_WGridLayout_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE); return 0; case GWEN_DialogProperty_Focus: gtk_widget_grab_focus(GTK_WIDGET(g)); return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB int Gtk3Gui_WGridLayout_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, int defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); switch (prop) { case GWEN_DialogProperty_Enabled: return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0; case GWEN_DialogProperty_Focus: return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0; return 0; default: break; } DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WGridLayout_SetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, GWEN_UNUSED const char *value, GWEN_UNUSED int doSignal) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return GWEN_ERROR_INVALID; } static GWENHYWFAR_CB const char *Gtk3Gui_WGridLayout_GetCharProperty(GWEN_WIDGET *w, GWEN_UNUSED GWEN_DIALOG_PROPERTY prop, GWEN_UNUSED int index, const char *defaultValue) { GtkWidget *g; g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); DBG_WARN(GWEN_LOGDOMAIN, "Function is not appropriate for this type of widget (%s)", GWEN_Widget_Type_toString(GWEN_Widget_GetType(w))); return defaultValue; } static GWENHYWFAR_CB int Gtk3Gui_WGridLayout_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild) { GTK3_GRIDLAYOUT_WIDGET *xw; GtkWidget *g; GtkWidget *gChild; int x; int y; assert(w); xw=GWEN_INHERIT_GETDATA(GWEN_WIDGET, GTK3_GRIDLAYOUT_WIDGET, w); assert(xw); g=GTK_WIDGET(GWEN_Widget_GetImplData(w, GTK3_DIALOG_WIDGET_REAL)); assert(g); gChild=GTK_WIDGET(GWEN_Widget_GetImplData(wChild, GTK3_DIALOG_WIDGET_REAL)); assert(gChild); if (xw->sortByRow) { /* fill rows, enter next column if column full */ y=(xw->currentRow)++; if (y>=xw->allocatedRows) { xw->currentRow=0; y=(xw->currentRow)++; xw->currentColumn++; } x=xw->currentColumn; if (x>=xw->allocatedColumns) { xw->allocatedColumns=x+1; } } else { /* fill columns, enter next row if row full */ x=(xw->currentColumn)++; if (x>=xw->allocatedColumns) { xw->currentColumn=0; x=(xw->currentColumn)++; xw->currentRow++; } y=xw->currentRow; if (y>=xw->allocatedRows) { xw->allocatedRows=y+1; } } gtk_grid_attach(GTK_GRID(g), gChild, x, y, 1, 1); return 0; } static GWENHYWFAR_CB void Gtk3Gui_WGridLayout_FreeData(GWEN_UNUSED void *bp, void *p) { GTK3_GRIDLAYOUT_WIDGET *xw; xw=(GTK3_GRIDLAYOUT_WIDGET *) p; GWEN_FREE_OBJECT(xw); } int Gtk3Gui_WGridLayout_Setup(GWEN_WIDGET *w) { GtkWidget *g; GWEN_WIDGET *wParent; GTK3_GRIDLAYOUT_WIDGET *xw; int rows; int cols; GWEN_NEW_OBJECT(GTK3_GRIDLAYOUT_WIDGET, xw); GWEN_INHERIT_SETDATA(GWEN_WIDGET, GTK3_GRIDLAYOUT_WIDGET, w, xw, Gtk3Gui_WGridLayout_FreeData); wParent=GWEN_Widget_Tree_GetParent(w); cols=GWEN_Widget_GetColumns(w); rows=GWEN_Widget_GetRows(w); if (rows>0) { xw->sortByRow=1; xw->allocatedRows=rows; xw->allocatedColumns=1; } else { xw->sortByRow=0; xw->allocatedColumns=cols; xw->allocatedRows=1; } g=gtk_grid_new(); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_REAL, (void *) g); GWEN_Widget_SetImplData(w, GTK3_DIALOG_WIDGET_CONTENT, (void *) g); GWEN_Widget_SetSetIntPropertyFn(w, Gtk3Gui_WGridLayout_SetIntProperty); GWEN_Widget_SetGetIntPropertyFn(w, Gtk3Gui_WGridLayout_GetIntProperty); GWEN_Widget_SetSetCharPropertyFn(w, Gtk3Gui_WGridLayout_SetCharProperty); GWEN_Widget_SetGetCharPropertyFn(w, Gtk3Gui_WGridLayout_GetCharProperty); GWEN_Widget_SetAddChildGuiWidgetFn(w, Gtk3Gui_WGridLayout_AddChildGuiWidget); if (wParent) GWEN_Widget_AddChildGuiWidget(wParent, w); return 0; } gwenhywfar-5.12.1/gui/gtk3/gwengui-gtk3.pc.in0000644000175000017500000000104413237641474015614 00000000000000# pkg-config configuration for gwengui_gtk3 # For information about the syntax, see pkg-config(1) # General installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkgincludedir=@includedir@/gwenhywfar datarootdir=@datarootdir@ datadir=@datadir@ bindir=@bindir@ sysconfdir=@sysconfdir@ # Human-readable name Name: gwengui-gtk3 # Human-readable description Description: GTK3 Implementation of the GWEN_DIALOG framework. Version: @VERSION@ Libs: -L@libdir@ -lgwengui-gtk3 Cflags: -I@includedir@ gwenhywfar-5.12.1/gui/Makefile.in0000644000175000017500000006056215032533614013546 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gui ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ SUBDIRS = testdialogs cpp @gwenhywfar_guis@ DIST_SUBDIRS = testdialogs cpp qt4 qt5 fox16 gtk2 gtk3 cocoa all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gui/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile sources: for d in $(SUBDIRS); do \ make -C $$d sources; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/README0000664000175000017500000001154614611234564011601 00000000000000 This is Gwenhywfar, a multi-platform helper library for networking and security applications and libraries. It is used by - Libchipcard (http://www.libchipcard.de), - OpenHBCI2 (http://www.openhbci.de), - Simthetic, the simulation tool (http://simthetic.sourceforge.net) - AqBanking/AqHBCI (http://www.aqbanking.de/). - and others by using one of the projects above Features ======== This library is written in C, and it follows the object-oriented programming paradigm for most of its parts. The header files can directly be used from C++, too. Gwenhywfar includes the following features: - Basic Data types for binary buffers, ring buffers, linked lists, error objects, string lists (src/base/), buffered IO operations (src/io/) - Macros for typesafe list management - OS abstraction functions for directory and Internet address handling and library loading (src/os/) - Networking functions which allow to manage many connections to be used economically even in single threaded applications - High-level functions for parsing files with a simplified "XML-like" format and accessing them like a hierarchical database (src/parser/) It is able to process valid XML files, too. - High-level cryptographic functions on top of OpenSSL functionality (src/crypt/) - Support for interprocess communication (HTTP on top of SSL or plain TCP/UDP sockets, with or without certificates for clients and/or servers) - A tool to generate simple data containers from XML files. It automatically generates getters, setters, constructor, destructor, deep-copy function, usage counter handling, modification tracking, functions for reading from and writing to GWEN_DBs (used by AqBanking to create the transaction class) Requirements ============ - GnuTLS >= 1.4 (>=2.0.1 recommended) - libgcrypt (>=1.2.0) - pkg-config Platforms ========= Gwenhywfar is being developed on Linux. But the following platforms are also supported: - Windows (98, NT and newer; for using this library from Microsoft Visual Studio C please see the explanations in test/README.MSVC) - FreeBSD - Linux (i386, amd64, alpha) - Mac OS-X - NetBSD (untested, but most likely to work) - OpenBSD (untested, but most likely to work) - SunOS 5.9 (compiles, untested, but most likely to work) On Windows, an .exe setup program is provided, created with the Inno Setup Compiler http://www.jrsoftware.org/isdl.php . Architectures ============= According to Debian Gwen runs on the following platforms: - alpha - amd64 - arm - hppa - i386 - ia64 - m68k - mips - mipsel - powerpc - s390 - sparc Environment Variables ===================== "GWEN_MEMORY_DEBUG" ------------------- This integer variable tells gwen whether (and how) to print the memory debugger statistic. This only works for sources compiled with the defined macro GWEN_MEMORY_DEBUG. - "0" shows ALL listed objects - "1" only shows those objects whose count is not 0 "GWEN_TLS_CIPHER_PRIORITIES" -------------------------- If this environment variable is set, the SSL code will initialize the GnuTLS library with the provided cipher priority list. If this environment variable is unset, the default cipher priority list of the GnuTLS library is being used. For the exact format of the cipher priority list and its default, please consult the GnuTLS documentation, section "Priority strings": http://gnutls.org/manual/html_node/Priority-Strings.html Registry Keys ============= On Windows platforms Gwen uses some keys below HKEY_CURRENT_USER to store information about file/folder locations. The keys are set in the Inno Setup file gwenhywfar.iss, so please check the [Registry] section in gwenyhwfar.iss.in for the authoritative source of available registry keys. "Software\\Gwenhywfar\\Paths\\dbio-plugins" ------------------------------------------- Complete path to the folder containing GWENs DBIO plugins. (and some more keys. See gwenhywfar.iss.in) Documentation ============= The documentation can be found in the header files. Many header files already include extensive comments in doxygen-format (however some don't). For a more or less complete API documentation use the command "make srcdoc" You will need the tool doxygen for this command to run. Contact ======= For questions about this library please ask on the mailing list of the AqBanking project aqbanking-devel (subscriber-only, please subscribe on http://lists.sourceforge.net/lists/listinfo/aqbanking-devel), since this is where the author(s) hang out. Authors ======= This library is being written by and is being maintained by Martin Preuss . I also wish to thank Christian Stimming for his contributions and for adding MSVC support to Gwen (thus making Gwen completely available on Windows). Name ==== The name of this library was chosen to honour a very special person ;-) (that should suffice as an explanation) 2024/04/21 gwenhywfar-5.12.1/admin/0000755000175000017500000000000015032533712012053 500000000000000gwenhywfar-5.12.1/admin/mklistdoc.c0000644000175000017500000003630313552051304014132 00000000000000/*************************************************************************** begin : Fri Jun 02 2004 copyright : (C) 2019 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * Please see toplevel file COPYING for license details * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #define MAX_LINESIZE 8192 typedef struct MACRO_DEF MACRO_DEF; struct MACRO_DEF { const char *macroName; const char *tmplFileName; const char *fileSuffix; }; typedef struct MACRO_STRUCT MACRO_STRUCT; struct MACRO_STRUCT { MACRO_STRUCT *next; MACRO_DEF *macroDef; char *typeName; char *typePrefix; }; MACRO_DEF macroDefs[]= { { "GWEN_LIST2_FUNCTION_DEFS", "list2.tmpl", "_list2p" }, { "GWEN_LIST2_FUNCTION_LIB_DEFS", "list2.tmpl", "_list2" }, { "GWEN_CONSTLIST2_FUNCTION_DEFS", "list2.tmpl", "_constlist2p" }, { "GWEN_CONSTLIST2_FUNCTION_LIB_DEFS", "list2.tmpl", "_constlist2" }, { "GWEN_LIST_FUNCTION_DEFS", "list1.tmpl", "_listp" }, { "GWEN_LIST_FUNCTION_LIB_DEFS", "list1.tmpl", "_list" }, { "GWEN_CONSTLIST_FUNCTION_DEFS", "list1.tmpl", "_constlistp" }, { "GWEN_CONSTLIST_FUNCTION_LIB_DEFS", "list1.tmpl", "_constlist" }, { 0, 0, 0 } }; #define MODE_CHECKONLY 1 #define MODE_WRITEHEADER 2 #define MODE_WRITESTDOUT 3 const char *templatePath=GWEN_HEADERS; int mode=MODE_WRITESTDOUT; int verbosity=0; /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ static MACRO_STRUCT *MacroStruct_new(MACRO_DEF *macroDef, const char *typeName, const char *typePrefix); /*static void MacroStruct_free(MACRO_STRUCT *m);*/ static int scanLine(MACRO_DEF *macroDef, char *buffer, MACRO_STRUCT **m); static int scanLineForAllMacros(char *buffer, MACRO_STRUCT **m); static MACRO_STRUCT *scanForMacros(const char *fname); static int transformF(FILE *inFile, FILE *outFile, const char *outFileName, MACRO_STRUCT *m); static int transform(const char *inFile, const char *outFile, MACRO_STRUCT *m); static int processFile(const char *fname); int main(int argc, char **argv); /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ MACRO_STRUCT *MacroStruct_new(MACRO_DEF *macroDef, const char *typeName, const char *typePrefix) { MACRO_STRUCT *m; m=(MACRO_STRUCT *)malloc(sizeof(MACRO_STRUCT)); memset(m, 0, sizeof(MACRO_STRUCT)); m->macroDef=macroDef; if (typeName) m->typeName=strdup(typeName); if (typePrefix) m->typePrefix=strdup(typePrefix); return m; } #if 0 void MacroStruct_free(MACRO_STRUCT *m) { if (m) { free(m->typeName); free(m->typePrefix); free(m); } } #endif int scanLine(MACRO_DEF *macroDef, char *buffer, MACRO_STRUCT **m) { char *p; char *macroBegin; p=strstr(buffer, macroDef->macroName); if (p) { /* found something, search for opening bracket */ macroBegin=p; p+=strlen(macroDef->macroName); while (*p && isspace((int)*p)) p++; if (*p && *p!='(') return -1; while (*p) { if (*p=='(') { char *typeName; char *typeNameEnd; char *typePrefix; char *typePrefixEnd; typeName=typePrefix=0; typeNameEnd=typePrefixEnd=0; /* found it, now read the typename */ p++; while (*p && isspace((int)*p)) p++; typeName=p; /* find comma */ while (*p) { if (*p==',') { /* found it, name ends here */ if (!typeNameEnd) typeNameEnd=p; p++; while (*p && isspace((int)*p)) p++; typePrefix=p; /* find closing bracket */ while (*p) { if (*p==')' || *p==',') { MACRO_STRUCT *lm; MACRO_STRUCT *sm; char *s; char c1, c2; /* found it, now all is complete */ if (!typePrefixEnd) typePrefixEnd=p; /* check whether this is a definition */ s=buffer; while (*s && isspace((int)*s)) s++; if (*s=='#') { s++; /* preprocessor command, check for define */ while (*s && isspace((int)*s)) s++; if (strncasecmp(s, "define ", 7)==0) { s+=7; /* it is a define, now check if the next nonblank is * the beginning of this macro */ while (*s && isspace((int)*s)) s++; if (s==macroBegin) { if (verbosity>1) fprintf(stderr, "Found definition for macro \"%s\".\n", macroDef->macroName); return -1; } } } c1=*typePrefixEnd; c2=*typeNameEnd; *typePrefixEnd=0; *typeNameEnd=0; sm=*m; while (sm) { if (strcmp(sm->macroDef->macroName, macroDef->macroName)==0) if (strcmp(sm->typeName, typeName)==0) /* already exists */ break; sm=sm->next; } if (!sm) { /* macro is new, store it */ lm=MacroStruct_new(macroDef, typeName, typePrefix); *typePrefixEnd=c1; *typeNameEnd=c2; if (*m==0) *m=lm; else { lm->next=*m; *m=lm; } if (verbosity>1) fprintf(stderr, "Found macro \"%s\" (%s, %s)\n", lm->macroDef->macroName, lm->typeName, lm->typePrefix); } return 0; } else if (isspace((int)*p)) { if (!typePrefixEnd) typePrefixEnd=p; } else { if (typePrefixEnd) return -1; } p++; } /* closing bracket missing, probably need more data... */ return 1; } else if (isspace((int)*p)) { if (!typeNameEnd) typeNameEnd=p; } else { if (typeNameEnd) return -1; } p++; } /* comma missing, probably need more data... */ return 1; } p++; } /* opening bracket missing, probably need more data... */ return 1; } /* macro not found in this line */ return -1; } int scanLineForAllMacros(char *buffer, MACRO_STRUCT **m) { int i; for (i=0; ; i++) { if (macroDefs[i].macroName==0) return 0; if (scanLine(¯oDefs[i], buffer, m)==1) return 1; } return 0; } MACRO_STRUCT *scanForMacros(const char *fname) { FILE *f; MACRO_STRUCT *mst; char buffer[MAX_LINESIZE]; int line; char *p; mst=0; line=0; if (verbosity) fprintf(stderr, "Reading file \"%s\"\n", fname); f=fopen(fname, "r"); if (!f) { fprintf(stderr, "fopen(%s): %s\n", fname, strerror(errno)); return 0; } buffer[0]=0; buffer[sizeof(buffer)-1]=0; while (!feof(f)) { int sl; int rv; line++; if (verbosity>3) fprintf(stderr, "Reading line %d\n", line); /* read line */ if (buffer[0]==0) { p=fgets(buffer, sizeof(buffer)-1, f); } else { int sizeLeft; if (verbosity>3) fprintf(stderr, "Multi-line macro (%d)\n", line); sl=strlen(buffer); sizeLeft=(sizeof(buffer)-1)-sl; if (sizeLeft<2) { fprintf(stderr, "Line %d: Line full, macro too long\n", line); fclose(f); return 0; } strcat(buffer, " "); p=fgets(buffer+sl+1, sizeLeft, f); } if (!p) { if (ferror(f)) { fprintf(stderr, "fread(%s): %s\n", fname, strerror(errno)); fclose(f); return 0; } else /* simple eof */ break; } sl=strlen(buffer); if (buffer[sl-1]=='\n') buffer[--sl]=0; if (buffer[sl-1]=='\\') { buffer[--sl]=0; } else { /* now check for macros */ rv=scanLineForAllMacros(buffer, &mst); if (rv!=1) /* no more data needed */ buffer[0]=0; } } /* while */ fclose(f); return mst; } int transformF(FILE *inFile, FILE *outFile, const char *outFileName, MACRO_STRUCT *m) { char *p; char buffer[MAX_LINESIZE]; int didIt; while (!feof(inFile)) { char *vname; int sl; /* read line */ p=fgets(buffer, sizeof(buffer)-1, inFile); if (!p) { if (ferror(inFile)) { fprintf(stderr, "fread(): %s\n", strerror(errno)); return 0; } else /* simple eof */ break; } sl=strlen(buffer); if (buffer[sl-1]=='\n') buffer[--sl]=0; vname=0; p=buffer; while (*p) { while (*p && *p!='@') { if (EOF==fputc(*p, outFile)) { fprintf(stderr, "fputc(): %s (1)\n", strerror(errno)); return 2; } p++; } didIt=0; if (*p=='@') { char *psave; /* got a var... */ psave=p; p++; vname=p; while (*p && *p!='@') p++; if (*p=='@') { char c; const char *replacement; /* got it */ c=*p; *p=0; if (strcmp(vname, "TYPENAME")==0) replacement=m->typeName; else if (strcmp(vname, "FN_PREFIX")==0) replacement=m->typePrefix; else if (strcmp(vname, "FILENAME")==0) replacement=outFileName; else { /* not a var */ replacement=0; } *p=c; p++; if (replacement) { if (fprintf(outFile, "%s", replacement)<1) { fprintf(stderr, "fprintf(): %s\n", strerror(errno)); return 2; } didIt=1; } else { /* write the original data */ p=psave; } } else /* write the original data */ p=psave; } if (!didIt) { if (*p) { if (EOF==fputc(*p, outFile)) { fprintf(stderr, "fputc(): %s\n", strerror(errno)); return 2; } p++; } } } /* while line */ fprintf(outFile, "\n"); } /* while */ return 0; } int transform(const char *inFile, const char *outFile, MACRO_STRUCT *m) { FILE *f1; FILE *f2; int rv; f1=fopen(inFile, "r"); if (!f1) { fprintf(stderr, "fopen(%s, \"r\"): %s\n", inFile, strerror(errno)); return 2; } if (outFile==0) { f2=stdout; rv=transformF(f1, f2, "(stdout)", m); } else { f2=fopen(outFile, "w+"); if (!f2) { fprintf(stderr, "fopen(%s, \"w+\"): %s\n", outFile, strerror(errno)); fclose(f1); return 2; } rv=transformF(f1, f2, outFile, m); } if (outFile!=0) { if (fclose(f2)) { fprintf(stderr, "fclose(%s): %s\n", outFile, strerror(errno)); fclose(f1); return 2; } } if (fclose(f1)) { fprintf(stderr, "fclose(%s): %s\n", inFile, strerror(errno)); return 2; } return rv; } int processFile(const char *fname) { MACRO_STRUCT *m; m=scanForMacros(fname); if (m) { /* do something with the macros */ if (mode==MODE_WRITESTDOUT) { MACRO_STRUCT *cm; cm=m; while (cm) { int rv; char tmplBuffer[256]; rv=snprintf(tmplBuffer, sizeof(tmplBuffer), "%s/%s", templatePath, cm->macroDef->tmplFileName); if (rv<1 || rv>=(int)sizeof(tmplBuffer)) { fprintf(stderr, "Internal error: buffer too small [processFile]\n"); return 3; } rv=transform(tmplBuffer, 0, cm); if (rv) { fprintf(stderr, "Error transforming template file.\n"); return rv; } cm=cm->next; } } } return 0; } int main(int argc, char **argv) { int i = 1; int wantHelp; wantHelp=0; if (argc<2) { wantHelp=1; } else { i=1; while (i=argc) { fprintf(stderr, "Argument missing for -I\n"); return 1; } templatePath=argv[i]; } else if (strcmp(argv[i], "-v")==0) { verbosity++; } else if (strcmp(argv[i], "-h")==0 || strcmp(argv[i], "--help")==0) { wantHelp=1; } else if (strcmp(argv[i], "--doc")==0) { /* only generate header */ mode=MODE_WRITEHEADER; } else if (strcmp(argv[i], "--stdout")==0) { /* write all headers to stdout instead of creating one header per * input */ mode=MODE_WRITESTDOUT; } else break; i++; } } if (wantHelp) { fprintf(stderr, "MkListDoc (c) 2004 Martin Preuss\n" "Part of Gwenhywfar " GWENHYWFAR_VERSION_FULL_STRING "\n" "This tool is licensed under the LGPL (see COPYING in\n" "toplevel source folder).\n" "MkListDoc expands GWEN_LIST macros and creates a suitable\n" "header file for every encounterd list definition macro.\n" "Example:\n" "You are using GWEN_LIST2 macros to manage list of some objects:\n" " GWEN_LIST2_FUNCTION_DEFS(TYPE_SOMETHING, TypeSomething);\n" "The list is now available but not documented by Doxygen.\n" "This tool now creates output that can then be fed to doxygen\n" "to create appropriate API documentation.\n" "\n" "Usage: %s [OPTIONS] file1 file2 ... fileN\n" "Options are:\n" "-v increases the verbosity level\n" "-I path to GWEN include headers\n" "Output is sent to stdout.\n", argv[0]); return 0; } if (i>=argc) { /* no input ? */ fprintf(stderr, "No input files.\n"); return 1; } while (i&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mklistdoc$(EXEEXT) subdir = admin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mklistdoc_OBJECTS = mklistdoc.$(OBJEXT) mklistdoc_OBJECTS = $(am_mklistdoc_OBJECTS) mklistdoc_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/mklistdoc.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mklistdoc_SOURCES) DIST_SOURCES = $(mklistdoc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ AM_CPPFLAGS = @all_includes@ AM_CFLAGS = -DGWEN_HEADERS=\"$(gwenhywfar_headerdir_am)/gwenhywfar\" @WERROR@ mklistdoc_SOURCES = mklistdoc.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu admin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu admin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list mklistdoc$(EXEEXT): $(mklistdoc_OBJECTS) $(mklistdoc_DEPENDENCIES) $(EXTRA_mklistdoc_DEPENDENCIES) @rm -f mklistdoc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mklistdoc_OBJECTS) $(mklistdoc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mklistdoc.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/mklistdoc.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/mklistdoc.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile sources: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/admin/Makefile.am0000666000175000017500000000025213552050376014037 00000000000000AM_CPPFLAGS=@all_includes@ AM_CFLAGS = -DGWEN_HEADERS=\"$(gwenhywfar_headerdir_am)/gwenhywfar\" @WERROR@ bin_PROGRAMS=mklistdoc mklistdoc_SOURCES=mklistdoc.c sources: gwenhywfar-5.12.1/Makefile.in0000644000175000017500000014460315032533614012761 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @IF_MAKE_I18N_FILES_TRUE@am__append_1 = $(I18NCATALOGS) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_M4_DATA) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = Doxyfile gwenhywfar-config.in gwenhywfar.pc \ gwenhywfar-config.cmake gwenhywfar-config-version.cmake \ gwenhywfar.spec gwenhywfar.iss CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cmakeconfigdir)" \ "$(DESTDIR)$(M4dir)" "$(DESTDIR)$(pkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(cmakeconfig_DATA) $(dist_M4_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.in \ $(srcdir)/config.h.in \ $(srcdir)/gwenhywfar-config-version.cmake.in \ $(srcdir)/gwenhywfar-config.cmake.in \ $(srcdir)/gwenhywfar-config.in.in $(srcdir)/gwenhywfar.iss.in \ $(srcdir)/gwenhywfar.pc.in $(srcdir)/gwenhywfar.spec.in \ AUTHORS COPYING ChangeLog INSTALL NEWS README TODO compile \ config.guess config.rpath config.sub install-sh ltmain.sh \ missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ SUBDIRS = admin data m4 src plugins tools gui test po doc checks DIST_SUBDIRS = admin data m4 src plugins tools gui test doc po checks AUTOMAKE_OPTIONS = foreign EXTRA_DIST = config.rpath \ ChangeLog \ README.W32 \ README.DARWIN \ README.SOLARIS \ RELEASES \ gwenhywfar.spec \ Makefile.cvs \ i18nsources bin_SCRIPTS = gwenhywfar-config M4dir = $(datadir)/aclocal dist_M4_DATA = gwenhywfar.m4 ACLOCAL_AMFLAGS = -I m4 BUILT_SOURCES = $(gwenhywfar_symlinkdir)/gwenhywfar/version.h $(gwenhywfar_symlinkdir)/gwenhywfar/types.h $(gwenhywfar_symlinkdir)/gwenhywfar/system.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gwenhywfar.pc cmakeconfigdir = $(libdir)/cmake/gwenhywfar-@GWENHYWFAR_VERSION_MAJOR@.@GWENHYWFAR_VERSION_MINOR@ cmakeconfig_DATA = gwenhywfar-config.cmake gwenhywfar-config-version.cmake CLEANFILES = gwenhywfar-config $(PACKAGE).tag listdoc.h \ $(am__append_1) DISTCLEANFILES = gwenhywfar-config.in @CROSS_COMPILING_TRUE@mklistdoc_preqreq = @CROSS_COMPILING_FALSE@mklistdoc_exe = admin/mklistdoc @CROSS_COMPILING_TRUE@mklistdoc_exe = mklistdoc @CROSS_COMPILING_FALSE@mklistdoc_prereq = $(top_builddir)/admin/mklistdoc # Rule for using the Inno Setup compiler. The path to iscc.exe is # set manually here for now and can be overridden if you set an # env variable with the same name. ISCC = "C:\Program Files\Inno Setup 5\iscc.exe" wintmpdir = distribution # We directly read that file list. For old make programs, you would # set this to an empty variable, because they are only needed by the # developers and release technicians. @IF_MAKE_I18N_FILES_TRUE@I18NFILES = $(shell cat $(srcdir)/i18nsources) @IF_MAKE_I18N_FILES_TRUE@DLGFILES = $(shell cat $(srcdir)/dlgsources) @IF_MAKE_I18N_FILES_TRUE@PDFILES = $(shell cat $(srcdir)/pdsources) # Could also be solved this way: Read the I18NFILES variable from file #include $(srcdir)/i18nsources # (Needs the following build rule:) #sources: # rm -f $(srcdir)/i18nsources # make -C $(top_srcdir)/src sources # mv $(srcdir)/i18nsources $(srcdir)/i18nsources.tmp # echo "I18NFILES = \\" > $(srcdir)/i18nsources # $(SED) 's!\(^.*$$\)!$$(top_srcdir)/\1 \\!' \ # $(srcdir)/i18nsources.tmp >> $(srcdir)/i18nsources # echo '$$(top_srcdir)/config.h' >> $(srcdir)/i18nsources # rm -f $(srcdir)/i18nsources.tmp # make Makefile # The list of available languages (makes file name transformations much easier) @IF_MAKE_I18N_FILES_TRUE@ALL_LINGUAS = $(basename $(notdir $(shell ls $(srcdir)/po/*.po))) # For old make programs, the locales would directly be written here: #ALL_LINGUAS = de # List of po files. Only necessary in the dependency of the catalogs # rule. For old make programs, you would simpy set this to an empty # variable. @IF_MAKE_I18N_FILES_TRUE@I18NLINGUAS = $(foreach lang,$(ALL_LINGUAS),$(srcdir)/po/$(lang).po) # List of mo files. Only necessary for cleanup. For old make programs, # you would simply set this to an empty variable. @IF_MAKE_I18N_FILES_TRUE@I18NCATALOGS = $(foreach lang,$(ALL_LINGUAS),$(top_builddir)/po/$(lang).mo) @IF_MAKE_I18N_FILES_TRUE@MSGHACK = "$(srcdir)/tools/msghack" all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ gwenhywfar-config.in: $(top_builddir)/config.status $(srcdir)/gwenhywfar-config.in.in cd $(top_builddir) && $(SHELL) ./config.status $@ gwenhywfar.pc: $(top_builddir)/config.status $(srcdir)/gwenhywfar.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ gwenhywfar-config.cmake: $(top_builddir)/config.status $(srcdir)/gwenhywfar-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ gwenhywfar-config-version.cmake: $(top_builddir)/config.status $(srcdir)/gwenhywfar-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ gwenhywfar.spec: $(top_builddir)/config.status $(srcdir)/gwenhywfar.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ gwenhywfar.iss: $(top_builddir)/config.status $(srcdir)/gwenhywfar.iss.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-cmakeconfigDATA: $(cmakeconfig_DATA) @$(NORMAL_INSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cmakeconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cmakeconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakeconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakeconfigdir)" || exit $$?; \ done uninstall-cmakeconfigDATA: @$(NORMAL_UNINSTALL) @list='$(cmakeconfig_DATA)'; test -n "$(cmakeconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(cmakeconfigdir)'; $(am__uninstall_files_from_dir) install-dist_M4DATA: $(dist_M4_DATA) @$(NORMAL_INSTALL) @list='$(dist_M4_DATA)'; test -n "$(M4dir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(M4dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(M4dir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(M4dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(M4dir)" || exit $$?; \ done uninstall-dist_M4DATA: @$(NORMAL_UNINSTALL) @list='$(dist_M4_DATA)'; test -n "$(M4dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(M4dir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(SCRIPTS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cmakeconfigdir)" "$(DESTDIR)$(M4dir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @IF_MAKE_I18N_FILES_FALSE@install-data-local: @IF_MAKE_I18N_FILES_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-cmakeconfigDATA install-data-local \ install-dist_M4DATA install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-cmakeconfigDATA \ uninstall-dist_M4DATA uninstall-local uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-local distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-cmakeconfigDATA \ install-data install-data-am install-data-local \ install-dist_M4DATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-cmakeconfigDATA uninstall-dist_M4DATA \ uninstall-local uninstall-pkgconfigDATA .PRECIOUS: Makefile $(gwenhywfar_symlinkdir)/gwenhywfar/version.h: $(top_builddir)/src/version.h make -C ` dirname $< ` ` basename $< ` ( cd $(gwenhywfar_symlinkdir)/gwenhywfar && $(LN_S) -f ../../$< ` basename $@ ` ) $(gwenhywfar_symlinkdir)/gwenhywfar/types.h: $(top_builddir)/src/types.h make -C ` dirname $< ` ` basename $< ` ( cd $(gwenhywfar_symlinkdir)/gwenhywfar && $(LN_S) -f ../../$< ` basename $@ ` ) $(gwenhywfar_symlinkdir)/gwenhywfar/system.h: $(top_builddir)/src/os/$(OS_TYPE)/system.h make -C ` dirname $< ` ` basename $< ` ( cd $(gwenhywfar_symlinkdir)/gwenhywfar && $(LN_S) -f ../../$< ` basename $@ ` ) gwenhywfar-config: gwenhywfar-config.in echo "#! /bin/sh" >gwenhywfar-config && \ echo 'dir="@prefix@"' >>gwenhywfar-config && \ cat gwenhywfar-config.in >>gwenhywfar-config && \ chmod a+x gwenhywfar-config distclean-local: distclean-local-check .PHONY: distclean-local distclean-local-check: rm -rf apidoc gwenhywfar5 listdoc.h: $(mklistdoc_prereq) $(mklistdoc_exe) -v -I $(top_srcdir)/src/base `find "$(top_builddir)/gwenhywfar5/gwenhywfar" -name "*.h" | LC_ALL=C sort` >$@ $(top_builddir)/admin/mklistdoc: $(MAKE) -C "$(top_builddir)/admin" mklistdoc srcdoc: Doxyfile listdoc.h doxygen $(PACKAGE).tag: Doxyfile listdoc.h doxygen install-srcdoc: $(PACKAGE).tag test -d "$(DESTDIR)@docpath@/$(PACKAGE)" || \ mkdir -p "$(DESTDIR)@docpath@/$(PACKAGE)" for f in apidoc/*; do \ cp -dR $$f "$(DESTDIR)@docpath@/$(PACKAGE)/"; \ done cp "$(PACKAGE).tag" "$(DESTDIR)@docpath@/" if test -x "$(DESTDIR)@docpath@/$(PACKAGE)/installdox"; then \ cd "$(DESTDIR)@docpath@/$(PACKAGE)" && \ ID_OPT="-q" ; \ for ff in ${DOXYGEN_TAGFILES}; do \ ID_OPT="$$ID_OPT -l `basename $$ff`@../`basename $$ff | $(SED) -e s/.tag//`";\ done ;\ ( cd "$(DESTDIR)@docpath@/$(PACKAGE)" && \ ./installdox -q $$ID_OPT \ ); \ fi rpm: $(PACKAGE).spec dist rpmbuild="rpm" && \ if [ `rpm --version | awk '{ print $$3 }'` > /dev/null ]; then rpmbuild="rpmbuild"; fi && \ $$rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz setup: gwenhywfar.iss mkdir -p $(wintmpdir) make prefix="`pwd`/$(wintmpdir)/usr" \ WIN_PATH_WINDOWS_MINGW="`pwd`/$(wintmpdir)/usr/windows" \ install \ && $(ISCC) gwenhywfar.iss \ && rm -rf $(wintmpdir) # Rule for only building the source rpm srpm: $(PACKAGE).spec dist rpmbuild="rpm" && \ if [ `rpm --version | awk '{ print $$3 }'` > /dev/null ]; then rpmbuild="rpmbuild"; fi && \ $$rpmbuild --nodeps -ts $(PACKAGE)-$(VERSION).tar.gz # Current build rule: @IF_MAKE_I18N_FILES_TRUE@sources: @IF_MAKE_I18N_FILES_TRUE@ rm -f $(srcdir)/i18nsources $(srcdir)/dlgsources @IF_MAKE_I18N_FILES_TRUE@ for d in $(SUBDIRS); do \ @IF_MAKE_I18N_FILES_TRUE@ $(MAKE) -C $$d sources; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@static-sources: @IF_MAKE_I18N_FILES_TRUE@ rm -f $(srcdir)/i18nsources $(srcdir)/dlgsources $(srcdir)/pdsources @IF_MAKE_I18N_FILES_TRUE@ for d in src plugins; do \ @IF_MAKE_I18N_FILES_TRUE@ $(MAKE) -C $$d sources; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@$(srcdir)/i18nsources $(srcdir)/dlgsources $(srcdir)/pdsources: @IF_MAKE_I18N_FILES_TRUE@ $(MAKE) sources @IF_MAKE_I18N_FILES_TRUE@$(srcdir)/po/$(PACKAGE).pot: i18nsources dlgsources pdsources $(I18NFILES) @IF_MAKE_I18N_FILES_TRUE@ rm -f po/tmp* @IF_MAKE_I18N_FILES_TRUE@ if test -n "$(I18NFILES)"; then \ @IF_MAKE_I18N_FILES_TRUE@ cd $(srcdir); \ @IF_MAKE_I18N_FILES_TRUE@ $(XGETTEXT) -C -c -ki18n -ktr2i18n -kI18N -kI18S\ @IF_MAKE_I18N_FILES_TRUE@ -kI18N_NOOP -ktranslate -kaliasLocale \ @IF_MAKE_I18N_FILES_TRUE@ -ktr -ktrUtf8 \ @IF_MAKE_I18N_FILES_TRUE@ '--msgid-bugs-address=aqbanking-user@lists.aqbanking.de' \ @IF_MAKE_I18N_FILES_TRUE@ -o po/tmppot \ @IF_MAKE_I18N_FILES_TRUE@ $(I18NFILES) ; \ @IF_MAKE_I18N_FILES_TRUE@ fi @IF_MAKE_I18N_FILES_TRUE@ for i in $(DLGFILES); do \ @IF_MAKE_I18N_FILES_TRUE@ cd $(srcdir); \ @IF_MAKE_I18N_FILES_TRUE@ po4a-gettextize -f xml -m $$i -p po/tmppot1 -o attributes=text && \ @IF_MAKE_I18N_FILES_TRUE@ $(MSGHACK) -o po/tmppot2 --append po/tmppot po/tmppot1 && \ @IF_MAKE_I18N_FILES_TRUE@ mv po/tmppot2 po/tmppot; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@ for i in $(PDFILES); do \ @IF_MAKE_I18N_FILES_TRUE@ po4a-gettextize -f xml -m $$i -p $(srcdir)/po/tmppot1 -o wrap \ @IF_MAKE_I18N_FILES_TRUE@ -o translated=" " \ @IF_MAKE_I18N_FILES_TRUE@ -o untranslated=" " \ @IF_MAKE_I18N_FILES_TRUE@ && \ @IF_MAKE_I18N_FILES_TRUE@ $(MSGHACK) -o $(srcdir)/po/tmppot2 --append $(srcdir)/po/tmppot $(srcdir)/po/tmppot1 && \ @IF_MAKE_I18N_FILES_TRUE@ mv $(srcdir)/po/tmppot2 $(srcdir)/po/tmppot; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@ mv $(srcdir)/po/tmppot $(srcdir)/po/$(PACKAGE).pot @IF_MAKE_I18N_FILES_TRUE@ rm -f $(srcdir)/po/tmppot1 # This rule is called automatically at install time. However, it is # necessary only for the translators, so maybe it shouldn't be called # at install time. @IF_MAKE_I18N_FILES_TRUE@merge: $(srcdir)/po/$(PACKAGE).pot @IF_MAKE_I18N_FILES_TRUE@ @catalogs=$(I18NLINGUAS); \ @IF_MAKE_I18N_FILES_TRUE@ for cat in $$catalogs; do \ @IF_MAKE_I18N_FILES_TRUE@ echo msgmerge -o $$cat.new $$cat $(srcdir)/po/$(PACKAGE).pot ; \ @IF_MAKE_I18N_FILES_TRUE@ msgmerge -o $$cat.new $$cat $(srcdir)/po/$(PACKAGE).pot ; \ @IF_MAKE_I18N_FILES_TRUE@ if test -s $$cat.new; then \ @IF_MAKE_I18N_FILES_TRUE@ grep -v "\"POT-Creation" $$cat.new > $$cat.new.2 ; \ @IF_MAKE_I18N_FILES_TRUE@ grep -v "\"POT-Creation" $$cat >> $$cat.new.1; \ @IF_MAKE_I18N_FILES_TRUE@ if diff $$cat.new.1 $$cat.new.2; then \ @IF_MAKE_I18N_FILES_TRUE@ echo " $$cat unchanged; leaving existing po file untouched."; \ @IF_MAKE_I18N_FILES_TRUE@ rm $$cat.new; \ @IF_MAKE_I18N_FILES_TRUE@ else \ @IF_MAKE_I18N_FILES_TRUE@ mv $$cat.new $$cat ; \ @IF_MAKE_I18N_FILES_TRUE@ fi; \ @IF_MAKE_I18N_FILES_TRUE@ rm -f $$cat.new.1 $$cat.new.2 ;\ @IF_MAKE_I18N_FILES_TRUE@ fi ;\ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@catalogs: $(I18NLINGUAS) @IF_MAKE_I18N_FILES_TRUE@ @for i in $(ALL_LINGUAS); do \ @IF_MAKE_I18N_FILES_TRUE@ filelingua=$(srcdir)/po/$$i.po; \ @IF_MAKE_I18N_FILES_TRUE@ filecat=$(top_builddir)/po/$$i.mo; \ @IF_MAKE_I18N_FILES_TRUE@ echo "Creating translation catalogs for language \"$$i\""; \ @IF_MAKE_I18N_FILES_TRUE@ echo $(MSGFMT) -o $${filecat} $${filelingua} ; \ @IF_MAKE_I18N_FILES_TRUE@ $(MSGFMT) -o $${filecat} $${filelingua} || touch $${filelingua}; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@install-mo-catalogs: catalogs @IF_MAKE_I18N_FILES_TRUE@ @for i in $(ALL_LINGUAS); do \ @IF_MAKE_I18N_FILES_TRUE@ filecat=$(top_builddir)/po/$$i.mo; \ @IF_MAKE_I18N_FILES_TRUE@ echo "Installing translation catalog for language \"$$i\""; \ @IF_MAKE_I18N_FILES_TRUE@ $(mkinstalldirs) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES"; \ @IF_MAKE_I18N_FILES_TRUE@ echo $(INSTALL_DATA) $${filecat} $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/$(PACKAGE).mo; \ @IF_MAKE_I18N_FILES_TRUE@ $(INSTALL_DATA) $${filecat} $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/$(PACKAGE).mo; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@uninstall-mo-catalogs: @IF_MAKE_I18N_FILES_TRUE@ @$(NORMAL_UNINSTALL) @IF_MAKE_I18N_FILES_TRUE@ @for i in $(ALL_LINGUAS); do \ @IF_MAKE_I18N_FILES_TRUE@ echo " rm -f '$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/$(PACKAGE).mo'"; \ @IF_MAKE_I18N_FILES_TRUE@ rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/$(PACKAGE).mo"; \ @IF_MAKE_I18N_FILES_TRUE@ done @IF_MAKE_I18N_FILES_TRUE@install-data-local: install-mo-catalogs @IF_MAKE_I18N_FILES_TRUE@uninstall-local: uninstall-mo-catalogs format: find . -name '*.[c,h,cpp]' -exec $(ASTYLE) \ --style=stroustrup \ -s2 \ --min-conditional-indent=0 \ --indent-labels \ --max-continuation-indent=80 \ --pad-comma \ --pad-header \ --unpad-paren \ --align-pointer=name \ --break-closing-braces \ --break-one-line-headers \ --attach-return-type \ --convert-tabs \ --max-code-length=120 \ --break-after-logical \ --preserve-date \ --suffix=none \{\} \; cppcheck: for f in `find . -name \*.c -o -name \*.cpp`; do cppcheck $$f; done ChangeLog: if test -d .git; then \ git log --pretty="format:------------------------------------------------------------------%n%ai %an%n%s%n%b" -n 100 >ChangeLog ;\ else \ touch ChangeLog; \ fi dist-hook: rm -f ChangeLog 2>/dev/null $(MAKE) ChangeLog # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/depcomp0000755000175000017500000005602014215102164012256 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: gwenhywfar-5.12.1/Makefile.cvs0000664000175000017500000001374314464665502013162 00000000000000 #MY_CFLAGS=-W -pedantic -std=c99 -ggdb -Wall -O -ggdb MY_CFLAGS=-ggdb -Wall -O0 WIN32_INSTALL_DIR=/home/martin/install/win32 all_warnings=\ -Wextra -Wall -Waddress \ -Waggregate-return -Warray-bounds \ -Wchar-subscripts -Wclobbered -Wcomment \ -Wcoverage-mismatch -Wno-deprecated-declarations -Wdisabled-optimization \ -Wempty-body -Wno-endif-labels -Wformat \ -Wno-format-extra-args -Wformat-security \ -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration \ -Wimplicit-int -Wimport -Wno-import -Winit-self -Winline \ -Wno-int-to-pointer-cast -Winvalid-pch \ -Wunsafe-loop-optimizations -Wlogical-op -Wlong-long -Wmain -Wmissing-braces \ -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs \ -Wmissing-noreturn -Wno-multichar -Wnonnull -Wno-overflow -Woverlength-strings \ -Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast -Wno-variadic-macros \ -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare \ -Wstack-protector -Wstrict-aliasing \ -Wswitch -Wswitch-default \ -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas \ -Wno-pragmas -Wunused -Wunused-function -Wunused-label \ -Wunused-parameter -Wunused-value -Wunused-variable \ -Wvla -Wvolatile-register-var -Wwrite-strings # -Wcast-qual -Wfloat-equal -Wswitch-enum -Wformat-nonliteral -Wformat=2 //disable this for now c_warnings=\ -Wbad-function-cast -Wmissing-parameter-type \ -Wnested-externs -Wstringop-overflow=2 \ -Wdeclaration-after-statement -Wpointer-sign \ -Wunused-parameter # disable this for now # -Wc++-compat -Wmissing-declarations cplusplus_warnings=\ -Wc++0x-compat -Wno-invalid-offsetof WIN32_OPTIONS=\ --host=i586-mingw32msvc \ --target=i586-mingw32msvc \ --enable-version-specific-runtime-libs \ --with-gcc \ --with-gnu-ld \ --without-x \ --enable-threads=win32 \ --disable-win32-registry MINGW32_PREFIX=/usr/i586-mingw32msvc default: all dist: COPY=--copy dist: all touch stamp-h.in ./configure make dist cvsclean:: automake --include-deps autoconf touch stamp-h.in rm -f `find . -name \*~` rm -Rf apidoc all: libtoolize -f --automake $(COPY) aclocal -I ./m4 autoheader if test ! -f i18nsources; then echo > i18nsources; fi automake -f --add-missing $(COPY) autoconf local: PREFIX=/usr/local local: all ./configure --prefix=$(PREFIX) mp: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf CXXFLAGS="-O0 -ggdb -Wall $(cplusplus_warnings)" \ CFLAGS="-O0 -ggdb -Wall $(c_warnings)" \ ./configure \ INSTALL="/usr/bin/install -p" \ --with-guis="gtk3 fox16 qt5" \ --disable-static \ --enable-full-doc \ --enable-testcode \ --prefix=/usr/local \ --with-qt5-qmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" \ --with-libxml2-code=yes mp-test: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf CXXFLAGS="-O0 -ggdb -Wall $(cplusplus_warnings)" \ CFLAGS="-O0 -ggdb -Wall $(c_warnings)" \ ./configure \ INSTALL="/usr/bin/install -p" \ --with-guis="gtk3 fox16 qt5" \ --disable-static \ --enable-full-doc \ --enable-testcode \ --prefix=/usr/local \ --with-qt5-qmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" \ --with-libxml2-code=yes \ --enable-testcode mp-werror: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf CXXFLAGS="-O0 -ggdb -Wall $(cplusplus_warnings)" \ CFLAGS="-O0 -ggdb -Wall $(all_warnings) $(c_warnings)" \ ./configure \ INSTALL="/usr/bin/install -p" \ --with-guis="gtk2 gtk3 fox16 qt5" \ --disable-static \ --enable-full-doc \ --enable-testcode \ --prefix=/usr/local \ --with-qt5-qmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" mp-opt: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf CXXFLAGS="-O3 -ggdb -Wall $(cplusplus_warnings)" CFLAGS="-O3 -ggdb -Wall" ./configure \ INSTALL="/usr/bin/install -p" \ --with-guis="gtk2 gtk3 fox16" \ --disable-static \ --enable-full-doc \ --prefix=/usr/local \ --with-qt5-qmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" clang: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf CC=clang CXX=clang CXXFLAGS="-O0 -ggdb -Wall $(cplusplus_warnings)" CFLAGS="-O0 -ggdb -Wall" ./configure INSTALL="/usr/bin/install -p" --with-guis="gtk2 fox16 qt4" --disable-static --enable-full-doc mp-priv: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf CFLAGS="$(MY_CFLAGS)" CXXFLAGS="-ggdb -Wall" ./configure INSTALL="/usr/bin/install -p" --disable-static --prefix=/opt/devel/4 --enable-full-doc mp-darwin: CFLAGS="-I/sw/include -ggdb -Wall" LDFLAGS="-L/sw/lib" ./configure mp-w32: libtoolize -f --automake aclocal -I ./m4 autoheader automake --add-missing autoconf PATH="$(MINGW32_PREFIX)/bin:$(PATH)" \ PKG_CONFIG_PATH=$(WIN32_INSTALL_DIR)/lib/pkgconfig \ CFLAGS="$(MY_CFLAGS) -I$(WIN32_INSTALL_DIR)/include -L$(WIN32_INSTALL_DIR)/lib" CXXFLAGS="-ggdb -Wall -I$(WIN32_INSTALL_DIR)/include -L$(WIN32_INSTALL_DIR)/lib" \ DLLTOOL=i586-mingw32msvc-dlltool \ OBJDUMP=i586-mingw32msvc-objdump \ LD=i586-mingw32msvc-ld \ AR=i586-mingw32msvc-ar \ NM=i586-mingw32msvc-nm \ RANLIB=i586-mingw32msvc-ranlib \ STRIP=i586-mingw32msvc-strip \ STRIPPROG=i586-mingw32msvc-strip \ AS=i586-mingw32msvc-as \ RC=i586-mingw32msvc-windres \ ./configure \ --prefix=$(WIN32_INSTALL_DIR) $(WIN32_OPTIONS) \ --enable-release \ --disable-binreloc \ --with-openssl-includes=$(WIN32_INSTALL_DIR)/include \ --with-openssl-libs=$(WIN32_INSTALL_DIR)/lib \ --with-libgcrypt-prefix=$(WIN32_INSTALL_DIR) \ --with-libgnutls-prefix=$(WIN32_INSTALL_DIR) \ --with-fox-includes=$(WIN32_INSTALL_DIR)/include/fox-1.6 \ --disable-qt3 \ --disable-qt4 \ --with-guis=fox16 \ --with-fox-libs="-L$(WIN32_INSTALL_DIR)/lib -lFOX-1.6" \ git-log: git log --pretty="format:%ad %an%n%s%n%b" --since="2008-08-16" >git.log gwenhywfar-5.12.1/missing0000755000175000017500000001533614215102164012305 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: gwenhywfar-5.12.1/README.DARWIN0000644000175000017500000000031713142134462012546 00000000000000 Currently Darwin does not handle the "__attribute__ ((constructor))" entries in C files as it seems, so in your programs on Darwin you will have to call GWEN_Init() yourself before doing anything else... gwenhywfar-5.12.1/RELEASES0000644000175000017500000000000013142134462012016 00000000000000gwenhywfar-5.12.1/po/0000755000175000017500000000000015032533717011406 500000000000000gwenhywfar-5.12.1/po/de.po0000664000175000017500000011505514460564441012271 00000000000000# translation of de.po to deutsch # Translations for Gwenhywfar. # This file is distributed under the same license as the Gwenhywfar package. # Copyright (C) 2005 Martin Preuss. # # Martin Preuss , 2004, 2005, 2007. # Martin Preuss , 2010. # Ralf Habacker , 2022. msgid "" msgstr "" "Project-Id-Version: gwenhywfar\n" "Report-Msgid-Bugs-To: aqbanking-user@lists.aqbanking.de\n" "POT-Creation-Date: 2022-08-10 19:57+0200\n" "PO-Revision-Date: 2021-02-16 21:00+0100\n" "Language-Team: Deutsch \n" "Last-Translator: Ralf Habacker \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 20.04.2\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-Basepath: /home/martin/projekte/c/gwenhywfar/git\n" #: src/base/error.c:101 msgid "Ok" msgstr "Ok" #: src/base/error.c:104 msgid "Generic error" msgstr "Allgemeiner Fehler" #: src/base/error.c:107 msgid "Aborted" msgstr "Abgebrochen" #: src/base/error.c:110 msgid "Not available" msgstr "Nicht verfügbar" #: src/base/error.c:113 msgid "Bad socket type" msgstr "Falscher Socket-Typ" #: src/base/error.c:116 msgid "Not open" msgstr "Nicht offen" #: src/base/error.c:119 msgid "Timeout" msgstr "Zeit abgelaufen" #: src/base/error.c:122 msgid "In Progress" msgstr "In Bearbeitung" #: src/base/error.c:125 msgid "Startup error" msgstr "Initialisierungsfehler" #: src/base/error.c:128 msgid "Interrupted system call" msgstr "Unterbrochener System-Aufruf" #: src/base/error.c:131 msgid "Not supported" msgstr "Nicht unterstützt" #: src/base/error.c:134 msgid "Broken pipe" msgstr "Leitung unterbrochen" #: src/base/error.c:137 msgid "Memory full" msgstr "Speicher voll" #: src/base/error.c:140 msgid "Bad address" msgstr "Fehlerhafte Adresse" #: src/base/error.c:143 msgid "Buffer overflow" msgstr "Pufferüberlauf" #: src/base/error.c:146 msgid "Host not found" msgstr "Host nicht gefunden" #: src/base/error.c:149 msgid "No address" msgstr "Fehlende Adresse" #: src/base/error.c:152 msgid "No recovery" msgstr "Keine Wiederherstellung" #: src/base/error.c:155 msgid "Try again" msgstr "Erneut versuchen" #: src/base/error.c:158 msgid "Unknown DNS error" msgstr "Unbekannter DNS-Fehler" #: src/base/error.c:161 msgid "Bad address family" msgstr "Fehlerhafte Adress-Familie" #: src/base/error.c:164 msgid "Could not load" msgstr "Fehler beim Laden" #: src/base/error.c:167 msgid "Could not resolve a symbol" msgstr "Symbol konnte nicht aufgelöst werden" #: src/base/error.c:170 msgid "Not found" msgstr "Nicht gefunden" #: src/base/error.c:173 msgid "Could not read" msgstr "Fehler beim Lesen" #: src/base/error.c:176 msgid "Could not write" msgstr "Fehler beim Schreiben" #: src/base/error.c:179 msgid "Could not close" msgstr "Fehler beim Schließen" #: src/base/error.c:182 msgid "No data" msgstr "Keine Daten" #: src/base/error.c:185 msgid "Partial data" msgstr "Teildaten" #: src/base/error.c:188 msgid "EOF met" msgstr "Dateiende erreicht" #: src/base/error.c:191 msgid "Already registered" msgstr "Bereits registriert" #: src/base/error.c:194 msgid "Not registered" msgstr "Nicht registriert" #: src/base/error.c:197 msgid "Bad size" msgstr "Fehlerhafte Größe" #: src/base/error.c:200 msgid "Could not encrypt" msgstr "Fehler beim Verschlüsseln" #: src/base/error.c:203 msgid "Could not decrypt" msgstr "Fehler beim Entschlüsseln" #: src/base/error.c:206 msgid "Could not sign" msgstr "Fehler beim Signieren" #: src/base/error.c:209 msgid "Could not verify" msgstr "Fehler bei der Signaturüberprüfung" #: src/base/error.c:212 msgid "Generic SSL error" msgstr "Allgemeiner SSL Fehler" #: src/sio/syncio_socket.c:194 #, c-format msgid "Error setting up socket: %d" msgstr "Fehler beim Starten des Socket: %d" #: src/sio/syncio_socket.c:205 #, c-format msgid "Resolving hostname \"%s\" ..." msgstr "Hostname \"%s\" wird aufgelöst..." #: src/sio/syncio_socket.c:211 #, c-format msgid "Unknown hostname \"%s\"" msgstr "Unbekannter Hostname \"%s\"" #: src/sio/syncio_socket.c:228 #, c-format msgid "IP address is \"%s\"" msgstr "IP-Adresse ist \"%s\"" #: src/sio/syncio_socket.c:237 #, c-format msgid "Connecting to \"%s\"" msgstr "Verbindung zu \"%s\" wird aufgebaut" #: src/sio/syncio_socket.c:244 #, c-format msgid "Error connecting to \"%s\": %s" msgstr "Fehler beim Verbinden mit \"%s\": %s" #: src/sio/syncio_socket.c:257 #, c-format msgid "Connected to \"%s\"" msgstr "Verbunden mit \"%s\"" #. TODO: make custom ciphers configurable as priority string? #. use cipher list from env var #: src/sio/syncio_tls.c:454 #, c-format msgid "TLS: SSL cipher priority list: %s" msgstr "TLS: SSL Ciphers Prioritätenliste: %s" #. use default ciphers from GnuTLS #: src/sio/syncio_tls.c:464 msgid "Using GnuTLS default ciphers." msgstr "Verwende GnuTLS Default Ciphers." #: src/sio/syncio_tls.c:815 src/sio/syncio_tls.c:1083 msgid "Signer not found" msgstr "Unterzeichner des Zertifikats wurde nicht gefunden" #: src/sio/syncio_tls.c:822 src/sio/syncio_tls.c:1089 msgid "Certificate is not trusted" msgstr "Dem Zertifikat wird nicht vertraut" #: src/sio/syncio_tls.c:829 src/sio/syncio_tls.c:1095 msgid "Certificate has been revoked" msgstr "Das Zertifikat wurde zurückgerufen (revoked)" #: src/sio/syncio_tls.c:973 msgid "Certificate was not issued for this host" msgstr "Zertifikat ist nicht für diesen Host erstellt worden" #: src/sio/syncio_tls.c:984 msgid "No hostname to verify the sender!" msgstr "Kein Hostname vorhanden, mit dem der Absender verifiziert werden kann!" #: src/sio/syncio_tls.c:1101 msgid "Certificate has expired" msgstr "Zertifikat ist nicht mehr gültig" #: src/sio/syncio_tls.c:1107 msgid "Certificate is not active yet" msgstr "Zertifikat ist noch nicht gültig" #: src/sio/syncio_tls.c:1113 msgid "Certificate owner does not match hostname" msgstr "Zertifikat-Besitzer passt nicht zum Hostnamen" #: src/sio/syncio_tls.c:1119 msgid "Certificate contains invalid information" msgstr "Zertifikat enthält ungültige Informationen" #: src/sio/syncio_tls.c:1125 msgid "A system error occurred while checking the certificate" msgstr "Es gab einen Fehler im Betriebssystem beim Prüfen des Zertifikates" #: src/sio/syncio_tls.c:1131 msgid "The certificate is valid" msgstr "Zertifikat ist gültig" #: src/sio/syncio_tls.c:1281 #, c-format msgid "TLS: SSL-Ciphers negotiated: %s" msgstr "TLS: SSL-Ciphers ausgehandelt: %s" #: src/sio/syncio_tls.c:1292 msgid "TLS: Warning - The server has chosen unsafe SSL-Ciphers!" msgstr "TLS: Achtung - der Server hat unsichere SSL-Ciphers gewählt." #: src/sio/syncio_tls.c:1355 msgid "" "A TLS handshake error occurred. If you are using AqBanking you should " "consider enabling the option \"force SSLv3\" in the user settings dialog." msgstr "" "Ein Fehler beim TLS-Handshake ist aufgetreten. Wenn Sie Online-Banking " "benutzen, sollten Sie einmal die Option \"SSLv3 erzwingen\" in den " "Einstellungen ausprobieren." #: src/sio/syncio_tls.c:1364 #, c-format msgid "TLS Handshake Error: %d (%s)" msgstr "TLS-Handshake-Fehler: %d (%s)" #: src/sio/syncio_tls.c:1445 #, c-format msgid "Error on gnutls_bye: %d (%s)" msgstr "Fehler beim Schritt \"gnutls_bye\": %d (%s)" #: src/sio/syncio_tls.c:1494 #, c-format msgid "Error on gnutls_record_recv: %d (%s)" msgstr "Fehler beim Schritt \"gnutls_record_recv\": %d (%s)" #: src/sio/syncio_tls.c:1562 #, c-format msgid "Error on gnutls_record_send: %d (%s)" msgstr "Fehler beim Schritt \"gnutls_record_send\": %d (%s)" #: src/sio/syncio_http.c:1356 src/sio/syncio_http.c:1501 msgid "Network Operation" msgstr "Netzwerk-Verbindung" #: src/sio/syncio_http.c:1357 src/sio/syncio_http.c:1502 msgid "Receiving data" msgstr "Daten empfangen" #: src/sio/syncio_http.c:1442 src/sio/syncio_http.c:1450 #: src/sio/syncio_http.c:1587 src/sio/syncio_http.c:1595 msgid "No message received" msgstr "Keine Nachricht empfangen" #: src/sio/syncio_http.c:1466 src/sio/syncio_http.c:1611 #, c-format msgid "HTTP-Status: %d (%s)" msgstr "HTTP-Status: %d (%s)" #: src/sio/syncio_http.c:1467 msgid "- no details -" msgstr "- Keine Angaben -" #: src/sio/syncio_http.c:1473 src/sio/syncio_http.c:1618 msgid "No HTTP status code received" msgstr "Kein HTTP Status-Code empfangen" #: src/sio/syncio_http.c:1612 msgid "- no details -)" msgstr "- Keine Angaben -" #: src/sio/httpsession.c:429 src/sio/httpsession.c:886 msgid "Connecting to server..." msgstr "Mit Server verbinden..." #: src/sio/httpsession.c:439 src/sio/httpsession.c:895 msgid "Could not connect to server" msgstr "Es konnte keine Verbindung zum Server aufgebaut werden." #: src/sio/httpsession.c:448 src/sio/httpsession.c:902 msgid "Connected." msgstr "Verbunden." #: src/sio/httpsession.c:477 msgid "Sending message..." msgstr "Nachricht senden..." #: src/sio/httpsession.c:485 src/sio/httpsession.c:544 #, c-format msgid "Could not send message (%d)" msgstr "Konnte Nachricht nicht senden (%d)" #: src/sio/httpsession.c:494 src/sio/httpsession.c:550 msgid "Message sent." msgstr "Nachricht gesendet." #: src/sio/httpsession.c:538 msgid "Sending response..." msgstr "Antwort senden..." #: src/sio/httpsession.c:555 src/sio/httpsession.c:675 #: src/sio/httpsession.c:866 msgid "Disconnecting from server..." msgstr "Beenden der Verbindung zum Server..." #: src/sio/httpsession.c:559 src/sio/httpsession.c:679 #: src/sio/httpsession.c:870 src/sio/httpsession.c:907 msgid "Disconnected." msgstr "Verbindung beendet." #: src/sio/httpsession.c:620 src/sio/httpsession.c:774 #, c-format msgid "HTTP: Moved permanently to %s" msgstr "HTTP: Permanent verschoben nach %s" #: src/sio/httpsession.c:623 src/sio/httpsession.c:777 #, c-format msgid "HTTP: Use proxy at %s" msgstr "HTTP: Proxy verwenden auf %s" #: src/sio/httpsession.c:626 src/sio/httpsession.c:780 #, c-format msgid "HTTP: Moved temporarily to %s" msgstr "HTTP: Zeitweise verschoben nach %s" #: src/sio/httpsession.c:629 src/sio/httpsession.c:783 #, c-format msgid "HTTP: Moved to %s" msgstr "HTTP: Verschoben nach %s" #: src/sio/httpsession.c:652 src/sio/httpsession.c:821 msgid "Receiving response..." msgstr "Antwort wird empfangen..." #: src/sio/httpsession.c:664 src/sio/httpsession.c:710 #: src/sio/httpsession.c:853 msgid "Received continuation response." msgstr "Antwort mit Fortsetzung empfangen." #: src/sio/httpsession.c:670 src/sio/httpsession.c:861 msgid "Response received." msgstr "Antwort empfangen." #: src/sio/httpsession.c:701 msgid "Receiving command..." msgstr "Kommando wird empfangen..." #: src/sio/httpsession.c:714 msgid "Command received." msgstr "Kommando empfangen." #: src/os/gwendate.c:686 msgid "Sunday" msgstr "Sonntag" #: src/os/gwendate.c:689 msgid "Monday" msgstr "Montag" #: src/os/gwendate.c:692 msgid "Tuesday" msgstr "Dienstag" #: src/os/gwendate.c:695 msgid "Wednesday" msgstr "Mittwoch" #: src/os/gwendate.c:698 msgid "Thursday" msgstr "Donnerstag" #: src/os/gwendate.c:701 msgid "Friday" msgstr "Freitag" #: src/os/gwendate.c:704 msgid "Saturday" msgstr "Samstag" #: src/os/posix/fslock.c:258 msgid "Acquiring lock" msgstr "Starte exklusiven Zugriff" #: src/os/posix/fslock.c:345 #, c-format msgid "" "There already is a lock for \"%s\".\n" "Either that lock is valid (e.g. some other process is currently holding that " "lock) or it is a stale lock of a process which for whatever reason did not " "remove the lock before terminating.\n" "\n" "This dialog allows for forced removal of that lock.\n" "\n" "WARNING: Only remove the lock if you are certain that no other process is " "actually holding the lock!\n" "\n" "Do you want to remove the possibly stale lock?\n" "

There already is a lock for %s.

Either that lock is " "valid (e.g. some other process is currently holding that lock) or it is a " "stale lock of a process which for whatever reason did not remove the lock " "before terminating.

This dialog allows for forced removal of that lock." "

Warning: Only remove the lock if " "you are certain that no other process is actually holding the lock!

Do " "you want to remove the possibly stale lock?

" msgstr "" "Es existiert bereits ein Lock für Benutzer \"%s\".\n" "Entweder das Lock ist gültig (z.B. weil eine andere Anwendung dieses Lock " "derzeit hält) oder aber es ist übriggeblieben, weil eine Anwendung es aus " "welchen Gründen auch immer versäumt hat das Lock wieder freizugeben.\n" "\n" "WARNUNG: Sie sollten das Lock nur dann entfernen, wenn Sie sicher sind, daß " "es von keiner derzeit aktiven Anwendung gehalten wird!\n" "\n" "Wollen Sie das Lock entfernen?\n" "

Es existiert bereits ein Lock für Benutzer \"%s\".

Entweder " "das Lock ist gültig (z.B. weil eine andere Anwendung dieses Lock derzeit " "hält) oder aber es ist übriggeblieben, weil eine Anwendung es aus welchen " "Gründen auch immer versäumt hat das Lock wieder freizugeben.

Warnung: Sie sollten das Lock nur dann " "entfernen, wenn Sie sicher sind, daß es von keiner derzeit aktiven Anwendung " "gehalten wird!

Wollen Sie das Lock entfernen?

" #: src/os/posix/fslock.c:374 msgid "Possible Stale Lock" msgstr "Lock-Problem" #: src/os/posix/fslock.c:376 msgid "Wait" msgstr "Warten" #: src/os/posix/fslock.c:377 msgid "Remove Lock" msgstr "Lock entfernen" #: src/os/posix/fslock.c:378 src/crypttoken/ct.c:1052 src/crypttoken/ct.c:1124 #: src/gui/cgui.c:303 msgid "Abort" msgstr "Abbrechen" #: src/os/posix/fslock.c:384 src/crypttoken/ct.c:1056 src/crypttoken/ct.c:1128 msgid "Aborted by user." msgstr "Vom Benutzer abgebrochen." #: src/os/posix/fslock.c:393 msgid "Lock removed by user request." msgstr "Lock auf Aufforderung des Benutzers entfernt." #: src/crypt3/mdigest.c:563 #, c-format msgid "Error unpacking program (%d)" msgstr "Fehler beim Entpacken des Programms (%d)" #: src/crypt3/mdigest.c:580 #, c-format msgid "Error loading checksum file (%d)" msgstr "Fehler beim Laden der Prüfsummendatei (%d)" #: src/crypt3/mdigest.c:606 msgid "Checksum file does not contain valid lines" msgstr "Prüfsummendatei enthält keine gültigen Zeilen" #: src/crypt3/mdigest.c:614 msgid "Integrity check on folder failed" msgstr "Integritätsprüfung des Ordners ist fehlgeschlagen" #: src/crypt3/mdigest.c:624 src/crypt3/mdigest.c:631 #, c-format msgid "Folder contains %d files without checksum" msgstr "Ordner enthält %d Dateien ohne Prüfsumme" #: src/crypttoken/ct.c:864 msgid "access password" msgstr "Zugriffspasswort" #: src/crypttoken/ct.c:866 msgid "manager password" msgstr "Administrationspasswort" #: src/crypttoken/ct.c:868 msgid "password" msgstr "Passwort" #: src/crypttoken/ct.c:873 msgid "" "\n" "You must only enter numbers, not letters." msgstr "" "\n" "Es dürfen nur Zahlen eingegeben werden, keine Buchstaben." #: src/crypttoken/ct.c:878 #, c-format msgid "" "Please enter a new %s for \n" "%s\n" "The password must be at least %d characters long.%sPlease enter a new " "%s for %s. The password must be at least %d characters long.%s" msgstr "" "Bitte geben Sie ein neues %s für\n" " %s\n" "ein. Es muss mindestens %d Zeichen lang sein.%s Bitte geben Sie ein " "neues %s für%s ein. Es muss mindestens %d Zeichen lang sein.%s " #: src/crypttoken/ct.c:896 #, c-format msgid "" "Please enter the %s for \n" "%s\n" "%sPlease enter the %s for %s.%s" msgstr "" "Bitte geben Sie das %s für\n" "%s\n" "ein.%s Bitte geben Sie das %s für %s ein.%s" #: src/crypttoken/ct.c:913 src/gui/passwdstore.c:292 src/gui/passwdstore.c:426 msgid "Enter Password" msgstr "Passworteingabe" #: src/crypttoken/ct.c:1000 msgid "Waiting for pin entry on card reader..." msgstr "Warte auf PIN-Eingabe am Kartenleser..." #: src/crypttoken/ct.c:1013 msgid "Pin entry on card reader finished." msgstr "PIN-Eingabe am Kartenleser beendet." #: src/crypttoken/ct.c:1036 #, c-format msgid "" "Please insert the security disc\n" "for %sPlease insert the security disc for %s" msgstr "" "Bitte legen Sie die Schlüsseldiskette\n" "für %s ins Laufwerk. Bitte legen Sie die Schlüsseldiskette\n" "für %s ins Laufwerk." #: src/crypttoken/ct.c:1042 #, c-format msgid "" "Please insert the chip card\n" "for %sPlease insert the chip card for %s" msgstr "" "Bitte legen Sie die Chipkarte\n" "für %s in den Kartenleser. Bitte legen Sie die Chipkarte\n" "für %s in den Kartenleser." #: src/crypttoken/ct.c:1050 src/crypttoken/ct.c:1122 msgid "Insert Medium" msgstr "Sicherheitsmedium einlegen" #: src/crypttoken/ct.c:1052 src/crypttoken/ct.c:1124 msgid "OK" msgstr "Ok" #: src/crypttoken/ct.c:1063 src/crypttoken/ct.c:1135 msgid "Error" msgstr "Fehler" #: src/crypttoken/ct.c:1064 src/crypttoken/ct.c:1136 msgid "An internal error occurred." msgstr "Es ist ein interner Fehler aufgetreten." #: src/crypttoken/ct.c:1065 src/crypttoken/ct.c:1137 src/gui/gui.c:393 msgid "Dismiss" msgstr "Schließen" #: src/crypttoken/ct.c:1092 #, c-format msgid "" "Please insert the correct security disc\n" "for %sPlease insert the correct security disc for %s" msgstr "" "Bitte legen Sie die korrekte Sicherheitsdiskette für %s ein. Bitte " "legen Sie die korrekte Sicherheitsdiskette für %s ein." #: src/crypttoken/ct.c:1099 #, c-format msgid "" "The wrong chipcard has been inserted.\n" "Please insert the chipcard with the number\n" " %s\n" "into the card reader.\n" "

The wrong card has been inserted.

Please insert the chipcard " "with the number%s into the card reader.

" msgstr "" "Eine falsche Chipkarte wurde eingelegt.\n" "Bitte legen Sie die Chipkarte mit der Nummer\n" " %s\n" "in den Kartenleser ein.\n" "

Eine falsche Chipkarte wurde eingelegt.

Bitte legen Sie die " "Chipkarte mit der Nummer%s in den Kartenleser ein.

" #: src/crypttoken/ct.c:1113 #, c-format msgid "" "Please insert the correct chipcard\n" "for %sPlease insert the correct chipcard for %s" msgstr "" "Bitte legen Sie die korrekte Chipkarte \n" "für %s ein. Bitte legen Sie die korrekte Chipkarte für %s ein." #: src/crypttoken/ctfile.c:803 src/crypttoken/ctfile.c:990 msgid "Public key replaced" msgstr "Öffentlicher Schlüssel ersetzt" #: src/crypttoken/ctfile.c:818 src/crypttoken/ctfile.c:1007 #: src/crypttoken/ctfile.c:1153 src/crypttoken/ctfile.c:2188 msgid "Unable to write key file" msgstr "Die Schlüsseldatei konnte nicht geschrieben werden" #: src/crypttoken/ctfile.c:823 src/crypttoken/ctfile.c:1012 #: src/crypttoken/ctfile.c:1158 msgid "Key file saved" msgstr "Schlüsseldatei gesichert" #: src/crypttoken/ctfile.c:1073 #, c-format msgid "Invalid key id %02x" msgstr "Ungültige Schlüssel-ID %02x" #: src/crypttoken/ctfile.c:1079 src/crypttoken/ctfile.c:2081 msgid "No key info found" msgstr "Keine Schlüsselinformationen gefunden" #: src/crypttoken/ctfile.c:2028 msgid "Can only generate local keys." msgstr "Es können nur lokale Schlüssel erzeugt werden." #: src/crypttoken/ctfile.c:2036 msgid "Only RSA keys supported." msgstr "Es werden nur RSA-Schlüssel unterstützt." #: src/crypttoken/ctfile.c:2060 msgid "Could not generate key" msgstr "Der Schlüssel konnte nicht erzeugt werden." #: src/crypttoken/ctfile.c:2065 msgid "Key generated" msgstr "Schlüssel erzeugt" #: src/crypttoken/ctfile.c:2193 msgid "Key generated and set" msgstr "Schlüssel erzeugt und gesetzt" #: src/crypttoken/ctplugin.c:318 msgid "No plugin found for this device type" msgstr "Kein Modul für den Gerätetypen gefunden" #: src/crypttoken/ctplugin.c:321 msgid "" "If you're using a Debian/Ubuntu based system please consider to install " "package " msgstr "" "Falls Sie ein Debian-/Ubuntu-basiertes System verwenden sollten Sie das " "folgende Paket installieren: " #: src/crypttoken/ctplugin.c:343 msgid "Determining plugin module..." msgstr "Plugin wird ermittelt..." #: src/crypttoken/ctplugin.c:360 #, c-format msgid "Loading plugin \"%s\"" msgstr "Plugin \"%s\" laden" #: src/crypttoken/ctplugin.c:379 #, c-format msgid "Could not load plugin \"%s\"" msgstr "Fehler beim Laden des Plugins \"%s\"" #: src/crypttoken/ctplugin.c:418 #, c-format msgid "Checking plugin \"%s\"" msgstr "Plugin \"%s\" prüfen" #: src/crypttoken/ctplugin.c:432 #, c-format msgid "Plugin \"%s\" supports this token" msgstr "Plugin \"%s\" unterstützt dieses Token" #: src/crypttoken/ctplugin.c:449 #, c-format msgid "Plugin \"%s\": Function not implemented" msgstr "Plugin \"%s\": Funktion nicht implementiert" #: src/crypttoken/ctplugin.c:456 #, c-format msgid "Plugin \"%s\" does not support this token" msgstr "Plugin \"%s\" unterstützt dieses Token nicht" #: src/crypttoken/ctplugin.c:463 #, c-format msgid "Plugin \"%s\" supports this token, but the name did not match" msgstr "" "Plugin \"%s\" unterstützt dieses Token, aber der Name stimmt nicht überein" #: src/crypttoken/ctplugin.c:470 #, c-format msgid "Plugin \"%s\": Unexpected error (%d)" msgstr "Plugin \"%s\": Unerwarteter Fehler (%d)" #: src/gui/cgui.c:298 msgid "Empty Input" msgstr "Leere Eingabe" #: src/gui/cgui.c:299 msgid "" "Your input was empty.\n" "Do you want to use the default?" msgstr "" "Ihre Eingabe war leer.\n" "Wollen Sie die voreingestellte PIN benutzen?" #: src/gui/cgui.c:301 src/gui/gui_cert.c:220 msgid "Yes" msgstr "Ja" #: src/gui/cgui.c:302 src/gui/gui_cert.c:220 msgid "No" msgstr "Nein" #: src/gui/passwdstore.c:293 src/gui/passwdstore.c:427 msgid "" "Please enter the password for the password store.\n" "Please enter the password for the password store.
" msgstr "" "Bitte geben Sie ein Password für den Passwortspeicher ein.\n" "Bitte geben Sie ein Password für den Passwortspeicher ein." #: src/gui/passwdstore.c:385 msgid "Create New Password Store" msgstr "Neuen Passwortspeicher erstellen" #: src/gui/passwdstore.c:387 msgid "" "You are about to create a new password store.\n" "Passwords you store here will be encrypted with a passphrase\n" "which you must enter now.\n" "\n" "Later you will only need to remember the passphrase for the\n" "password store, not all the individuell passwords.\n" "\n" "WARNING: Storing your passwords in the password store\n" "can be considered a security risk, especially if the passphrase protecting " "it\n" "is not strong enough!\n" "\n" "You can safely abort this step, in which case your passwords will not be " "stored.\n" "\n" "Please enter the passphrase for the password store to be created or abort.\n" "

You are about to create a new password store.

Passwords you store here will be encrypted with a passphrase which " "you must enter now.

Later you will only need to remember the " "passphrase for the password store, not all the individuell passwords." "

Warning: Storing your passwords in the " "password store can be considered a security risk, especially if the " "passphrase protecting it is not strong enough!

You can " "safely abort this step, in which case your passwords will not be stored." "


Please enter the passphrase for the password store to be created " "or abort.

" msgstr "" "Sie erstellen jetzt einen neuen Passwortspeicher.\n" "\n" "Die Passwörter, die darin gespeichert werden, müssen ihrerseits durch\n" "ein schwer zu erratendes Hauptpasswort (auch genannt Pass-Phrase)\n" "verschlüsselt werden. Dieses müssen Sie jetzt eingeben.\n" "\n" "Anschließend müssen Sie sich nur noch das Hauptpasswort für den\n" "Passwortspeicher merken, nicht mehr die einzelnen Passwörter.\n" "\n" "Vorsicht: Es ist ein Sicherheitsrisiko, wenn Sie alle Ihre Passwörter\n" "in diesem Passwortspeicher ablegen und dabei nur ein leicht zu\n" "erratendes Hauptpasswort verwenden!\n" "\n" "Sie könne in jedem Fall hier auch \"Abbrechen\" wählen. Ihre Passwörter\n" "werden dann nicht gespeichert.\n" "\n" "Bitte geben Sie jetzt das Hauptpasswort für den Passwortspeicher ein\n" "oder wählen Sie \"Abbrechen\".\n" "\n" "

Sie erstellen jetzt einen neuen Passwortspeicher.


\n" "

\n" "Die Passwörter, die darin gespeichert werden, müssen ihrerseits durch\n" "ein schwer zu erratendes Hauptpasswort (auch genannt Pass-Phrase)\n" "verschlüsselt werden. Dieses müssen Sie jetzt eingeben.\n" "

\n" "Anschließend müssen Sie sich nur noch das Hauptpasswort für den\n" "Passwortspeicher merken, nicht mehr die einzelnen Passwörter.\n" "

\n" "Vorsicht: Es ist ein Sicherheitsrisiko,\n" "wenn Sie alle Ihre Passwörter in diesem Passwortspeicher ablegen und\n" "dabei nur ein leicht zu erratendes Hauptpasswort verwenden!\n" "

\n" "\n" "Sie könne in jedem Fall hier auch \"Abbrechen\" wählen. Ihre Passwörter\n" "werden dann nicht gespeichert.\n" "

\n" "\n" "Bitte geben Sie jetzt das Hauptpasswort für den Passwortspeicher ein oder " "wählen Sie \"Abbrechen\".\n" "

" #: src/gui/gui_cert.c:70 #, c-format msgid "" "The following certificate has been received:\n" "Name : %s\n" "Organisation : %s\n" "Department : %s\n" "Country : %s\n" "City : %s\n" "State : %s\n" "Valid after : %s\n" "Valid until : %s\n" "Hash (MD5) : %s\n" "Hash (SHA1) : %s\n" "Hash (SHA512): %s\n" "Status : %s\n" "Do you wish to accept this certificate?

The following certificate " "has been received:

" "

Do you wish to accept this certificate?

" msgstr "" "Das folgende Zertifikat wurde empfangen:\n" "Name : %s\n" "Organisation : %s\n" "Abteilung : %s\n" "Staat : %s\n" "Stadt : %s\n" "Bundesland : %s\n" "Gültig ab : %s\n" "Gültig bis : %s\n" "Hash (MD5) : %s\\n\n" "Hash (SHA1) : %s\\n\n" "Hash (SHA512): %s\\n\n" "Status : %s\n" "Wollen Sie dieses Zertifikat akzeptieren?

Das folgende Zertifikat " "wurde empfangen:

Name%s
Organisation%s
Department%s
Country%s
City%s
State%s
Valid after" "%s
Valid until%s
Hash (MD5)%s
Hash (SHA1)%s
Hash " "(SHA512)%s
Status%s%s%s
" "\n" "\n" "\n" "
Name%s
Organisation%s
Abteilung%s
Staat%s
Stadt%s
Bundesland%s
Gültig ab" "%s
Gültig bis%s
Hash (MD5)%s
Hash (SHA1)%s
Hash (SHA512)%s
Status%s%s%s
\n" "

Wollen Sie dieses Zertifikat akzeptieren?

" #. TRANSLATORS: This string is used as a template string to #. convert a given time into your local translated timeformat. The #. following characters are accepted in the template string: Y - #. digit of the year, M - digit of the month, D - digit of the day #. of month, h - digit of the hour, m - digit of the minute, s- #. digit of the second. All other characters are left unchanged. #: src/gui/gui_cert.c:132 src/gui/gui_cert.c:146 msgid "YYYY/MM/DD hh:mm:ss" msgstr "DD.MM.YYYY hh:mm:ss" #: src/gui/gui_cert.c:164 msgid "unknown" msgstr "unbekannt" #: src/gui/gui_cert.c:218 msgid "Certificate Received" msgstr "Zertifikat empfangen" #: src/gui/gui_dialogs.c:246 msgid "Operation finished, you can now close this window." msgstr "Vorgang abgeschlossen, Sie können das Fenster nun schließen." #: src/gui/gui_passwd.c:168 msgid "Enforce PIN" msgstr "PIN erzwingen" #: src/gui/gui_passwd.c:170 msgid "" "You entered the same PIN twice.\n" "The PIN is marked as bad, do you want\n" "to use it anyway?

You entered the same PIN twice.

The PIN is " "marked as bad, do you want to use it anyway?

" msgstr "" "Sie haben die gleiche PIN zweimal eingegeben.\n" "Die PIN ist aber als ungültig markiert. Wollen Sie sie trotzdem verwenden? " "

Sie haben die gleiche PIN zweimal eingegeben.

Die PIN ist " "aber als ungültig markiert. Wollen Sie sie trotzdem verwenden?

" #: src/gui/gui_passwd.c:182 msgid "Yes, use anyway" msgstr "Ja, trotzdem verwenden" #: src/gui/gui_passwd.c:183 msgid "Re-enter" msgstr "Neu eingeben" #: src/gui/gui_virtual.c:701 msgid "Waiting for Data" msgstr "Auf Daten warten" #: src/sar/sar.c:547 src/sar/sar.c:1225 src/sar/sar.c:1879 src/sar/sar.c:1999 #: src/sar/sar.c:2177 src/sar/sar.c:2428 msgid "File Operation" msgstr "Dateioperation" #: src/sar/sar.c:548 msgid "Copying file into archive" msgstr "Datei in Archiv kopieren" #: src/sar/sar.c:1226 msgid "Extracting file from archive" msgstr "Datei aus Archiv entpacken" #: src/sar/sar.c:1880 msgid "Unpacking archive file" msgstr "Entpacken von Archiv-Datei" #: src/sar/sar.c:2000 src/sar/sar.c:2178 msgid "Signing archive file" msgstr "Signieren der Archiv-Datei" #: src/sar/sar.c:2429 msgid "Checking archive file" msgstr "Archiv-Datei prüfen" #: plugins/ct/ohbci/ohbci.c:639 msgid "No valid PIN (tried too often), aborting." msgstr "Keine gültige PIN erhalten (zu oft versucht). Abbruch." #: plugins/ct/ohbci/ohbci.c:673 msgid "Bad PIN, will try again" msgstr "Falsche PIN erhalten. Erneut versuchen" #: plugins/ct/ohbci/ohbci.c:1090 plugins/ct/ohbci/ohbci.c:1145 #: plugins/ct/ohbci/ohbci.c:2368 msgid "Local Sign Key" msgstr "Lokaler Signierschlüssel" #: plugins/ct/ohbci/ohbci.c:1178 plugins/ct/ohbci/ohbci.c:1224 #: plugins/ct/ohbci/ohbci.c:2384 msgid "Local Crypt Key" msgstr "Lokaler Crypto-Schlüssel" #: plugins/ct/ohbci/ohbci.c:1257 plugins/ct/ohbci/ohbci.c:1308 #: plugins/ct/ohbci/ohbci.c:2398 msgid "Remote Sign Key" msgstr "Signierschlüssel des Servers" #: plugins/ct/ohbci/ohbci.c:1344 plugins/ct/ohbci/ohbci.c:1389 #: plugins/ct/ohbci/ohbci.c:2413 msgid "Remote Crypt Key" msgstr "Crypto-Schlüssel des Servers" #: plugins/ct/ohbci/ohbci.c:1421 plugins/ct/ohbci/ohbci.c:1470 #: plugins/ct/ohbci/ohbci.c:2434 msgid "Local Auth Key" msgstr "Lokaler Authentifizierungsschlüssel" #: plugins/ct/ohbci/ohbci.c:1503 plugins/ct/ohbci/ohbci.c:1551 #: plugins/ct/ohbci/ohbci.c:2441 msgid "Remote Auth Key" msgstr "Authentifizierungsschlüssel des Servers" #: plugins/ct/ohbci/ohbci.c:1585 plugins/ct/ohbci/ohbci.c:1639 msgid "Temporary Local Sign Key" msgstr "Temporärer Lokaler Signierschlüssel" #: plugins/ct/ohbci/ohbci.c:2117 msgid "Updating ancient key file to new one" msgstr "Aktualisiere sehr alte Schlüsseldatei auf aktuelles Format" #: tools/xmlmerge/args.c:123 msgid "" "-v verbous\n" "--logfile ARG name of the logfile\n" "--logtype ARG log type\n" "--loglevel ARG log level\n" "-o ARG name of output file (stdout if omitted)\n" "--compact write a more compact file\n" msgstr "" "-v gibt mehr Logmeldungen aus\n" "--logfile ARG Name der Logdatei\n" "--logtype ARG Logtyp\n" "--loglevel ARG Loglevel\n" "-o ARG Name der Ausgabedatei (Standardausgabe, wenn nicht " "angegeben)\n" "--compact schreibe eine kompakte Datei\n" #: tools/xmlmerge/args.c:154 tools/typemaker/args.c:155 #, c-format msgid "Unknown log type \"%s\"\n" msgstr "Unbekannter Logtyp \"%s\"\n" #: tools/xmlmerge/args.c:166 tools/typemaker/args.c:167 #, c-format msgid "Unknown log level \"%s\"\n" msgstr "Unbekannter Loglevel \"%s\"\n" #: tools/xmlmerge/args.c:197 tools/typemaker/args.c:201 #, c-format msgid "Unknown option \"%s\"\n" msgstr "Unbekannte Option \"%s\"\n" #: tools/xmlmerge/args.c:207 msgid "Please specify the name of the output file." msgstr "Bitte geben Sie den Namen der Ausgabedatei an." #: tools/typemaker/args.c:122 msgid "" "-v verbous\n" "--logfile ARG name of the logfile\n" "--logtype ARG log type\n" "--loglevel ARG log level\n" "-d ARG use ARG as domain prefix macro for function declarations\n" "-o ARG name of output file (stdout if omitted)\n" "--compact write a more compact file\n" "-V | --version print version of this tool and exit\n" msgstr "" "-v gibt mehr Logmeldungen aus\n" "--logfile ARG Name der Logdatei\n" "--logtype ARG Logtyp\n" "--loglevel ARG Loglevel\n" "-d ARG ARG als Domain-Prefix aller Funktionsdeklarationen " "benutzen\n" "-o ARG Name der Ausgabedatei (Standardausgabe, wenn nicht " "angegeben)\n" "--compact schreibe eine kompakte Datei\n" "-V | --version Versionsnummer ausgeben und abbrechen\n" #: tools/typemaker2/main.c:187 tools/gcttool/main.c:218 tools/gsa/main.c:136 msgid "Usage: " msgstr "Benutzung: " #: tools/typemaker2/main.c:190 tools/gcttool/main.c:221 tools/gsa/main.c:139 msgid " [GLOBAL OPTIONS] COMMAND [LOCAL OPTIONS]\n" msgstr "[GLOBALE OPTIONEN] KOMMANDO [LOCALE OPTIONEN]\n" #: tools/typemaker2/main.c:193 tools/gcttool/main.c:224 tools/gsa/main.c:142 msgid "" "\n" "Global Options:\n" msgstr "" "\n" "Globale Optionen:\n" #: tools/typemaker2/main.c:199 tools/gcttool/main.c:229 tools/gsa/main.c:148 msgid "" "\n" "Commands:\n" "\n" msgstr "" "\n" "Kommandos:\n" "\n" #: tools/typemaker2/main.c:201 msgid "" " build:\n" " This command creates source and header files for the given file\n" "\n" msgstr "" " build:\n" " Dieser Befehl erzeugt Quelldateien für die angegebene Datei\n" "\n" #: tools/gcttool/main.c:90 msgid "" "The plugin could not be found.\n" "Please make sure that you have the following packages installed (at least on " "Debian/Ubuntu):\n" "- libchipcard-plugins-libgwenhywfar (for chipcards)\n" "- libaqbanking-plugins-libgwenhywfar\n" msgstr "" "Das Modul konnte nicht gefunden werden.\n" "Stellen Sie sicher, daß die folgenden Pakete installiert sind (zumindest auf " "Debian/Ubuntu):\n" "- libchipcard-plugins-libgwenhywfar (for chipcards)\n" "- libaqbanking-plugins-libgwenhywfar\n" #: tools/gcttool/main.c:153 msgid "This command creates a crypt token" msgstr "Dieser Befehl erzeugt ein CryptToken" #: tools/gcttool/main.c:154 msgid "Display user data stored on the token" msgstr " Zeige auf dem CryptToken gespeicherte Benutzer an" #: tools/gcttool/main.c:155 msgid "Display key info stored on the token" msgstr "Zeige auf dem CryptToken gespeicherte Schlüsselinformationen an" #: tools/gcttool/main.c:156 msgid "Generate keys on crypt token" msgstr "Schlüssel auf Krypto-Token generieren" #: tools/gcttool/main.c:157 msgid "Activate keys on crypt token" msgstr "Schlüsselaktivierung von Krypto-Token" #: tools/gcttool/main.c:158 msgid "Update Crypt Token to newer version (e.g. OpenHBCI key files" msgstr "Aktualisiert Sicherheitsmedien (z.B. OpenHBCI Schlüsseldateien)" #: tools/gcttool/main.c:159 msgid "Set signature counter" msgstr "Setze Unterschriftenzähler" #: tools/gcttool/main.c:160 msgid "Change pin of the crypt token" msgstr "Pin des Krypto-Tokens ändern" #: tools/gcttool/main.c:164 msgid "Display passwords store in a GWEN_PASSWD_STORE file" msgstr "" "Zeige die Passwörter, die in einer GWEN_PASSWD_STORE Datei gespeichert sind" #: tools/gsa/main.c:132 msgid "GWEN's Simple Archiver" msgstr "GWEN's Simple Archiver - Einfache Archiverstellung" #: tools/gsa/main.c:91 msgid "This command creates an archive file" msgstr "Erzeugen einer Archiv-Datei" #: tools/gsa/main.c:92 msgid "Add files and folders to an archive file" msgstr "Dateien und Ordner zu einer Archiv-Datei hinzufügen" #: tools/gsa/main.c:93 msgid "List files and folders in an archive file" msgstr "Dateien und Ordner aus einer Archiv-Datei anzeigen" #: tools/gsa/main.c:94 msgid "Check integrity of files and folders in an archive file" msgstr "Integrität der Dateien und Ordner einer Archiv-Datei überprüfen" #. type: Attribute 'text' of: #: src/gui/dlg_input.dlg:7 msgid "Input" msgstr "Eingabe" #. type: Attribute 'text' of: #: src/gui/dlg_input.dlg:10 msgid "Again" msgstr "Nochmal" #. type: Attribute 'text' of: #: src/gui/dlg_input.dlg:15 msgid "Store permanently" msgstr "Dauerhaft speichern" #. type: Attribute 'text' of: #: src/gui/dlg_message.dlg:12 msgid "button1" msgstr "button1" #. type: Attribute 'text' of: #: src/gui/dlg_message.dlg:13 msgid "button2" msgstr "button2" #. type: Attribute 'text' of: #: src/gui/dlg_message.dlg:14 msgid "button3" msgstr "button3" #. type: Attribute 'text' of: #: src/gui/dlg_progress.dlg:19 msgid "Close" msgstr "Schließen" #. type: Content of: #: plugins/dbio/csv/csv.xml:7 msgid "Exporter for CSV" msgstr "Exporter für CSV" #. type: Content of: #: plugins/dbio/csv/csv.xml:9 msgid "" "This plugin exports data to a CSV file according to a given configuration." msgstr "" "Dieses Plugin exportiert Daten in eine CSV-Datei (Comma Separated Valued, " "Komma-getrennte Werte) gemäß einer angegebenen Konfiguration" #. type: Content of: #: plugins/dbio/olddb/olddb.xml:7 msgid "Importer for OpenHBCI1" msgstr "Importer für OpenHBCI1" #. type: Content of: #: plugins/dbio/olddb/olddb.xml:9 msgid "This plugin imports data from an old OpenHBCI1-style file." msgstr "Dieses Modul importiert Daten aus einer alten OpenHBCI1-Art." #. type: Content of: #: plugins/dbio/xmldb/xmldb.xml:7 msgid "Importer for XML" msgstr "Importer für XML" #. type: Content of: #: plugins/dbio/xmldb/xmldb.xml:9 msgid "This plugin imports data from an XML file." msgstr "Dieses Plugin importiert Daten aus einer XML-Datei." #. type: Content of: #: plugins/ct/ohbci/ohbci.xml:6 msgid "OpenHBCI Keyfile Medium" msgstr "OpenHBCI Sicherheitsmedium Schlüsseldatei" #. type: Content of: #: plugins/ct/ohbci/ohbci.xml:9 msgid "" "This plugins provides support for keyfiles created with OpenHBCI1 and " "OpenHBCI2. The file is encrypted with a password using the 3DES algorithm " "and it stores the private and public RSA keys." msgstr "" "Dieses Plugin unterstützt die Schlüsseldateien, die mit den alten " "Bibliotheken OpenHBCI1 und OpenHBCI2 erzeugt wurden. Die Datei ist mit einem " "Passwort und dem 3DES-Algorithmus verschlüsselt und speichert private und " "öffentliche RSA-Schlüssel." #. type: Content of: #: plugins/configmgr/dir/dir.xml:7 msgid "ConfigManager implementation using files" msgstr "Eine Implementierung von ConfigManager mit Dateien" #. type: Content of: #: plugins/configmgr/dir/dir.xml:9 msgid "ConfigManager implementation using files." msgstr "Eine Implementierung von ConfigManager mit Dateien." gwenhywfar-5.12.1/po/Makefile.in0000644000175000017500000004404615032533614013377 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = po ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ EXTRA_DIST = de.po all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu po/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile sources: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/po/Makefile.am0000644000175000017500000000003413142134462013351 00000000000000 EXTRA_DIST=de.po sources: gwenhywfar-5.12.1/po/ChangeLog0000644000175000017500000000251413142134462013074 000000000000002004-08-20 gettextize * Makefile.in.in: New file, from gettext-0.14.1. * boldquot.sed: New file, from gettext-0.14.1. * en@boldquot.header: New file, from gettext-0.14.1. * en@quot.header: New file, from gettext-0.14.1. * insert-header.sin: New file, from gettext-0.14.1. * quot.sed: New file, from gettext-0.14.1. * remove-potcdate.sin: New file, from gettext-0.14.1. * Rules-quot: New file, from gettext-0.14.1. 2004-08-20 gettextize * Makefile.in.in: New file, from gettext-0.14.1. * boldquot.sed: New file, from gettext-0.14.1. * en@boldquot.header: New file, from gettext-0.14.1. * en@quot.header: New file, from gettext-0.14.1. * insert-header.sin: New file, from gettext-0.14.1. * quot.sed: New file, from gettext-0.14.1. * remove-potcdate.sin: New file, from gettext-0.14.1. * Rules-quot: New file, from gettext-0.14.1. 2004-08-20 gettextize * Makefile.in.in: New file, from gettext-0.14.1. * boldquot.sed: New file, from gettext-0.14.1. * en@boldquot.header: New file, from gettext-0.14.1. * en@quot.header: New file, from gettext-0.14.1. * insert-header.sin: New file, from gettext-0.14.1. * quot.sed: New file, from gettext-0.14.1. * remove-potcdate.sin: New file, from gettext-0.14.1. * Rules-quot: New file, from gettext-0.14.1. gwenhywfar-5.12.1/TODO0000664000175000017500000000560614460564441011413 00000000000000 msgio: - EndpointIpcUnix - EndpointIpcTcp gwbuild: - new entry "prefix" (internally translate to option_prefix stuff like in AqFinance) GUI dialogs: - implement "keyPressed" and "keyReleased" events in GTK3 and QT5 frontends - implement "frame*" widget flags in GTK3 and QT5 frontends typemaker2: - add a field annotoations (e.g. "personal data") logger: - finer granularity for loglevels - introduce subdomains - gwenhywfar/syncio - gwenhywfar/http - gwenhywfar/gui - etc - GWEN_Logger_CreateSubDomains(maindomain, "syncio,http,gui,db,xml,crypt", logLevel) - GWEN_Logger_SetupSubDomains(maindomain, "syncio=notice,http=debug,gui=info", defaultLogLevel) - in source files, e.g. syncio_http: #ifdef GWEN_LOGDOMAIN # undef GWEN_LOGDOMAIN # define GWEN_LOGDOMAIN "gwenhywfar/http" #endif sio: - ssl_cert_descr -> typemaker2 tm2: - inline loc="struct" -> insert fields into the struct definition - inline loc="constructor": -> insert code into constructor - inline loc="destructor": -> insert code into constructor -> or maybe: make the field definition also a part of the tm2 mechanisms already in place (i.e. defined in tm2 files?) xml: - add argument to file reader/writer code which contains the target encoding Get root CA certs: http://curl.haxx.se/docs/caextract.html # get a list of exported functions: nm libgwenhywfar.so | grep ' T ' | awk '{ print $3 }' | less # or nm libgwenhywfar.so | grep ' T ' | cut -c20- | sort # get a list of functions imported from other libraries nm libgwenhywfar.so | grep ' U ' | awk '{ print $2 }' | less # or nm libgwenhywfar.so | grep ' U ' | cut -c20- | sort | uniq Callgraphs - Generate callgraphs: make CC=/usr/gccgraph/bin/gcc C : genfull C++: genfull -g cppdepn - Show callgraph for s specific function: gengraph -f FUNCTION_NAME -o OUTFILENAME --output-type=png # read openssl certs d = opendir("/etc/ssl/certs"); gnutls_certificate_allocate_credentials(&ca_list); while ((dent = readdir(d)) != NULL) { sprintf(ca_file, "/etc/ssl/certs/%s", dent->d_name); stat(ca_file, &s); if (!S_ISREG(s.st_mode)) continue; gnutls_certificate_set_x509_trust_file(ca_list, ca_file, GNUTLS_X509_FMT_PEM); } closedir(d); Ideas for threaded gui ====================== - server-gui: gui in main thread - client-gui: gui in other thread - use an event socket when transmitting commands from client-gui to server-gui - client-gui writes request into a queue - event socket alerts server-gui that there is a request in the queue - server-gui - takes request - handles it - puts response into queue of client-gui - notifies client-gui via another event socket? - only implement primary callbacks in this manner (input, msgbox, progress etc) - don't implement dialog callbacks in client-gui (code running in secondary thread should be simple without complex dialog handling) gwenhywfar-5.12.1/gwenhywfar.iss.in0000664000175000017500000002131514043240674014220 00000000000000; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Input configuration for the Inno Setup Compiler ; Copyright (c) 2004-2005 Christian Stimming ; ; Inno Setup Compiler: See http://www.jrsoftware.org/isdl.php ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Setup] ; Using the name here directly because we want it capitalized AppName=Gwenhywfar AppVerName=Gwenhywfar @VERSION@ AppPublisher=Gwenhywfar Development Team AppPublisherURL=http://sourceforge.net/projects/gwenhywfar AppSupportURL=http://sourceforge.net/support/getsupport.php?group_id=88769 AppUpdatesURL=http://sourceforge.net/project/showfiles.php?group_id=88769 DefaultDirName={pf}\@PACKAGE@ LicenseFile=COPYING Compression=lzma OutputDir=. OutputBaseFilename=@PACKAGE@-@VERSION@-setup UninstallFilesDir={app}\uninstall\@PACKAGE@ InfoAfterFile=README [Types] Name: "full"; Description: "{cm:FullInstall}" Name: "binary"; Description: "{cm:BinaryInstall}" Name: "custom"; Description: "{cm:CustomInstall}"; Flags: iscustom [Components] Name: "main"; Description: "{cm:MainFiles}"; Types: full binary custom; Flags: fixed Name: "devel"; Description: "{cm:DevelFiles}"; Types: full Name: "doc"; Description: "{cm:DocFiles}"; Types: full ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Here we configure the included files and the place of their ; installation ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Files] ; The main DLL Source: "distribution\usr\bin\*.dll"; DestDir: "{win}"; Flags: sharedfile; Components: main ; The lib file for linking against it Source: "distribution\usr\lib\lib@PACKAGE@.la"; DestDir: "{app}\lib"; Flags: sharedfile; Components: devel Source: "distribution\usr\lib\*.dll.a"; DestDir: "{app}\lib"; Flags: sharedfile; Components: devel ; The config-script. It is post-processed by the Pascal script below. Source: "@PACKAGE@-config.in.in"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: devel; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\@PACKAGE@-config')) ; The tools executables Source: "distribution\usr\bin\*.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: devel ; The headers, and the aclocal macro. Source: "distribution\usr\include\*"; DestDir: "{app}\include"; Flags: ignoreversion recursesubdirs; Components: devel Source: "distribution\usr\share\*"; DestDir: "{app}\share"; Flags: ignoreversion recursesubdirs; Components: devel ; The plugins Source: "distribution\usr\lib\@PACKAGE@\plugins\@GWENHYWFAR_SO_EFFECTIVE@\*"; DestDir: "{app}\lib\@PACKAGE@\plugins\@GWENHYWFAR_SO_EFFECTIVE@"; Flags: ignoreversion recursesubdirs; Components: main ; The certificate file Source: "distribution\usr\etc\gwen-public-ca.crt"; DestDir: "{app}\etc"; Components: main ; And all the documentation Source: "README"; DestDir: "{app}\doc\@PACKAGE@"; Components: doc Source: "COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: doc Source: "README.W32"; DestDir: "{app}\doc\@PACKAGE@"; Components: doc Source: "AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: doc Source: "ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: doc ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Define the registry keys Setup should create (HKCU = HKEY_CURRENT_USER) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Registry] Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "prefix"; ValueData: "{app}" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "libdir"; ValueData: "{app}\lib" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "pkglibdir"; ValueData: "{app}\lib\@PACKAGE@" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "plugindir"; ValueData: "{app}\lib\@PACKAGE@\plugins\@GWENHYWFAR_SO_EFFECTIVE@" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "dbio-plugins"; ValueData: "{app}\lib\@PACKAGE@\plugins\@GWENHYWFAR_SO_EFFECTIVE@\dbio" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "crypttoken-plugins"; ValueData: "{app}\lib\@PACKAGE@\plugins\@GWENHYWFAR_SO_EFFECTIVE@\crypttoken" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "sysconfdir"; ValueData: "{app}\etc" Root: HKLM; Subkey: "Software\Gwenhywfar\Paths"; ValueType: string; ValueName: "localedir"; ValueData: "{app}\share\locale" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Delete the created config script on uninstall ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [UninstallDelete] Type: files; Name: "{app}\bin\@PACKAGE@-config" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This large section is a Pascal scripting program that will modify ; the gwenhywfar-config shell script so that it then includes the ; correct values according to our local installation. See ; http://www.remobjects.com/?ps for a syntax reference. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Code] function MingwBacksl(const S: String): String; begin { Modify the path name S so that it can be used by MinGW } if Length(ExtractFileDrive(S)) = 0 then Result := S else begin Result := '/'+S; StringChange(Result, ':\', '\'); end; StringChange(Result, '\', '/'); end; procedure MyAfterInstallConfig(FileName: String); var FileString, appdir, windir, includedir, plugindir: String; Res: Boolean; begin { Load the unchanged original file } Res := LoadStringFromFile(Format('%s.in.in',[FileName]), FileString); if Res = False then MsgBox('Error on loading '+FileName+'.in.in for final adaptation', mbInformation, MB_OK); { Insert the custom file header; #10 is the linefeed character } Insert('#!/bin/sh '#10'dir="@prefix'+'@"'#10, FileString, 0); { Get the installation-specific paths } windir := MingwBacksl(ExpandConstant('{win}')); appdir := MingwBacksl(ExpandConstant('{app}')); includedir := appdir + '/include'; plugindir := appdir + '/lib/@PACKAGE@/plugins/@GWENHYWFAR_SO_EFFECTIVE@'; { Now make all the replacements } { Explanation: StringChange(S,FromStr,ToStr): Change all occurances in S of FromStr to ToStr. } StringChange(FileString, '@'+'prefix@', appdir); StringChange(FileString, '@'+'libdir@', windir); StringChange(FileString, '@'+'gwenhywfar_headerdir@', includedir); StringChange(FileString, '@'+'gwenhywfar_ldflags@', '-L'+windir); StringChange(FileString, '@'+'gwenhywfar_libs@', '@gwenhywfar_libs@'); StringChange(FileString, '@'+'gwenhywfar_libspp@', '@gwenhywfar_libspp@'); StringChange(FileString, '@'+'gwenhywfar_libsui@', '@gwenhywfar_libsui@'); StringChange(FileString, '@'+'gwenhywfar_pkgincludedir@', includedir+'/@PACKAGE@'); StringChange(FileString, '@'+'gwenhywfar_plugindir@', plugindir); StringChange(FileString, '@'+'GWENHYWFAR_VERSION_MAJOR@', '@GWENHYWFAR_VERSION_MAJOR@'); StringChange(FileString, '@'+'GWENHYWFAR_VERSION_MINOR@', '@GWENHYWFAR_VERSION_MINOR@'); StringChange(FileString, '@'+'GWENHYWFAR_VERSION_PATCHLEVEL@', '@GWENHYWFAR_VERSION_PATCHLEVEL@'); StringChange(FileString, '@'+'GWENHYWFAR_VERSION_BUILD@', '@GWENHYWFAR_VERSION_BUILD@'); StringChange(FileString, '@'+'GWENHYWFAR_VERSION_TAG@', '@GWENHYWFAR_VERSION_TAG@'); { Save the final file } Res := SaveStringToFile(FileName, FileString, False); if Res = False then MsgBox('Error on saving '+FileName+' for final adaptation', mbInformation, MB_OK); end; [Languages] Name: "en"; MessagesFile: "compiler:Default.isl" Name: "de"; MessagesFile: "compiler:Languages\German.isl" Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl" Name: "fr"; MessagesFile: "compiler:Languages\French.isl" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; These are only for improved text messages ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Messages] ; *** "Select Destination" wizard page SelectDirLabel3=Setup will install [name] into the following folder. If you have MinGW installed on your system, you can safely choose MinGW's root folder here as well (e.g. c:\msys\1.0). de.SelectDirLabel3=Das Setup wird [name] in den folgenden Ordner installieren. Wenn Sie MinGW auf Ihrem Computer installiert haben, können Sie hier problemlos das Root-Verzeichnis von MinGW angeben (z.B. c:\msys\1.0). [CustomMessages] ; *** "Select Components" wizard page FullInstall=Full installation BinaryInstall=Install only libraries CustomInstall=Custom installation MainFiles=Gwenhywfar DLL Library DevelFiles=Development files DocFiles=Documentation files de.FullInstall=Komplett-Installation de.BinaryInstall=Nur Bibliotheken installieren de.CustomInstall=Benutzerdefiniert de.MainFiles=Gwenhywfar DLL Bibliothek de.DevelFiles=Entwickler-Dateien de.DocFiles=Dokumentations-Dateien gwenhywfar-5.12.1/m4/0000755000175000017500000000000015032533712011303 500000000000000gwenhywfar-5.12.1/m4/fox.m40000644000175000017500000000526413142134462012267 00000000000000# $Id: fox.m4,v 1.4 2006/01/18 09:44:19 cstim Exp $ # (c) 2009 Martin Preuss # These functions search for FOX AC_DEFUN([AQ_CHECK_FOX],[ dnl PREREQUISITES: dnl AQ_CHECK_OS must be called before this dnl IN: dnl All variables which already have a value will not be altered dnl OUT: dnl Variables: dnl have_fox - set to "yes" if FOX exists dnl fox_includes - path to includes dnl fox_libs - path to libraries dnl Defines: dnl HAVE_FOX AC_MSG_CHECKING(if FOX is allowed) AC_ARG_ENABLE(fox, [ --enable-fox enable fox (default=yes)], enable_fox="$enableval", enable_fox="yes") AC_MSG_RESULT($enable_fox) if test "$enable_fox" = "no"; then fox_libs="" fox_includes="" have_fox="no" else dnl paths for fox includes AC_MSG_CHECKING(for fox includes) AC_ARG_WITH(fox-includes, [ --with-fox-includes=DIR uses fox includes from given dir], [local_fox_includes="$withval"], [local_fox_includes="\ /usr/include/fox-1.6 \ /usr/local/include/fox-1.6 \ /opt/fox-1.6/include \ " ] ) if test -z "$fox_includes"; then for i in $local_fox_includes; do if test -z "$fox_includes"; then if test -f "$i/fxver.h"; then fox_includes="-I$i" break; fi fi done fi if test -n "$fox_includes"; then AC_MSG_RESULT($fox_includes) else AC_MSG_RESULT(not found) fi # Check for x86_64 architecture; potentially set lib-directory suffix if test "$target_cpu" = "x86_64"; then libdirsuffix="64" else libdirsuffix="" fi dnl paths for fox libs AC_MSG_CHECKING(for fox libraries) AC_ARG_WITH(fox-libs, [ --with-fox-libs=SPEC uses given fox libs ], [fox_libs="$withval"], [ AC_LANG(C++) SAVED_LDFLAGS=$LDFLAGS SAVED_CXXFLAGS=$CXXFLAGS LDFLAGS="$LDFLAGS -lFOX-1.6" CXXFLAGS="$CXXFLAGS $fox_includes" AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [FX::FXDate dummy])], [fox_libs="-lFOX-1.6"]) LDFLAGS=$SAVED_LDFLAGS CXXFLAGS=$SAVED_CXXFLAGS ] ) if test -z "$fox_libs"; then AQ_SEARCH_FOR_PATH([$qt_searchname],[$local_fox_libs]) if test -n "$found_dir" ; then fox_libs="-L$found_dir -lFOX-1.6" fi fi if test -n "$fox_libs"; then AC_MSG_RESULT($fox_libs) else AC_MSG_RESULT(not found) fi # check if all necessary fox components where found if test -z "$fox_includes" || \ test -z "$fox_libs"; then fox_libs="" fox_includes="" have_fox="no" else have_fox="yes" AC_DEFINE(HAVE_FOX, 1, [whether FOX is available]) fi dnl end of if "$enable_fox" fi AS_SCRUB_INCLUDE(fox_includes) AC_SUBST(fox_libs) AC_SUBST(fox_includes) ]) gwenhywfar-5.12.1/m4/lt~obsolete.m40000644000175000017500000001400714605317530014044 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) gwenhywfar-5.12.1/m4/distri.m40000644000175000017500000000564013142134462012767 00000000000000 # distri.m4 # (c) 2006 Martin Preuss # This function checks for the Linux distribution AC_DEFUN([AQ_DISTRIBUTION], [ dnl searches for libusb dnl Arguments: none dnl Returns: aq_distrib_name (name of the Linux distribution) dnl aq_distrib_tag (tag for packages, like "suse") dnl aq_distrib_version (not for Debian-like systems) AC_MSG_CHECKING(for preselected distribution name) if test -n "$aq_distrib_name"; then AC_MSG_RESULT([yes, $aq_distrib_name]) else AC_MSG_RESULT([no, will have to determine it]) aq_distrib_name="" aq_distrib_version="" aq_distrib_tag="" # Debian-style AC_MSG_CHECKING(whether this is a Debian derivate) case `basename $CC` in gcc | gcc-* | *-gcc | *-gcc-*) debtype=["` ${CC} --version | head -1`"] case $debtype in *\(Debian\ *) aq_distrib_name="Debian" aq_distrib_tag="debian" AC_MSG_RESULT([yes, $aq_distrib_name]) ;; *\(Ubuntu\ * | *\(KUbuntu\ *) aq_distrib_name="Ubuntu" aq_distrib_tag="ubuntu" AC_MSG_RESULT([yes, $aq_distrib_name]) ;; *) AC_MSG_RESULT([no]) ;; esac ;; *) AC_MSG_RESULT([no]) ;; esac fi if test -z "$aq_distrib_name"; then # RPM-style AC_MSG_CHECKING(whether this is an RPM distribution) RPM_COMMAND="`which rpm`" aq_distrib_name="" aq_distrib_tag="" aq_distrib_version="" if test -n "${RPM_COMMAND}"; then if test -x "${RPM_COMMAND}"; then if test -e "/etc/mandriva-release"; then aq_distrib_name="mandriva" aq_distrib_tag="mdk" aq_distrib_version="`rpm -q --queryformat='%{VERSION}' mandriva-release 2>/dev/null`" AC_MSG_RESULT([yes, $aq_distrib_name]) elif test -e "/etc/mandrake-release"; then aq_distrib_name="mandrake" aq_distrib_tag="mdk" aq_distrib_version="`rpm -q --queryformat='%{VERSION}' mandrake-release 2>/dev/null`" AC_MSG_RESULT([yes, $aq_distrib_name]) elif test -e "/etc/SuSE-release"; then aq_distrib_name="suse" aq_distrib_tag="suse" read v1 v2 v3 v4 # These functions search for KDE 2-3 AC_DEFUN([AQ_CHECK_KDE],[ dnl $1 = operating system name ("linux", "freebsd", "windows") dnl $2 = subdirs to include when KDE is available dnl searches a dir for some files dnl You may preset the return variables. dnl All variables which already have a value will not be altered dnl returns some variables: dnl kde_generation either 1,2 or 3 dnl kde_includes path to includes dnl kde_libs path to libraries dnl kde_install_dir ops="$1" lsd="$2" dnl check if kde apps are desired AC_MSG_CHECKING(if KDE applications should be compiled) AC_ARG_ENABLE(kdeapps, [ --enable-kdeapps enable compilation of kde applications (default=yes)], enable_kdeapps="$enableval", enable_kdeapps="yes") AC_MSG_RESULT($enable_kdeapps) if test "$enable_kdeapps" = "no"; then kde_libs="" kde_includes="" kde_app="" else dnl paths for kde AC_ARG_WITH(kde-dir, [ --with-kde-dir=DIR uses kde from given dir], [local_kde_paths="$withval"], [local_kde_paths="\ $KDEDIR \ /opt/kde3 \ /usr/local/lib/kde3 \ /usr/lib/kde3 \ /lib/kde3 \ /opt/kde2 \ /usr/local/lib/kde2 \ /usr/lib/kde2 \ /lib/kde2 \ /opt/kde1 \ /usr/local/lib/kde1 \ /usr/lib/kde1 \ /lib/kde1 \ /opt/kde \ /usr/local/lib/kde \ /usr/lib/kde \ /lib/kde \ /usr/local \ /usr \ / \ "]) dnl check for library AC_MSG_CHECKING(for kde libraries) dnl check for 3 if test -z "$kde_libs" ; then AQ_SEARCH_FOR_PATH([lib/libkdeui.so.4],[$local_kde_paths]) if test -n "$found_dir" ; then kde_dir="$found_dir" kde_libs="-L$found_dir/lib" kde_generation="3" fi fi dnl check for 2 if test -z "$kde_libs"; then AQ_SEARCH_FOR_PATH([lib/libkdeui.so.3],[$local_kde_paths]) if test -n "$found_dir" ; then kde_dir="$found_dir" kde_libs="-L$found_dir/lib" kde_generation="2" fi fi dnl check for 1 if test -z "$kde_libs"; then AQ_SEARCH_FOR_PATH([lib/libkdeui.so],[$local_kde_paths]) if test -n "$found_dir" ; then kde_dir="$found_dir" kde_libs="-L$found_dir/lib" kde_generation="1" fi fi if test -z "$kde_libs"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($kde_libs) fi dnl check for includes AC_MSG_CHECKING(for kde includes) if test -z "$kde_includes"; then AQ_SEARCH_FOR_PATH([include/kpushbutton.h],[$kde_dir $local_kde_paths]) if test -n "$found_dir" ; then kde_includes="-I$found_dir/include" fi fi if test -z "$kde_includes"; then AQ_SEARCH_FOR_PATH([include/kde3/kpushbutton.h],[$kde_dir $local_kde_paths]) if test -n "$found_dir" ; then kde_includes="-I$found_dir/include/kde3" fi fi if test -z "$kde_includes"; then AQ_SEARCH_FOR_PATH([include/kde2/kpushbutton.h],[$kde_dir $local_kde_paths]) if test -n "$found_dir" ; then kde_includes="-I$found_dir/include/kde2" fi fi if test -z "$kde_includes"; then AQ_SEARCH_FOR_PATH([include/kde1/kpushbutton.h],[$kde_dir $local_kde_paths]) if test -n "$found_dir" ; then kde_includes="-I$found_dir/include/kde1" fi fi if test -z "$kde_includes"; then AQ_SEARCH_FOR_PATH([include/kde/kpushbutton.h],[$kde_dir $local_kde_paths]) if test -n "$found_dir" ; then kde_includes="-I$found_dir/include/kde" fi fi if test -z "$kde_includes"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($kde_includes) fi # check if all necessary kde components where found if test -n "$kde_includes" && \ test -n "$kde_libs"; then kde_app="$lsd" AC_DEFINE_UNQUOTED(KDE_GENERATION,$kde_generation,[KDE generation]) AC_MSG_CHECKING(for kde install prefix) AC_ARG_WITH(kde-prefix, [ --with-kde-prefix=DIR install kde apps to prefix], [kde_install_dir="$withval"], [kde_install_dir="$kde_dir"]) AC_MSG_RESULT($kde_install_dir) else kde_libs="" kde_includes="" kde_app="" if test "$enable_kdeapps" = "yes"; then AC_MSG_ERROR([ Compilation of KDE applications is enabled but I could not find some KDE components (see which are missing in messages above). If you don't want to compile KDE applications please use "--disable-kdeapps". ]) fi fi dnl end of if "$enable_kdeapps" fi AC_SUBST(kde_dir) AC_SUBST(kde_app) AC_SUBST(kde_libs) AC_SUBST(kde_includes) AC_SUBST(kde_generation) AC_SUBST(kde_install_dir) ]) gwenhywfar-5.12.1/m4/binreloc.m40000644000175000017500000000526713142134462013273 00000000000000# Check for binary relocation support. # Written by Hongli Lai # http://autopackage.org/ AC_DEFUN([AM_BINRELOC], [ AC_ARG_ENABLE(binreloc, [ --enable-binreloc compile with binary relocation support (default=enable when available)], enable_binreloc=$enableval,enable_binreloc=auto) AC_ARG_ENABLE(binreloc-threads, [ --enable-binreloc-threads compile binary relocation with threads support (default=yes)], enable_binreloc_threads=$enableval,enable_binreloc_threads=yes) BINRELOC_CFLAGS= BINRELOC_LIBS= if test "x$enable_binreloc" = "xauto"; then AC_CHECK_FILE([/proc/self/maps]) AC_CACHE_CHECK([whether everything is installed to the same prefix], [br_cv_valid_prefixes], [ # datarootdir variables was introduced with autoconf-2.60 if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \ \( "$datadir" = '${prefix}/share' -o \( "$datadir" = '${datarootdir}' -a "$datarootdir" = '${prefix}/share' \) \) -a \ "$libdir" = '${exec_prefix}/lib' -a \ "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc' then br_cv_valid_prefixes=yes else br_cv_valid_prefixes=no fi ]) fi AC_CACHE_CHECK([whether binary relocation support should be enabled], [br_cv_binreloc], [if test "x$enable_binreloc" = "xyes"; then br_cv_binreloc=yes elif test "x$enable_binreloc" = "xauto"; then if test "x$br_cv_valid_prefixes" = "xyes" -a \ "x$ac_cv_file__proc_self_maps" = "xyes"; then br_cv_binreloc=yes else br_cv_binreloc=no fi else br_cv_binreloc=no fi]) if test "x$br_cv_binreloc" = "xyes"; then BINRELOC_CFLAGS="-DENABLE_BINRELOC" AC_DEFINE(ENABLE_BINRELOC,,[Use binary relocation?]) if test "x$enable_binreloc_threads" = "xyes"; then AC_CHECK_LIB([pthread], [pthread_getspecific]) fi AC_CACHE_CHECK([whether binary relocation should use threads], [br_cv_binreloc_threads], [if test "x$enable_binreloc_threads" = "xyes"; then if test "x$ac_cv_lib_pthread_pthread_getspecific" = "xyes"; then br_cv_binreloc_threads=yes else br_cv_binreloc_threads=no fi else br_cv_binreloc_threads=no fi]) if test "x$br_cv_binreloc_threads" = "xyes"; then BINRELOC_LIBS="-lpthread" AC_DEFINE(BR_PTHREAD,1,[Include pthread support for binary relocation?]) else BINRELOC_CFLAGS="$BINRELOC_CFLAGS -DBR_PTHREADS=0" AC_DEFINE(BR_PTHREAD,0,[Include pthread support for binary relocation?]) fi fi AC_SUBST(BINRELOC_CFLAGS) AC_SUBST(BINRELOC_LIBS) ]) gwenhywfar-5.12.1/m4/iconv.m40000644000175000017500000001375513142134462012615 00000000000000# iconv.m4 serial AM6 (gettext-0.16.2) dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) gwenhywfar-5.12.1/m4/lib-prefix.m40000644000175000017500000001503613142134462013532 00000000000000# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) gwenhywfar-5.12.1/m4/lib-ld.m40000644000175000017500000000653113142134462012634 00000000000000# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) gwenhywfar-5.12.1/m4/qt.m40000644000175000017500000001377113142134462012121 00000000000000# $Id$ # (c) 2002 Martin Preuss # These functions search for QT 2-3 AC_DEFUN([AQ_CHECK_QT],[ dnl $1 = operating system name ("linux", "freebsd", "windows") dnl $2 = subdirs to include when QT is available dnl searches a dir for some files dnl You may preset the return variables. dnl All variables which already have a value will not be altered dnl returns some variables: dnl qt_generation either 1,2 or 3 dnl qt_includes path to includes dnl qt_libs path to libraries dnl qt_moc path to moc dnl qt_uic path to uic ops="$1" lsd="$2" dnl check if qt apps are desired AC_MSG_CHECKING(if QT applications should be compiled) AC_ARG_ENABLE(qtapps, [ --enable-qtapps enable compilation of qt applications (default=yes)], enable_qtapps="$enableval", enable_qtapps="yes") AC_MSG_RESULT($enable_qtapps) if test "$enable_qtapps" = "no"; then qt_libs="" qt_includes="" qt_app="" qt_moc="" qt_uic="" else dnl paths for qt AC_ARG_WITH(qt-dir, [ --with-qt-dir=DIR uses qt from given dir], [local_qt_paths="$withval"], [local_qt_paths="\ $QTDIR \ /usr/local/lib/qt3 \ /usr/lib/qt3 \ /lib/qt3 \ /usr/local/lib/qt2 \ /usr/lib/qt2 \ /lib/qt2 \ /usr/local/lib/qt1 \ /usr/lib/qt1 \ /lib/qt1 \ /usr/local/lib/qt \ /usr/lib/qt \ /lib/qt \ /usr/local \ /usr \ /usr/X11R6 \ / \ "]) AC_MSG_CHECKING(if threaded qt may be used) AC_ARG_ENABLE(qt-threads, [ --enable-qt-threads enable qt-mt library (default=yes)], enable_qt_threads="$enableval", enable_qt_threads="yes") AC_MSG_RESULT($enable_qt_threads) dnl check for library AC_MSG_CHECKING(for qt libraries) dnl check for 3 if test -z "$qt_libs" && test "$enable_qt_threads" != "no"; then AQ_SEARCH_FOR_PATH([lib/libqt-mt.so.3],[$local_qt_paths]) if test -n "$found_dir" ; then qt_dir="$found_dir" qt_libs="-L$found_dir/lib -lqt-mt" qt_generation="3" fi fi if test -z "$qt_libs"; then AQ_SEARCH_FOR_PATH([lib/libqt.so.3],[$local_qt_paths]) if test -n "$found_dir" ; then qt_dir="$found_dir" qt_libs="-L$found_dir/lib -lqt" qt_generation="3" fi fi dnl check for 2 if test -z "$qt_libs" && test "$enable_qt_threads" != "no"; then AQ_SEARCH_FOR_PATH([lib/libqt-mt.so.2],[$local_qt_paths]) if test -n "$found_dir" ; then qt_dir="$found_dir" qt_libs="-L$found_dir/lib -lqt-mt" qt_generation="2" fi fi if test -z "$qt_libs"; then AQ_SEARCH_FOR_PATH([lib/libqt.so.2],[$local_qt_paths]) if test -n "$found_dir" ; then qt_dir="$found_dir" qt_libs="-L$found_dir/lib -lqt" qt_generation="2" fi fi dnl check for 1 if test -z "$qt_libs" && test "$enable_qt_threads" != "no"; then AQ_SEARCH_FOR_PATH([lib/libqt-mt.so.1],[$local_qt_paths]) if test -n "$found_dir" ; then qt_dir="$found_dir" qt_libs="-L$found_dir/lib -lqt-mt" qt_generation="1" fi fi if test -z "$qt_libs"; then AQ_SEARCH_FOR_PATH([lib/libqt.so.1],[$local_qt_paths]) if test -n "$found_dir" ; then qt_dir="$found_dir" qt_libs="-L$found_dir/lib -lqt" qt_generation="1" fi fi if test -z "$qt_libs"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($qt_libs) fi dnl check for includes AC_MSG_CHECKING(for qt includes) if test -z "$qt_includes"; then AQ_SEARCH_FOR_PATH([include/qt.h],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_includes="-I$found_dir/include" fi fi if test -z "$qt_includes"; then AQ_SEARCH_FOR_PATH([include/qt3/qt.h],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_includes="-I$found_dir/include/qt3" fi fi if test -z "$qt_includes"; then AQ_SEARCH_FOR_PATH([include/qt2/qt.h],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_includes="-I$found_dir/include/qt2" fi fi if test -z "$qt_includes"; then AQ_SEARCH_FOR_PATH([include/qt1/qt.h],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_includes="-I$found_dir/include/qt1" fi fi if test -z "$qt_includes"; then AQ_SEARCH_FOR_PATH([include/qt/qt.h],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_includes="-I$found_dir/include/qt" fi fi if test -z "$qt_includes"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($qt_includes) fi dnl check for moc AC_MSG_CHECKING(for qt moc) if test -z "$qt_moc"; then AQ_SEARCH_FOR_PATH([bin/moc],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_moc="$found_dir/bin/moc" fi fi if test -z "$qt_moc"; then AQ_SEARCH_FOR_PATH([bin/moc2],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_moc="$found_dir/bin/moc2" fi fi if test -z "$qt_moc"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($qt_moc) fi dnl check for uic AC_MSG_CHECKING(for qt uic) if test -z "$qt_uic"; then AQ_SEARCH_FOR_PATH([bin/uic],[$qt_dir $local_qt_paths]) if test -n "$found_dir" ; then qt_uic="$found_dir/bin/uic" fi fi if test -z "$qt_uic"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($qt_uic) fi # check if all necessary qt components where found if test -n "$qt_includes" && \ test -n "$qt_libs" && \ test -n "$qt_moc" && \ test -n "$qt_uic"; then qt_app="$lsd" AC_DEFINE_UNQUOTED(QT_GENERATION,$qt_generation, [QT generation]) else qt_libs="" qt_includes="" qt_app="" qt_moc="" qt_uic="" if test "$enable_qtapps" = "yes"; then AC_MSG_ERROR([ Compilation of QT applications is enabled but I could not find some QT components (see which are missing in messages above). If you don't want to compile QT applications please use "--disable-qtapps". ]) fi fi dnl end of if "$enable_qtapps" fi AC_SUBST(qt_dir) AC_SUBST(qt_app) AC_SUBST(qt_libs) AC_SUBST(qt_includes) AC_SUBST(qt_moc) AC_SUBST(qt_uic) AC_SUBST(qt_generation) ]) gwenhywfar-5.12.1/m4/debugmode.m40000644000175000017500000000110013142134462013407 00000000000000# $Id$ # (c) 2002 Martin Preuss # This function checks for the debugmode AC_DEFUN([AQ_DEBUGMODE],[ dnl IN: dnl nothing dnl OUT: dnl Variables: dnl DEBUGMODE: number of the debug level (subst) dnl Defines: dnl DEBUGMODE: number of the debug level (subst) dnl check for debugmode AC_MSG_CHECKING(for debug mode) AC_ARG_WITH(debug-mode, [ --with-debug-mode=MODE debug mode], [DEBUGMODE="$withval"], [DEBUGMODE="0"]) AC_SUBST(DEBUGMODE) AC_DEFINE_UNQUOTED(DEBUGMODE,$DEBUGMODE,[debug mode to be used]) AC_MSG_RESULT($DEBUGMODE) ]) gwenhywfar-5.12.1/m4/ltsugar.m40000644000175000017500000001045314605317530013154 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) gwenhywfar-5.12.1/m4/ax_pthread.m40000664000175000017500000005052214043240674013615 00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS # # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C programs using POSIX threads. It # sets the PTHREAD_LIBS output variable to the threads library and linker # flags, and the PTHREAD_CFLAGS output variable to any special C compiler # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # # Also sets PTHREAD_CC to any special C compiler that is needed for # multi-threaded programs (defaults to the value of CC otherwise). (This # is necessary on AIX to use the special cc_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, # but also to link with them as well. For example, you might link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # # If you are only building threaded programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to # that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with # PTHREAD_CFLAGS. # # ACTION-IF-FOUND is a list of shell commands to run if a threads library # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it # is not found. If ACTION-IF-FOUND is not specified, the default action # will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or if # you have any other suggestions or comments. This macro was based on work # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by # Alejandro Forero Cuervo to the autoconf macro repository. We are also # grateful for the helpful feedback of numerous users. # # Updated for Autoconf 2.68 by Daniel Richard G. # # LICENSE # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 24 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_SED]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then ax_pthread_save_CC="$CC" ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) AC_MSG_RESULT([$ax_pthread_ok]) if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi CC="$ax_pthread_save_CC" CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 # (Note: HP C rejects this with "bad form for `-t' option") # -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads and # -D_REENTRANT too), HP C (must be checked before -lpthread, which # is present but should not be used directly; and before -mthreads, # because the compiler interprets this as "-mt" + "-hreads") # -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case $host_os in freebsd*) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) ax_pthread_flags="-kthread lthread $ax_pthread_flags" ;; hpux*) # From the cc(1) man page: "[-mt] Sets various -D flags to enable # multi-threading and also sets -lpthread." ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" ;; openedition*) # IBM z/OS requires a feature-test macro to be defined in order to # enable POSIX threads at all, so give the user a hint if this is # not set. (We don't define these ourselves, as they can affect # other portions of the system API in unpredictable ways.) AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], [ # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) AX_PTHREAD_ZOS_MISSING # endif ], [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) ;; solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (N.B.: The stubs are missing # pthread_cleanup_push, or rather a function called by this macro, # so we could check for that, but who knows whether they'll stub # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" ;; esac # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) AS_IF([test "x$GCC" = "xyes"], [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is # correctly enabled case $host_os in darwin* | hpux* | linux* | osf* | solaris*) ax_pthread_check_macro="_REENTRANT" ;; aix*) ax_pthread_check_macro="_THREAD_SAFE" ;; *) ax_pthread_check_macro="--" ;; esac AS_IF([test "x$ax_pthread_check_macro" = "x--"], [ax_pthread_check_cond=0], [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) # Are we compiling with Clang? AC_CACHE_CHECK([whether $CC is Clang], [ax_cv_PTHREAD_CLANG], [ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ # if defined(__clang__) && defined(__llvm__) AX_PTHREAD_CC_IS_CLANG # endif ], [ax_cv_PTHREAD_CLANG=yes]) fi ]) ax_pthread_clang="$ax_cv_PTHREAD_CLANG" ax_pthread_clang_warning=no # Clang needs special handling, because older versions handle the -pthread # option in a rather... idiosyncratic way if test "x$ax_pthread_clang" = "xyes"; then # Clang takes -pthread; it has never supported any other flag # (Note 1: This will need to be revisited if a system that Clang # supports has POSIX threads in a separate library. This tends not # to be the way of modern systems, but it's conceivable.) # (Note 2: On some systems, notably Darwin, -pthread is not needed # to get POSIX threads support; the API is always present and # active. We could reasonably leave PTHREAD_CFLAGS empty. But # -pthread does define _REENTRANT, and while the Darwin headers # ignore this macro, third-party headers might not.) PTHREAD_CFLAGS="-pthread" PTHREAD_LIBS= ax_pthread_ok=yes # However, older versions of Clang make a point of warning the user # that, in an invocation where only linking and no compilation is # taking place, the -pthread option has no effect ("argument unused # during compilation"). They expect -pthread to be passed in only # when source code is being compiled. # # Problem is, this is at odds with the way Automake and most other # C build frameworks function, which is that the same flags used in # compilation (CFLAGS) are also used in linking. Many systems # supported by AX_PTHREAD require exactly this for POSIX threads # support, and in fact it is often not straightforward to specify a # flag that is used only in the compilation phase and not in # linking. Such a scenario is extremely rare in practice. # # Even though use of the -pthread flag in linking would only print # a warning, this can be a nuisance for well-run software projects # that build with -Werror. So if the active version of Clang has # this misfeature, we search for an option to squash it. AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one # (.c -> exe), because the warning occurs only in the second # step ax_pthread_save_ac_link="$ac_link" ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" ac_link="$ax_pthread_save_ac_link" AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], [ac_link="$ax_pthread_2step_ac_link" AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], [break]) ]) done ac_link="$ax_pthread_save_ac_link" CFLAGS="$ax_pthread_save_CFLAGS" AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" ]) case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in no | unknown) ;; *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; esac fi # $ax_pthread_clang = yes if test "x$ax_pthread_ok" = "xno"; then for ax_pthread_try_flag in $ax_pthread_flags; do case $ax_pthread_try_flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -mt,pthread) AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) PTHREAD_CFLAGS="-mt" PTHREAD_LIBS="-lpthread" ;; -*) AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([#include # if $ax_pthread_check_cond # error "$ax_pthread_check_macro must be defined" # endif static void routine(void *a) { a = 0; } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], [ax_pthread_ok=yes], []) CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" AC_MSG_RESULT([$ax_pthread_ok]) AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$ax_pthread_ok" = "xyes"; then ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_CACHE_CHECK([for joinable pthread attribute], [ax_cv_PTHREAD_JOINABLE_ATTR], [ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int attr = $ax_pthread_attr; return attr /* ; */])], [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], []) done ]) AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ test "x$ax_pthread_joinable_attr_defined" != "xyes"], [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$ax_cv_PTHREAD_JOINABLE_ATTR], [Define to necessary symbol if this constant uses a non-standard name on your system.]) ax_pthread_joinable_attr_defined=yes ]) AC_CACHE_CHECK([whether more special flags are required for pthreads], [ax_cv_PTHREAD_SPECIAL_FLAGS], [ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; esac ]) AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ test "x$ax_pthread_special_flags_added" != "xyes"], [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" ax_pthread_special_flags_added=yes]) AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], [ax_cv_PTHREAD_PRIO_INHERIT], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ test "x$ax_pthread_prio_inherit_defined" != "xyes"], [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) ax_pthread_prio_inherit_defined=yes ]) CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant if test "x$GCC" != "xyes"; then case $host_os in aix*) AS_CASE(["x/$CC"], [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], [#handle absolute path differently from PATH based program lookup AS_CASE(["x$CC"], [x/*], [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "x$ax_pthread_ok" = "xyes"; then ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) : else ax_pthread_ok=no $2 fi AC_LANG_POP ])dnl AX_PTHREAD gwenhywfar-5.12.1/m4/searchfiles.m40000644000175000017500000000157313142134462013762 00000000000000# $Id$ # (c) 2002 Martin Preuss # These functions search for files AC_DEFUN([AQ_SEARCH_FOR_PATH],[ dnl searches for a file in a path dnl $1 = file to search dnl $2 = paths to search in dnl returns the directory where the file is found (found_dir) found_dir="" ls=$1 ld="$2" for li in $ld; do case "$build" in *-win32*) fname="$li\\$ls" ;; *) fname="$li/$ls" ;; esac if test -r "$fname"; then found_dir="$li" break fi done ]) AC_DEFUN([AQ_SEARCH_FILES],[ dnl searches a dir for some files dnl $1 = path where to search dnl $2 = files to find dnl returns the name of the file found (found_file) found_file="" ls="$1" ld="$2" lf="" for li in $ld; do lf2="`ls -d ${ls}/${li} 2>/dev/null`" lf="$lf $lf2" done for li in $lf; do if test -r "$li"; then found_file=`basename "$li"` break fi done ]) gwenhywfar-5.12.1/m4/os.m40000644000175000017500000000571013142134462012110 00000000000000# $Id$ # (c) 2002 Martin Preuss # These functions guess your operation system AC_DEFUN([AQ_CHECK_OS],[ dnl IN: dnl - AC_CANONICAL_SYSTEM muste be called before dnl OUT: dnl Variables: dnl OSYSTEM: Short name of your system (subst) dnl OS_TYPE: either "posix" or "windows" (subst) dnl MAKE_DLL_TARGET: under windows this is set to "dll" (subst) dnl INSTALL_DLL_TARGET: under Windows this is set to "dll-install" (subst) dnl Defines: dnl OS_NAME: full name of your system dnl OS_SHORTNAME: short name of your system dnl Depending on your system one of the following is defined in addition: dnl OS_LINUX, OS_OPENBSD, OS_FREEBSD, OS_BEOS, OS_WIN32 # check for OS AC_MSG_CHECKING([host system type]) OSYSTEM="" OS_TYPE="" MAKE_DLL_TARGET="" INSTALL_DLL_TARGET="" AC_DEFINE_UNQUOTED(OS_NAME,"$host", [host system]) case "$host" in *-linux*) OSYSTEM="linux" AC_DEFINE(OS_LINUX,1,[if linux is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-solaris*) OSYSTEM="solaris" AC_DEFINE(OS_SOLARIS,1,[if Solaris is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-darwin*) OSYSTEM="osx" AC_DEFINE(OS_DARWIN,1,[if Apple Darwin is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-openbsd*) OSYSTEM="openbsd" AC_DEFINE(OS_OPENBSD,1,[if OpenBSD is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-freebsd* | *-kfreebsd*) OSYSTEM="freebsd" AC_DEFINE(OS_FREEBSD,1,[if FreeBSD is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-netbsd*) OSYSTEM="netbsd" AC_DEFINE(OS_NETBSD,1,[if NetBSD is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-beos*) OSYSTEM="beos" AC_DEFINE(OS_BEOS,1,[if BeOS is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-win32*) OSYSTEM="windows" AC_DEFINE(OS_WIN32,1,[if WIN32 is used]) OS_TYPE="windows" AC_DEFINE_UNQUOTED(BUILDING_DLL,1,[if DLL is to be built]) MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-mingw32*) OSYSTEM="windows" AC_DEFINE(OS_WIN32,1,[if WIN32 is used]) OS_TYPE="windows" AC_DEFINE_UNQUOTED(BUILDING_DLL,1,[if DLL is to be built]) MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-palmos*) OSYSTEM="palmos" AC_DEFINE(OS_PALMOS,1,[if PalmOS is used]) OS_TYPE="palmos" ;; *) AC_MSG_WARN([Sorry, but host $host is not supported. Please report if it works anyway. We will assume that your system is a posix system and continue.]) OSYSTEM="unknown" OS_TYPE="posix" AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) ;; esac AC_SUBST(OSYSTEM) AC_DEFINE_UNQUOTED(OS_SHORTNAME,"$OSYSTEM",[host system]) AC_SUBST(OS_TYPE) AC_DEFINE_UNQUOTED(OS_TYPE,"$OS_TYPE",[system type]) AC_SUBST(MAKE_DLL_TARGET) AC_SUBST(INSTALL_DLL_TARGET) AC_MSG_RESULT($OS_TYPE) ]) gwenhywfar-5.12.1/m4/libtool.m40000644000175000017500000113165214605317530013145 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 59 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} _LT_DECL([], [AR], [1], [The archiver]) # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -z "$STRIP"; then AC_MSG_RESULT([no]) else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl* | ,icl* | no,icl*) # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_FILECMD # ---------------- # Check for a file(cmd) program that can be used to detect file type and magic m4_defun([_LT_DECL_FILECMD], [AC_CHECK_TOOL([FILECMD], [file], [:]) _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) ])# _LD_DECL_FILECMD # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS gwenhywfar-5.12.1/m4/endian.m40000644000175000017500000000201113142134462012714 00000000000000# $Id: endian.m4 595 2004-11-19 16:17:17Z aquamaniac $ # (c) 2006 Martin Preuss # This function check for endianness AC_DEFUN([AQ_ENDIAN],[ dnl PREREQUISITES: dnl none dnl IN: dnl - default type for crosscompiling dnl OUT: dnl Variables: dnl aq_endian dnl Defines: # check for type to use AC_MSG_CHECKING(for endianness) rm -f conf.endian AC_TRY_RUN([ #include #include int main (){ const char *s; FILE *f; union { unsigned int i; unsigned char c[4]; } u; u.i=0x12345678; if (u.c[0]==0x78) s="little"; else s="big"; f=fopen("conf.endian", "w+"); if (!f) { printf("Could not create file conf.endian\n"); exit(1); } fprintf(f, "%s\n", s); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_endian=`cat conf.endian`; AC_MSG_RESULT($aq_endian)], [AC_MSG_ERROR(Could not determine endianness)], [aq_endian="$1"; AC_MSG_RESULT([Crosscompiling, assuming $1])] ) rm -f conf.endian ]) gwenhywfar-5.12.1/m4/ltversion.m40000644000175000017500000000131214605317530013512 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, # Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4245 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.7]) m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.7' macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) gwenhywfar-5.12.1/m4/windoze.m40000644000175000017500000002302613142134462013146 00000000000000# $Id$ # (c) 2004 Martin Preuss # These functions retrieve some important paths AC_DEFUN([AQ_WINDOZE_GETPATH], [ dnl IN: dnl - $1: type of path to get: dnl - windows: windows path dnl - system: windows/system directory dnl - home: users home directory dnl - $2: default value dnl OUT: dnl - aq_windoze_path: path retrieved dnl rm -f conf.winpath save_LIBS="${LIBS}" LIBS="${LIBS} -lshfolder" AC_TRY_RUN([ #include #include #include #include #include int main (){ char buffer[260]; const char *choice = "$1"; FILE *f; buffer[0]=0; if (strlen("$2")) { if (strlen("$2")>=sizeof(buffer)) { printf("path is too long ($2)\n"); exit(1); } strcpy(buffer, "$2"); } else { if (strcasecmp(choice, "windows")==0) { GetWindowsDirectory(buffer, sizeof(buffer)); } else if (strcasecmp(choice, "system")==0) { GetSystemDirectory(buffer, sizeof(buffer)); } else if (strcasecmp(choice, "home")==0) { GetWindowsDirectory(buffer, sizeof(buffer)); } else if (strcasecmp(choice, "program_files") == 0) { SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, 0, buffer); } else if (strcasecmp(choice, "common_appdata") == 0) { SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, buffer); } else { printf("Unknown type \"$1\"\n"); exit(1); } } f=fopen("conf.winpath", "w+"); if (!f) { printf("Could not create file conf.winpath\n"); exit(1); } fprintf(f, "%s", buffer); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_windoze_path="`cat conf.winpath`"], [AC_MSG_ERROR(Could not determine path for $1)], [aq_windoze_path="$2"; AC_MSG_RESULT([Crosscompiling, assuming $2])] ) LIBS="${save_LIBS}" rm -f conf.winpath ]) AC_DEFUN([AQ_WINDOZE_GETPATH_MINGW], [ dnl IN: dnl - $1: type of path to get: dnl - windows: windows path dnl - system: windows/system directory dnl - home: users home directory dnl - $2: default value dnl OUT: dnl - aq_windoze_path: path retrieved dnl rm -f conf.winpath LIBS="${LIBS} -lshfolder" AC_TRY_RUN([ #include #include #include #include #include int main (){ char buffer[260]; char buffer2[260+2]; const char *choice = "$1"; char *p; char *tp; FILE *f; int lastWasSlash; buffer[0]=0; if (strlen("$2")) { if (strlen("$2")>=sizeof(buffer)) { printf("path is too long ($2)\n"); exit(1); } strcpy(buffer, "$2"); } else { if (strcasecmp(choice, "windows")==0) { GetWindowsDirectory(buffer, sizeof(buffer)); } else if (strcasecmp(choice, "system")==0) { GetSystemDirectory(buffer, sizeof(buffer)); } else if (strcasecmp(choice, "home")==0) { GetWindowsDirectory(buffer, sizeof(buffer)); } else if (strcasecmp(choice, "program_files") == 0) { SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, 0, buffer); } else if (strcasecmp(choice, "common_appdata") == 0) { SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, buffer); } else { printf("Unknown type \"$1\"\n"); exit(1); } } /* create mingw path */ tp=buffer2; p=buffer; if (strlen(buffer)>1) { if (buffer[1]==':') { *tp='/'; tp++; *tp=buffer[0]; tp++; p+=2; } } lastWasSlash=0; while(*p) { if (*p=='\\\\' || *p=='/') { if (!lastWasSlash) { *tp='/'; tp++; lastWasSlash=1; } } else { lastWasSlash=0; *tp=*p; tp++; } p++; } /* while */ *tp=0; f=fopen("conf.winpath", "w+"); if (!f) { printf("Could not create file conf.winpath\n"); exit(1); } fprintf(f, "%s", buffer2); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_windoze_path=`cat conf.winpath`], [AC_MSG_ERROR(Could not determine path for $1)], [aq_windoze_path="$2"; AC_MSG_RESULT([Crosscompiling, assuming $2])] ) LIBS="${save_LIBS}" rm -f conf.winpath ]) AC_DEFUN([ACX_WINDOWS_PATHS],[ dnl IN: dnl - AC_CANONICAL_SYSTEM muste be called before dnl OUT: dnl Variables (subst): dnl WIN_PATH_HOME : path and name of the Windoze home folder dnl WIN_PATH_HOME_MINGW : path and name of the Windoze home folder dnl WIN_PATH_WINDOWS : path and name of the Windoze system folder dnl WIN_PATH_WINDOWS_MINGW : path and name of the Windoze system folder dnl WIN_PATH_SYSTEM : path and name of the Windoze folder dnl WIN_PATH_SYSTEM_MINGW : path and name of the Windoze folder dnl WIN_PATH_PROGRAM_FILES dnl WIN_PATH_PROGRAM_FILES_MINGW dnl WIN_PATH_COMMON_APPDATA dnl WIN_PATH_COMMON_APPDATA_MINGW dnl Defines: dnl WIN_PATH_HOME : path and name of the Windoze home folder dnl WIN_PATH_WINDOWS : path and name of the Windoze system folder dnl WIN_PATH_SYSTEM : path and name of the Windoze folder dnl WIN_PATH_PROGRAM_FILES : path of the program files folder dnl WIN_PATH_COMMON_APPDATA : The directory containing application data for all users # presets AC_ARG_WITH(home-path, [ --with-home-path=DIR specify the home directory for a user], [aq_windoze_path_home="$withval"]) AC_ARG_WITH(system-path, [ --with-system-path=DIR specify the system directory], [aq_windoze_path_system="$withval"]) AC_ARG_WITH(windows-path, [ --with-windows-path=DIR specify the windows directory], [aq_windoze_path_windows="$withval"]) # home directory AC_MSG_CHECKING([for windoze home path (program)]) AC_CACHE_VAL(gwenhywfar_cv_path_home, [ AQ_WINDOZE_GETPATH(home, [$aq_windoze_path_home]) gwenhywfar_cv_path_home="$aq_windoze_path" ]) WIN_PATH_HOME="$gwenhywfar_cv_path_home" AC_MSG_RESULT([$WIN_PATH_HOME]) AC_MSG_CHECKING([for windoze home path (mingw)]) AC_CACHE_VAL(gwenhywfar_cv_path_home_mingw, [ AQ_WINDOZE_GETPATH_MINGW(home, [$aq_windoze_path_home]) gwenhywfar_cv_path_home_mingw="$aq_windoze_path" ]) WIN_PATH_HOME_MINGW="$gwenhywfar_cv_path_home_mingw" AC_MSG_RESULT([$WIN_PATH_HOME_MINGW]) # windows directory AC_MSG_CHECKING([for windoze windows path (program)]) AC_CACHE_VAL(gwenhywfar_cv_path_windows, [ AQ_WINDOZE_GETPATH(windows, [$aq_windoze_path_windows]) gwenhywfar_cv_path_windows="$aq_windoze_path" ]) WIN_PATH_WINDOWS="$gwenhywfar_cv_path_windows" AC_MSG_RESULT([$WIN_PATH_WINDOWS]) AC_MSG_CHECKING([for windoze windows path (mingw)]) AC_CACHE_VAL(gwenhywfar_cv_path_windows_mingw, [ AQ_WINDOZE_GETPATH_MINGW(windows, [$aq_windoze_path_windows]) gwenhywfar_cv_path_windows_mingw="$aq_windoze_path" ]) WIN_PATH_WINDOWS_MINGW="$gwenhywfar_cv_path_windows_mingw" AC_MSG_RESULT([$WIN_PATH_WINDOWS_MINGW]) # windows system directory AC_MSG_CHECKING([for windoze system path (program)]) AC_CACHE_VAL(gwenhywfar_cv_path_system, [ AQ_WINDOZE_GETPATH(system, [$aq_windoze_path_system]) gwenhywfar_cv_path_system="$aq_windoze_path" ]) WIN_PATH_SYSTEM="$gwenhywfar_cv_path_system" AC_MSG_RESULT([$WIN_PATH_SYSTEM]) AC_MSG_CHECKING([for windoze system path (mingw)]) AC_CACHE_VAL(gwenhywfar_cv_path_system_mingw, [ AQ_WINDOZE_GETPATH_MINGW(system, [$aq_windoze_path_system]) gwenhywfar_cv_path_system_mingw="$aq_windoze_path" ]) WIN_PATH_SYSTEM_MINGW="$gwenhywfar_cv_path_system_mingw" AC_MSG_RESULT([$WIN_PATH_SYSTEM_MINGW]) # program files directory AC_MSG_CHECKING([for program files path (program)]) AC_CACHE_VAL(gwenhywfar_cv_path_programfiles, [ AQ_WINDOZE_GETPATH(program_files, [$aq_windoze_path_system]) gwenhywfar_cv_path_programfiles="$aq_windoze_path" ]) WIN_PATH_PROGRAM_FILES="$gwenhywfar_cv_path_programfiles" AC_MSG_RESULT([$WIN_PATH_PROGRAM_FILES]) AC_MSG_CHECKING([for program files path (mingw)]) AC_CACHE_VAL(gwenhywfar_cv_path_programfiles_mingw, [ AQ_WINDOZE_GETPATH_MINGW(program_files, [$aq_windoze_path_system]) gwenhywfar_cv_path_programfiles_mingw="$aq_windoze_path" ]) WIN_PATH_PROGRAM_FILES_MINGW="$gwenhywfar_cv_path_programfiles_mingw" AC_MSG_RESULT([$WIN_PATH_PROGRAM_FILES_MINGW]) # common application data directory AC_MSG_CHECKING([for common app data path (program)]) AC_CACHE_VAL(gwenhywfar_cv_path_commonappdata, [ AQ_WINDOZE_GETPATH(common_appdata, [$aq_windoze_path_system]) gwenhywfar_cv_path_commonappdata="$aq_windoze_path" ]) WIN_PATH_COMMON_APPDATA="$gwenhywfar_cv_path_commonappdata" AC_MSG_RESULT([$WIN_PATH_COMMON_APPDATA]) AC_MSG_CHECKING([for common app data path (mingw)]) AC_CACHE_VAL(gwenhywfar_cv_path_commonappdata_mingw, [ AQ_WINDOZE_GETPATH_MINGW(common_appdata, [$aq_windoze_path_system]) gwenhywfar_cv_path_commonappdata_mingw="$aq_windoze_path" ]) WIN_PATH_COMMON_APPDATA_MINGW="$gwenhywfar_cv_path_commonappdata_mingw" AC_MSG_RESULT([$WIN_PATH_COMMON_APPDATA_MINGW]) # finish variables AC_SUBST(WIN_PATH_HOME) AC_DEFINE_UNQUOTED(WIN_PATH_HOME, "$WIN_PATH_HOME", [home path]) AC_SUBST(WIN_PATH_HOME_MINGW) AC_SUBST(WIN_PATH_WINDOWS) AC_DEFINE_UNQUOTED(WIN_PATH_WINDOWS, "$WIN_PATH_WINDOWS", [windows path]) AC_SUBST(WIN_PATH_WINDOWS_MINGW) AC_SUBST(WIN_PATH_SYSTEM) AC_DEFINE_UNQUOTED(WIN_PATH_SYSTEM, "$WIN_PATH_SYSTEM", [system path]) AC_SUBST(WIN_PATH_SYSTEM_MINGW) AC_SUBST(WIN_PATH_PROGRAM_FILES) AC_DEFINE_UNQUOTED(WIN_PATH_PROGRAM_FILES, "$WIN_PATH_PROGRAM_FILES", [program files path]) AC_SUBST(WIN_PATH_PROGRAM_FILES_MINGW) AC_SUBST(WIN_PATH_COMMON_APPDATA) AC_DEFINE_UNQUOTED(WIN_PATH_COMMON_APPDATA, "$WIN_PATH_COMMON_APPDATA", [common app data path]) AC_SUBST(WIN_PATH_COMMON_APPDATA_MINGW) ]) gwenhywfar-5.12.1/m4/docpath.m40000644000175000017500000000100313142134462013100 00000000000000# $Id$ # (c) 2002 Martin Preuss # This function checks for the output path for the documentation AC_DEFUN([AQ_DOCPATH],[ dnl PREREQUISITES: dnl none dnl IN: dnl nothing dnl OUT: dnl Variables: dnl docpath: Output path for the documentation (subst) dnl Defines: # check for docpath AC_MSG_CHECKING(for docpath) AC_ARG_WITH(docpath, [ --with-docpath=DIR where to store the apidoc], [docpath="$withval"], [docpath="apidoc"]) AC_SUBST(docpath) AC_MSG_RESULT($docpath) ]) gwenhywfar-5.12.1/m4/ltoptions.m40000644000175000017500000003427514605317530013536 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) gwenhywfar-5.12.1/m4/Makefile.in0000644000175000017500000004446015032533614013301 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_compile_warn.m4 \ $(top_srcdir)/m4/as-scrub-include.m4 \ $(top_srcdir)/m4/ax_have_qt.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/binreloc.m4 $(top_srcdir)/m4/distri.m4 \ $(top_srcdir)/m4/fox.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/os.m4 $(top_srcdir)/m4/qt4.m4 \ $(top_srcdir)/m4/searchfiles.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPKIT_FRAMEWORK = @APPKIT_FRAMEWORK@ AR = @AR@ AS = @AS@ ASTYLE = @ASTYLE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ BINRELOC_LIBS = @BINRELOC_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COCOA_FRAMEWORK = @COCOA_FRAMEWORK@ COREDATA_FRAMEWORK = @COREDATA_FRAMEWORK@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_DEFINE = @DOXYGEN_DEFINE@ DOXYGEN_GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ DOXYGEN_INPUT = @DOXYGEN_INPUT@ DOXYGEN_QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ DOXYGEN_QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ DOXYGEN_TAGFILES = @DOXYGEN_TAGFILES@ DPKG_ARCH = @DPKG_ARCH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FOUNDATION_FRAMEWORK = @FOUNDATION_FRAMEWORK@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GWENHYWFAR_SO_AGE = @GWENHYWFAR_SO_AGE@ GWENHYWFAR_SO_CURRENT = @GWENHYWFAR_SO_CURRENT@ GWENHYWFAR_SO_EFFECTIVE = @GWENHYWFAR_SO_EFFECTIVE@ GWENHYWFAR_SO_REVISION = @GWENHYWFAR_SO_REVISION@ GWENHYWFAR_VERSION_BUILD = @GWENHYWFAR_VERSION_BUILD@ GWENHYWFAR_VERSION_FULL_STRING = @GWENHYWFAR_VERSION_FULL_STRING@ GWENHYWFAR_VERSION_MAJOR = @GWENHYWFAR_VERSION_MAJOR@ GWENHYWFAR_VERSION_MINOR = @GWENHYWFAR_VERSION_MINOR@ GWENHYWFAR_VERSION_PATCHLEVEL = @GWENHYWFAR_VERSION_PATCHLEVEL@ GWENHYWFAR_VERSION_RELEASE_STRING = @GWENHYWFAR_VERSION_RELEASE_STRING@ GWENHYWFAR_VERSION_STRING = @GWENHYWFAR_VERSION_STRING@ GWENHYWFAR_VERSION_TAG = @GWENHYWFAR_VERSION_TAG@ GWENPP_SO_AGE = @GWENPP_SO_AGE@ GWENPP_SO_CURRENT = @GWENPP_SO_CURRENT@ GWENPP_SO_EFFECTIVE = @GWENPP_SO_EFFECTIVE@ GWENPP_SO_REVISION = @GWENPP_SO_REVISION@ GWENUI_SO_AGE = @GWENUI_SO_AGE@ GWENUI_SO_CURRENT = @GWENUI_SO_CURRENT@ GWENUI_SO_EFFECTIVE = @GWENUI_SO_EFFECTIVE@ GWENUI_SO_REVISION = @GWENUI_SO_REVISION@ GWEN_OS = @GWEN_OS@ HAVE_I18N = @HAVE_I18N@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MAKE_I18N_FILES = @MAKE_I18N_FILES@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OHBCI_VERSION_STRING = @OHBCI_VERSION_STRING@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PROFILING_LDFLAGS = @PROFILING_LDFLAGS@ PROG_LIBRARIES = @PROG_LIBRARIES@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ QMAKE = @QMAKE@ QT4_BINDIR = @QT4_BINDIR@ QTPATHS = @QTPATHS@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_DIR = @QT_DIR@ QT_LIBS = @QT_LIBS@ QT_LRELEASE = @QT_LRELEASE@ QT_LUPDATE = @QT_LUPDATE@ QT_MAJOR_VERSION = @QT_MAJOR_VERSION@ QT_MOC = @QT_MOC@ QT_RCC = @QT_RCC@ QT_UIC = @QT_UIC@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ STRIPALL = @STRIPALL@ SYSCONF_FRAMEWORK = @SYSCONF_FRAMEWORK@ USE_DOT = @USE_DOT@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WEBKIT_FRAMEWORK = @WEBKIT_FRAMEWORK@ WERROR = @WERROR@ WITH_ICONV = @WITH_ICONV@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YES = @YES@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ ac_ct_QMAKE = @ac_ct_QMAKE@ ac_ct_QTPATHS = @ac_ct_QTPATHS@ all_includes = @all_includes@ all_libraries = @all_libraries@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ aq_distrib_name = @aq_distrib_name@ aq_distrib_tag = @aq_distrib_tag@ aq_distrib_version = @aq_distrib_version@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ docpath = @docpath@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fox_includes = @fox_includes@ fox_libs = @fox_libs@ gwenbuild_tool = @gwenbuild_tool@ gwenhywfar_bindir = @gwenhywfar_bindir@ gwenhywfar_buffer_hardlimit = @gwenhywfar_buffer_hardlimit@ gwenhywfar_cfg_searchdir = @gwenhywfar_cfg_searchdir@ gwenhywfar_crypt_lib = @gwenhywfar_crypt_lib@ gwenhywfar_data_searchdir = @gwenhywfar_data_searchdir@ gwenhywfar_datadir = @gwenhywfar_datadir@ gwenhywfar_guis = @gwenhywfar_guis@ gwenhywfar_headerdir = @gwenhywfar_headerdir@ gwenhywfar_headerdir_am = @gwenhywfar_headerdir_am@ gwenhywfar_internal_libname = @gwenhywfar_internal_libname@ gwenhywfar_ldflags = @gwenhywfar_ldflags@ gwenhywfar_libs = @gwenhywfar_libs@ gwenhywfar_libspp = @gwenhywfar_libspp@ gwenhywfar_libsui = @gwenhywfar_libsui@ gwenhywfar_locale_searchdir = @gwenhywfar_locale_searchdir@ gwenhywfar_os_lib = @gwenhywfar_os_lib@ gwenhywfar_pkgincludedir = @gwenhywfar_pkgincludedir@ gwenhywfar_plugin_searchdir = @gwenhywfar_plugin_searchdir@ gwenhywfar_plugindir = @gwenhywfar_plugindir@ gwenhywfar_plugins_cfgmgr_dirs = @gwenhywfar_plugins_cfgmgr_dirs@ gwenhywfar_plugins_cfgmgr_libs = @gwenhywfar_plugins_cfgmgr_libs@ gwenhywfar_plugins_ct_dirs = @gwenhywfar_plugins_ct_dirs@ gwenhywfar_plugins_ct_libs = @gwenhywfar_plugins_ct_libs@ gwenhywfar_plugins_dbio_dirs = @gwenhywfar_plugins_dbio_dirs@ gwenhywfar_plugins_dbio_libs = @gwenhywfar_plugins_dbio_libs@ gwenhywfar_symlinkdir = @gwenhywfar_symlinkdir@ gwenhywfar_sys_is_windows = @gwenhywfar_sys_is_windows@ gwenhywfar_sysdata_searchdir = @gwenhywfar_sysdata_searchdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ i18n_libs = @i18n_libs@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ qt4_includes = @qt4_includes@ qt4_libs = @qt4_libs@ qt4_moc = @qt4_moc@ qt4_uic = @qt4_uic@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ ssl_available = @ssl_available@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ visibility_cflags = @visibility_cflags@ with_gui_fox16 = @with_gui_fox16@ with_gui_gtk2 = @with_gui_gtk2@ with_gui_gtk3 = @with_gui_gtk3@ with_gui_qt4 = @with_gui_qt4@ EXTRA_DIST = \ acx_compile_warn.m4 \ ax_pthread.m4 \ as-scrub-include.m4 \ binreloc.m4 \ debugmode.m4 \ distri.m4 \ docpath.m4 \ endian.m4 \ iconv.m4 \ kde.m4 \ lib-prefix.m4 \ lib-link.m4 \ lib-ld.m4 \ os.m4 \ pcsc.m4 \ qt.m4 \ searchfiles.m4 \ types.m4 \ windoze.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile sources: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gwenhywfar-5.12.1/m4/README0000644000175000017500000000027113142134462012102 00000000000000# $Id$ # (c) 2002 Martin Preuss This folder includes some usefull macros for the automake/autoconf tools. This dramatically simplifies the "configure.in" file. gwenhywfar-5.12.1/m4/ax_have_qt.m40000644000175000017500000002242215032533366013613 00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_have_qt.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_QT # # DESCRIPTION # # Searches $PATH and queries qmake for Qt include files, libraries and Qt # binary utilities. The macro only supports Qt5 or later. # # The following shell variable is set to either "yes" or "no": # # have_qt # # Additionally, the following variables are exported: # # QT_CXXFLAGS # QT_LIBS # QT_MOC # QT_UIC # QT_RCC # QT_LRELEASE # QT_LUPDATE # QT_DIR # QMAKE # # which respectively contain an "-I" flag pointing to the Qt include # directory, link flags necessary to link with Qt and X, the full path to # the meta object compiler and the user interface compiler both, and # finally the variable QTDIR as Qt likes to see it defined. # # Example lines for Makefile.in: # # CXXFLAGS = @QT_CXXFLAGS@ # MOC = @QT_MOC@ # # After the variables have been set, a trial compile and link is performed # to check the correct functioning of the meta object compiler. This test # may fail when the different detected elements stem from different # releases of the Qt framework. In that case, an error message is emitted # and configure stops. # # No common variables such as $LIBS or $CFLAGS are polluted. # # LICENSE # # Copyright (c) 2008 Bastiaan Veelo # Copyright (c) 2014 Alex Henrie # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 27 AU_ALIAS([BNV_HAVE_QT], [AX_HAVE_QT]) AC_DEFUN([AX_HAVE_QT], [ AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PATH_X]) AC_REQUIRE([AC_PATH_XTRA]) # openSUSE leap 15.3 installs qmake-qt5, not qmake, for example. # Store the full name (like qmake-qt5) into QMAKE # and the specifier (like -qt5 or empty) into am_have_qt_qmexe_suff. AC_ARG_VAR([QMAKE],[Qt make tool]) AC_CHECK_TOOLS([QMAKE],[qmake qmake-qt6 qmake6 qmake-qt5],[false]) AC_ARG_WITH(qmake, [ --with-qmake=FILE uses given qmake], [QMAKE="$withval"], [] ) AC_MSG_CHECKING(for Qt) am_have_qt_qmexe_suff=`echo $QMAKE | sed 's,^.*qmake,,'` # If we have Qt5 or later in the path, we're golden ver=`$QMAKE --version | grep -o "Qt version ."` if test "$ver" ">" "Qt version 4"; then QT_MAJOR_VERSION="5" have_qt=yes # This pro file dumps qmake's variables, but it only works on Qt 5 or later am_have_qt_dir=`mktemp -d` am_have_qt_pro="$am_have_qt_dir/test.pro" am_have_qt_stash="$am_have_qt_dir/.qmake.stash" am_have_qt_makefile="$am_have_qt_dir/Makefile" # http://qt-project.org/doc/qt-5/qmake-variable-reference.html#qt cat > $am_have_qt_pro << EOF win32 { CONFIG -= debug_and_release CONFIG += release } qtHaveModule(axcontainer): QT += axcontainer qtHaveModule(axserver): QT += axserver qtHaveModule(concurrent): QT += concurrent qtHaveModule(core): QT += core qtHaveModule(dbus): QT += dbus qtHaveModule(declarative): QT += declarative qtHaveModule(designer): QT += designer qtHaveModule(gui): QT += gui qtHaveModule(help): QT += help qtHaveModule(multimedia): QT += multimedia qtHaveModule(multimediawidgets): QT += multimediawidgets qtHaveModule(network): QT += network qtHaveModule(opengl): QT += opengl qtHaveModule(printsupport): QT += printsupport qtHaveModule(qml): QT += qml qtHaveModule(qmltest): QT += qmltest qtHaveModule(x11extras): QT += x11extras qtHaveModule(script): QT += script qtHaveModule(scripttools): QT += scripttools qtHaveModule(sensors): QT += sensors qtHaveModule(serialport): QT += serialport qtHaveModule(sql): QT += sql qtHaveModule(svg): QT += svg qtHaveModule(testlib): QT += testlib qtHaveModule(uitools): QT += uitools qtHaveModule(webkit): QT += webkit qtHaveModule(webkitwidgets): QT += webkitwidgets qtHaveModule(xml): QT += xml qtHaveModule(xmlpatterns): QT += xmlpatterns percent.target = % percent.commands = @echo -n "\$(\$(@))\ " QMAKE_EXTRA_TARGETS += percent EOF $QMAKE $am_have_qt_pro -o $am_have_qt_makefile QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile CXXFLAGS INCPATH` QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile LIBS` rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile rmdir $am_have_qt_dir if test "$ver" ">" "Qt version 5"; then QT_MAJOR_VERSION="6" AC_CHECK_TOOLS([QTPATHS],[qtpaths-qt6 qtpaths6 qtpaths],[false]) else AC_CHECK_TOOLS([QTPATHS],[qtpaths-qt5 qtpaths5 qtpaths],[false]) fi ver=`$QTPATHS --version | cut -d' ' -f 2` if test "$ver" = "2.0"; then # Add QT_HOST_BINS and QT_HOST_LIBEXECS paths to PATH for var in QT_HOST_BINS QT_HOST_LIBEXECS; do PATH=$PATH:`$QTPATHS --query $var` done fi # Look for specific tools in $PATH AC_ARG_VAR([QT_MOC],[Qt moc tool]) AC_PATH_PROG([QT_MOC],[moc$am_have_qt_qmexe_suff]) if test "$QT_MOC" = ""; then AC_PATH_PROG([QT_MOC],[moc]) fi AC_ARG_VAR([QT_UIC],[Qt uic tool]) AC_PATH_PROG([QT_UIC],[uic$am_have_qt_qmexe_suff]) if test "$QT_UIC" = ""; then AC_PATH_PROG([QT_UIC],[uic]) fi AC_ARG_VAR([QT_RCC],[Qt rcc tool]) AC_PATH_PROG([QT_RCC],[rcc$am_have_qt_qmexe_suff]) if test "$QT_RCC" = ""; then AC_PATH_PROG([QT_RCC],[rcc]) fi AC_ARG_VAR([QT_LRELEASE],[Qt lrelease tool]) AC_PATH_PROG([QT_LRELEASE],[lrelease$am_have_qt_qmexe_suff]) if test "$QT_LRELEASE" = ""; then AC_PATH_PROG([QT_LRELEASE],[lrelease]) fi AC_ARG_VAR([QT_LUPDATE],[Qt lupdate tool]) AC_PATH_PROG([QT_LUPDATE],[lupdate$am_have_qt_qmexe_suff]) if test "$QT_LUPDATE" = ""; then AC_PATH_PROG([QT_LUPDATE],[lupdate]) fi # Get Qt version from qmake QT_DIR=`$QMAKE --version | grep -o -E /.+` # All variables are defined, report the result AC_MSG_RESULT([$have_qt: QT_CXXFLAGS=$QT_CXXFLAGS QT_DIR=$QT_DIR QT_LIBS=$QT_LIBS QT_UIC=$QT_UIC QT_MOC=$QT_MOC QT_RCC=$QT_RCC QT_LRELEASE=$QT_LRELEASE QT_LUPDATE=$QT_LUPDATE QT_MAJOR_VERSION=$QT_MAJOR_VERSION]) else # Qt was not found have_qt=no QT_CXXFLAGS= QT_DIR= QT_LIBS= QT_UIC= QT_MOC= QT_RCC= QT_LRELEASE= QT_LUPDATE= QT_MAJOR_VERSION= AC_MSG_RESULT($have_qt) fi AC_SUBST(QT_CXXFLAGS) AC_SUBST(QT_DIR) AC_SUBST(QT_LIBS) AC_SUBST(QT_MAJOR_VERSION) #### Being paranoid: if test x"$have_qt" = xyes; then AC_MSG_CHECKING(correct functioning of Qt installation) AC_CACHE_VAL(ax_cv_qt_test_result, [ cat > ax_qt_test.h << EOF #include class Test : public QObject { Q_OBJECT public: Test() {} ~Test() {} public slots: void receive() {} signals: void send(); }; EOF cat > ax_qt_main.$ac_ext << EOF #include "ax_qt_test.h" #include int main( int argc, char **argv ) { QApplication app( argc, argv ); Test t; QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); } EOF ax_cv_qt_test_result="failure" ax_try_1="$QT_MOC ax_qt_test.h -o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null" AC_TRY_EVAL(ax_try_1) if test x"$ac_status" != x0; then echo "$ax_err_1" >&AS_MESSAGE_LOG_FD echo "configure: could not run $QT_MOC on:" >&AS_MESSAGE_LOG_FD cat ax_qt_test.h >&AS_MESSAGE_LOG_FD else ax_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_ax_qt_test.o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null" AC_TRY_EVAL(ax_try_2) if test x"$ac_status" != x0; then echo "$ax_err_2" >&AS_MESSAGE_LOG_FD echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD cat moc_ax_qt_test.$ac_ext >&AS_MESSAGE_LOG_FD else ax_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o ax_qt_main.o ax_qt_main.$ac_ext >/dev/null 2>/dev/null" AC_TRY_EVAL(ax_try_3) if test x"$ac_status" != x0; then echo "$ax_err_3" >&AS_MESSAGE_LOG_FD echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD cat ax_qt_main.$ac_ext >&AS_MESSAGE_LOG_FD else ax_try_4="$CXX -o ax_qt_main ax_qt_main.o moc_ax_qt_test.o $QT_LIBS $LIBS >/dev/null 2>/dev/null" AC_TRY_EVAL(ax_try_4) if test x"$ac_status" != x0; then echo "$ax_err_4" >&AS_MESSAGE_LOG_FD else ax_cv_qt_test_result="success" fi fi fi fi ])dnl AC_CACHE_VAL ax_cv_qt_test_result AC_MSG_RESULT([$ax_cv_qt_test_result]) if test x"$ax_cv_qt_test_result" = "xfailure"; then AC_MSG_ERROR([Failed to find matching components of a complete Qt installation. Try using more options, see ./configure --help.]) fi rm -f ax_qt_test.h moc_ax_qt_test.$ac_ext moc_ax_qt_test.o \ ax_qt_main.$ac_ext ax_qt_main.o ax_qt_main fi ]) gwenhywfar-5.12.1/m4/types.m40000644000175000017500000001001513142134462012625 00000000000000# $Id$ # (c) 2004 Martin Preuss # These functions check for special types AC_DEFUN([AQ_TYPE_UINT32],[ dnl PREREQUISITES: dnl none dnl IN: dnl - default type for crosscompiling dnl OUT: dnl Variables: dnl aq_type_uint32 dnl Defines: # check for type to use AC_MSG_CHECKING(for UINT32 type) rm -f conf.uint32 AC_TRY_RUN([ #include #include int main (){ const char *s; FILE *f; if (sizeof(unsigned int)==4) s="unsigned int"; else if (sizeof(unsigned short)==4) s="unsigned short"; else if (sizeof(unsigned long)==4) s="unsigned long"; else if (sizeof(unsigned long long)==4) s="unsigned long long"; else { printf("Could not determine type for UINT32"); exit(1); } f=fopen("conf.uint32", "w+"); if (!f) { printf("Could not create file conf.uint32\n"); exit(1); } fprintf(f, "%s\n", s); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_type_uint32=`cat conf.uint32`; AC_MSG_RESULT($aq_type_uint32)], [AC_MSG_ERROR(Could not determine type)], [aq_type_uint32="$1"; AC_MSG_RESULT([Crosscompiling, assuming $1])] ) rm -f conf.uint32 # check for template to use AC_MSG_CHECKING(for UINT32 template) rm -f conf.uint32 AC_TRY_RUN([ #include #include int main (){ const char *s; FILE *f; if (sizeof(unsigned int)==4) s="%u"; else if (sizeof(unsigned short)==4) s="%hu"; else if (sizeof(unsigned long)==4) s="%lu"; else if (sizeof(unsigned long long)==4) s="%llu"; else { printf("Could not determine template for UINT32"); exit(1); } f=fopen("conf.uint32", "w+"); if (!f) { printf("Could not create file conf.uint32\n"); exit(1); } fprintf(f, "%s\n", s); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_type_tmpl_uint32=`cat conf.uint32`; AC_MSG_RESULT($aq_type_tmpl_uint32)], [AC_MSG_ERROR(Could not determine type)], [aq_type_tmpl_uint32="$1"; AC_MSG_RESULT([Crosscompiling, assuming $1])] ) rm -f conf.uint32 ]) AC_DEFUN([AQ_TYPE_UINT64],[ dnl PREREQUISITES: dnl none dnl IN: dnl - default type for crosscompiling dnl OUT: dnl Variables: dnl aq_type_uint64 dnl Defines: # check for type to use AC_MSG_CHECKING(for UINT64 type) rm -f conf.uint64 AC_TRY_RUN([ #include #include int main (){ const char *s; FILE *f; if (sizeof(unsigned int)==8) s="unsigned int"; else if (sizeof(unsigned short)==8) s="unsigned short"; else if (sizeof(unsigned long)==8) s="unsigned long"; else if (sizeof(unsigned long long)==8) s="unsigned long long"; else { printf("Could not determine type for UINT64"); exit(1); } f=fopen("conf.uint64", "w+"); if (!f) { printf("Could not create file conf.uint64\n"); exit(1); } fprintf(f, "%s\n", s); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_type_uint64=`cat conf.uint64`; AC_MSG_RESULT($aq_type_uint64)], [AC_MSG_ERROR(Could not determine type)], [aq_type_uint64="$1"; AC_MSG_RESULT([Crosscompiling, assuming $1])] ) rm -f conf.uint64 # check for template to use AC_MSG_CHECKING(for UINT64 template) rm -f conf.uint64 AC_TRY_RUN([ #include #include int main (){ const char *s; FILE *f; if (sizeof(unsigned int)==8) s="%u"; else if (sizeof(unsigned short)==8) s="%hu"; else if (sizeof(unsigned long)==8) s="%lu"; else if (sizeof(unsigned long long)==8) s="%llu"; else { printf("Could not determine template for UINT64"); exit(1); } f=fopen("conf.uint64", "w+"); if (!f) { printf("Could not create file conf.uint64\n"); exit(1); } fprintf(f, "%s\n", s); if (fclose(f)) { printf("Could not close file.\n"); exit(1); } exit(0); } ], [aq_type_tmpl_uint64=`cat conf.uint64`; AC_MSG_RESULT($aq_type_tmpl_uint64)], [AC_MSG_ERROR(Could not determine type)], [aq_type_tmpl_uint64="$1"; AC_MSG_RESULT([Crosscompiling, assuming $1])] ) rm -f conf.uint64 ]) gwenhywfar-5.12.1/m4/pcsc.m40000644000175000017500000000532513142134462012421 00000000000000# $Id$ # (c) 2002 Martin Preuss # This function check if PC/SC is wanted AC_DEFUN([AQ_CHECK_PCSC],[ dnl PREREQUISITES: dnl - AQ_CHECK_OS must becalled before dnl IN: dnl nothing dnl OUT: dnl Variables: dnl pcsc_libraries: Path to the SSL libraries dnl pcsc_lib: SSL libraries to link against dnl pcsc_includes: Path to the PC/SC includes dnl Defines: dnl check if pcsc is desired if test "$OSYSTEM" != "windows" ; then AC_MSG_CHECKING(if PC/SC should be used) AC_ARG_ENABLE(pcsc, [ --enable-pcsc enable PC/SC driver (default=yes)], enable_pcsc="$enableval", enable_pcsc="yes") AC_MSG_RESULT($enable_pcsc) if test "$enable_pcsc" != "no"; then dnl ******* pcsc includes *********** AC_MSG_CHECKING(for pcsc includes) if test "$OSYSTEM" != "windows" ; then AC_ARG_WITH(pcsc-includes, [ --with-pcsc-includes=DIR adds pcsc include path], [pcsc_search_inc_dirs="$withval"], [pcsc_search_inc_dirs="/usr/include\ /usr/local/include\ /usr/local/pcsc/include\ /usr/pcsc/include\ "]) dnl search for pcsc AQ_SEARCH_FOR_PATH([winscard.h],[$pcsc_search_inc_dirs]) if test -n "$found_dir" ; then pcsc_includes="-I$found_dir" fi AC_MSG_RESULT($pcsc_includes) else AC_MSG_RESULT(builtin winscard.h) fi dnl ******* pcsc lib *********** AC_MSG_CHECKING(for pcsc libs) AC_ARG_WITH(openpcsc-libname, [ --with-openpcsc-libname=NAME specify the name of the pcsc library], [pcsc_search_lib_names="$withval"], [pcsc_search_lib_names="libpcsclite.so \ libpcsclite.so.* \ libpcsc.a"]) AC_ARG_WITH(openpcsc-libs, [ --with-openpcsc-libs=DIR adds openpcsc library path], [pcsc_search_lib_dirs="$withval"], [pcsc_search_lib_dirs="/usr/lib \ /usr/local/lib \ /usr/lib/pcsc/lib \ /usr/local/pcsc/lib \ /lib"]) dnl search for pcsc libs for d in $pcsc_search_lib_dirs; do AQ_SEARCH_FILES("$d",$pcsc_search_lib_names) if test -n "$found_file" ; then pcsc_libraries="-L$d" pcsc_lib="-l`echo $found_file | sed 's/lib//;s/\.so*//;s/\.a//'`" break fi done if test -z "$pcsc_libraries" -o -z "$pcsc_lib" -o -z "$pcsc_includes"; then AC_MSG_WARN(No pcsc libraries found, SCard driver will not be available.) else AC_MSG_RESULT($pcsc_libraries ${pcsc_lib}) fi # end of "if enable-pcsc" fi #end of if windows fi AC_SUBST(pcsc_includes) AC_SUBST(pcsc_libraries) AC_SUBST(pcsc_lib) ]) gwenhywfar-5.12.1/m4/lib-link.m40000644000175000017500000006304613142134462013176 00000000000000# lib-link.m4 serial 8 (gettext-0.15) dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.50) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) gwenhywfar-5.12.1/m4/acx_compile_warn.m40000666000175000017500000000446613550706616015025 00000000000000# Compile warning arguments to ./configure # by Christian Stimming 2003-11-19 dnl ACX_COMPILE_WARN() dnl Add arguments for compile warnings and debug options to ./configure. dnl AC_DEFUN([ACX_COMPILE_WARN], [ dnl For enabling of debugging flags/code AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging code enabled, default=no], [case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -g" CFLAGS="${CFLAGS} -g" LDFLAGS="${LDFLAGS} -g" AC_DEFINE(DEBUG,1,[Define if you want debugging code enabled.]) ;; no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac ], [ # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ]) dnl If this is gcc, then ... if test ${GCC}x = yesx; then dnl Enable all warnings AC_ARG_ENABLE(warnings, [ --enable-warnings enable compilation warnings, default=yes], [case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" ;; all) CXXFLAGS="${CXXFLAGS} -Wall -pedantic -ansi" CFLAGS="${CFLAGS} -Wall -pedantic -ansi" ;; no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-warnings) ;; esac ], [ # Default value if the argument was not given CXXFLAGS="${CXXFLAGS} -Wall" CFLAGS="${CFLAGS} -Wall" ]) dnl For gcc >= 3.4.x, specifically enable the new warning switch dnl -Wdeclaration-after-statement in order to preserve source code dnl compatibility to gcc 2.95 and other compilers. GCC_VERSION=`${CC} -dumpversion` if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then # This is gcc >= 3.x.x if test `echo ${GCC_VERSION} | cut -d. -f2 | cut -d- -f1` -ge 4; then # This is gcc >= 3.4.x CFLAGS="${CFLAGS} -Wdeclaration-after-statement" fi fi dnl For enabling error on warnings AC_ARG_ENABLE(error-on-warning, [ --enable-error-on-warning treat all compile warnings as errors, default=no], [case "${enableval}" in yes) CXXFLAGS="${CXXFLAGS} -Werror" CFLAGS="${CFLAGS} -Werror" ;; no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;; esac ], [ # Default value if the argument was not given CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" ]) fi ]) gwenhywfar-5.12.1/m4/as-scrub-include.m40000644000175000017500000000201713142134462014624 00000000000000dnl as-scrub-include.m4 0.0.1 dnl autostars m4 macro for scrubbing CFLAGS of system include dirs dnl because gcc 3.x complains about including system including dirs dnl dnl thomas@apestaart.org dnl dnl This macro uses output of cpp -v and expects it to contain text that dnl looks a little bit like this: dnl #include <...> search starts here: dnl /usr/local/include dnl /usr/lib/gcc-lib/i386-redhat-linux/3.2/include dnl /usr/include dnl End of search list. dnl AS_SCRUB_INCLUDE(VAR) dnl example dnl AS_SCRUB_INCLUDE(CFLAGS) dnl will remove all system include dirs from the given CFLAGS AC_DEFUN([AS_SCRUB_INCLUDE], [ GIVEN_CFLAGS=$[$1] INCLUDE_DIRS=`echo | ${CPP} -v 2>&1` dnl remove everything from this output between the "starts here" and "End of" dnl line INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e 's;-I$dir ;;' | sed -e 's;-I$dir$;;') done [$1]=$GIVEN_CFLAGS ]) gwenhywfar-5.12.1/m4/qt4.m40000644000175000017500000001500613542476511012206 00000000000000# $Id$ # (c) 2010 Martin Preuss # These functions search for QT4 AC_DEFUN([AQ_CHECK_QT4],[ dnl PREREQUISITES: dnl AQ_CHECK_OS must be called before this dnl IN: dnl nothing dnl OUT: dnl Variables: dnl have_qt4 - set to "yes" if QT4 exists dnl qt4_includes - path to includes dnl qt4_libs - path to libraries dnl qt4_uic - name and path of the uic tool dnl qt4_moc - name and path of the moc tool dnl Defines: dnl HAVE_QT4 dnl paths for qt4 includes AC_MSG_CHECKING(for qt4 includes) AC_ARG_WITH(qt4-includes, [ --with-qt4-includes=DIR uses qt4 includes from given dir], [local_qt4_includes="$withval"], [local_qt4_includes="\ $QTDIR/include \ /usr/include/qt4 \ /usr/local/include/qt4 \ /usr/lib/qt4/include \ /usr/local/lib/qt4/include \ /opt/qt4/include \ /usr/include/qt \ /usr/local/include/qt \ /usr/lib/qt/include \ /usr/local/lib/qt/include \ /usr/include \ /usr/local/include \ /opt/qt/include \ /usr/X11R6/include \ " ] ) if test -z "$qt4_includes"; then for i in $local_qt4_includes; do if test -z "$qt4_includes"; then qglobalh_paths="Qt QtCore" for q in $qglobalh_paths; do if test -f "$i/$q/qglobal.h"; then lv1=`grep -h "#define QT_VERSION_STR" $i/$q/qglobal.h` case $lv1 in *4.*) qt4_includes="-I$i -I$i/Qt -I$i/QtCore -I$i/QtGui" qt4_dir=`echo $i | ${SED} 's-/include.*--'` break; ;; esac fi done fi done fi if test -n "$qt4_includes"; then AC_MSG_RESULT($qt4_includes) else AC_MSG_RESULT(not found) fi # Check for x86_64 architecture; potentially set lib-directory suffix if test "$target_cpu" = "x86_64"; then libdirsuffix="64" else libdirsuffix="" fi dnl paths for qt4 libs AC_MSG_CHECKING(for qt4 libraries) AC_ARG_WITH(qt4-libs, [ --with-qt4-libs=DIR uses qt4 libs from given dir], [local_qt4_libs="$withval"], [local_qt4_libs="\ $qt4_dir/lib${libdirsuffix} \ $QTDIR/lib${libdirsuffix} \ $DEBIAN_MULTIARCH_DIRS \ /usr/lib/qt4 \ /usr/local/lib/qt4 \ /usr/lib/qt4/lib${libdirsuffix} \ /usr/local/lib/qt4/lib${libdirsuffix} \ /opt/qt4/lib${libdirsuffix} \ /usr/lib/qt \ /usr/local/lib/qt \ /usr/lib/qt/lib${libdirsuffix} \ /usr/local/lib/qt/lib${libdirsuffix} \ /usr/lib${libdirsuffix} \ /usr/lib${libdirsuffix}/qt4/lib \ /usr/lib${libdirsuffix}/qt-4.5/lib \ /usr/lib${libdirsuffix}/qt-4.6/lib \ /usr/local/lib${libdirsuffix} \ /opt/qt/lib${libdirsuffix} \ /usr/X11R6/lib${libdirsuffix} \ " ] ) # Determine the extension of a shared library; the variable # std_shrext comes from the AC_PROG_LIBTOOL macro. Copied from # libtool. # Shared library suffix. On linux this was set as # shrext_cmds='.so'; but on darwin it is actually a text command. eval std_shrext=\"$shrext_cmds\" if test -z "${std_shrext}"; then std_shrext='.so' fi qt_libname="QtGui" # This is the name of the qt library to search for. if test "x$OSYSTEM" = "xosx"; then qt_searchname="lib${qt_libname}.4.dylib" elif test "x$host" = "xi686-w64-mingw32" || test "x$host" = "xx86_64-w64-mingw32"; then qt_searchname="lib${qt_libname}4${std_shrext}.a" else qt_searchname="lib${qt_libname}${std_shrext}.4" fi if test -z "$qt4_libs"; then AQ_SEARCH_FOR_PATH([$qt_searchname],[$local_qt4_libs]) if test -n "$found_dir" ; then if test "x$host" = "xi686-w64-mingw32" || test "x$host" = "xx86_64-w64-mingw32"; then qt4_libs="-L$found_dir -l${qt_libname}4 -lQtCore4 -no-undefined" else qt4_libs="-L$found_dir -l${qt_libname} -lQtCore" fi fi fi if test -n "$qt4_libs"; then AC_MSG_RESULT($qt4_libs) else AC_MSG_RESULT(not found) fi dnl paths for qt4 moc AC_MSG_CHECKING(for qt4 moc) if test -z "$qt4_moc"; then AC_ARG_WITH(qt4-moc, [ --with-qt4-moc=FILE uses the given qt4 moc], [qt4_moc="$withval"], [qt4_moc=""] ) fi if test -z "$qt4_moc"; then searchdir="\ $qt4_dir/bin \ $QTDIR/bin \ /usr/lib/qt4/bin \ /usr/local/lib/qt4/bin \ /opt/qt4/bin \ /usr/lib/qt/bin \ /usr/local/lib/qt/bin \ /usr/bin \ /usr/local/bin \ /opt/qt/bin \ /usr/X11R6/bin \ " # search for "moc-qt4" for f in $searchdir; do if test -x $f/moc-qt4; then qt4_moc="$f/moc-qt4" break fi done # fall back to "moc" if test -z "$qt4_moc"; then for f in $searchdir; do if test -x $f/moc; then qt4_moc="$f/moc" break fi done fi fi if test -n "$qt4_moc"; then AC_MSG_RESULT($qt4_moc) else AC_MSG_RESULT(not found) fi dnl paths for qt4 uic AC_MSG_CHECKING(for qt4 uic) if test -z "$qt4_uic"; then AC_ARG_WITH(qt4-uic, [ --with-qt4-uic=FILE uses the given qt4 uic], [qt4_uic="$withval"], [qt4_uic=""] ) searchdir="\ $qt4_dir/bin \ $QTDIR/bin \ /usr/lib/qt4/bin \ /usr/local/lib/qt4/bin \ /opt/qt4/bin \ /usr/lib/qt/bin \ /usr/local/lib/qt/bin \ /usr/bin \ /usr/local/bin \ /opt/qt/bin \ /usr/X11R6/bin \ " # search for "uic-qt4" for f in $searchdir; do if test -x $f/uic-qt4; then qt4_uic="$f/uic-qt4" break fi done # fall back to "uic" if test -z "$qt4_uic"; then for f in $searchdir; do if test -x $f/uic; then qt4_uic="$f/uic" break fi done fi fi if test -n "$qt4_uic"; then AC_MSG_RESULT($qt4_uic) else AC_MSG_RESULT(not found) fi # check if all necessary qt4 components where found if test -z "$qt4_includes" || \ test -z "$qt4_moc" || \ test -z "$qt4_uic" || \ test -z "$qt4_libs"; then qt4_libs="" qt4_moc="" qt4_uic="" qt4_includes="" have_qt4="no" AC_MSG_ERROR([ Compilation of QT applications is enabled but I could not find some Qt components (see which are missing in messages above). If you don't want to compile Qt4 applications please explicitly specify which GUIs you want to support using "--with-guis". ]) else dnl TODO: AC_TRY_RUN, check whether qversion.h has matching versions have_qt4="yes" AC_DEFINE(HAVE_QT4, 1, [whether Qt4 is available]) fi AS_SCRUB_INCLUDE(qt4_includes) AC_SUBST(qt4_libs) AC_SUBST(qt4_includes) AC_SUBST(qt4_moc) AC_SUBST(qt4_uic) ]) gwenhywfar-5.12.1/m4/Makefile.am0000664000175000017500000000045214043240674013265 00000000000000 EXTRA_DIST= \ acx_compile_warn.m4 \ ax_pthread.m4 \ as-scrub-include.m4 \ binreloc.m4 \ debugmode.m4 \ distri.m4 \ docpath.m4 \ endian.m4 \ iconv.m4 \ kde.m4 \ lib-prefix.m4 \ lib-link.m4 \ lib-ld.m4 \ os.m4 \ pcsc.m4 \ qt.m4 \ searchfiles.m4 \ types.m4 \ windoze.m4 sources: gwenhywfar-5.12.1/config.sub0000755000175000017500000010511614175772605012707 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2022-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | linux-musl* | linux-relibc* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: